The scripts and configuration templates are available in the eagle-i Subversion repository at the following location:
https://open.med.harvard.edu/svn/eagle-i-install
This repository contains:
- AWS-specific scripts
- AMI creation scripts
- Cloud Formation scripts
- Ansible playbook and associated resources (e.g. templates)
At a high level, the node creation procedure is as follows:
- Amazon's Cloud Formation service loads the public eagle-i template (stored in AWS S3)
- This template specifies EC2 resources that are needed for the eagle-i stack, references the eagle-i AMI (also stored in S3) and specifies parameters that need to be collected from the user
- Cloud Formation templates are written in JSON
- Once the user has specified valid parameters, Cloud Formation creates the stack and starts the new instance in the EC2 Cloud
- Stack creation yields a few output parameters such as the Amazon-assigned public hostname
- When the EC2 instance boots, the bootstrap.sh script is executed (via inclusion in /etc/rc.local). This script:
- Performs basic operating system configuration and copies the eagle-i configuration parameters received from Cloud Formation into a variables file
- Downloads eagle-i Ansible tree from subversion
- Executes the eagle-i Ansible playbook that downloads, installs and configures eagle-i's prerequisites (Java, Tomcat, Postfix) and the eagle-i software
- When this script finishes, the Tomcat application server is started and after a few minutes (while the eagle-i software initializes), the eagle-i node is operational