- Take care to update latest file
doc/changes/changes_*.md
- Correct version number
- Current date
- Code name
- Summary
- Remove sections without tickets or add
n/a
- Push and merge your current Pull-request
- Run release-droid
- Edit draft release on GitHub and make it final
Release-droid command line:
java -jar ~/path/to/release-droid-*.jar \
-n ai-lab -goal release \
-guide /tmp/release-guide.html
The following diagram shows the high-level steps to generate the images:
Creates an EC2 instance based on an Ubuntu AMI via AWS Cloudformation. It also creates a new keypair dynamically. After the export has finished, the cloudformation stack and the keypair is removed.
Installs all dependencies via Ansible:
- installs and configures Jupyter
- installs Docker and adds the user
jupyter
to the docker group - changes the netplan configuration. This is necessary to have proper network configuration when running the VM image
Finally, the default password will be set, and also the password will be marked as expired, such that the user will be forced to enter a new password during initial login. Also, the ssh password authentication will be enabled, and for security reasons the folder "~/.ssh" will be removed.
The export creates an AMI based on the running EC2 instance and exports the AMI as VM image in the default formats to a S3 bucket.
The release is executed in a AWS Codebuild job, the following diagram shows the flow.
The bucket has private access. In order to control access, the Bucket cloudformation stack also contains a Cloudfront distribution. Public Https access is only possibly through Cloudfront. Another stack contains a Web application firewall (WAF), which will be used by the Cloudfront distribution. Due to restrictions in AWS, the WAF stack needs to be deployed in region "us-east-1". The WAF stack provides two rules which aim to minimize a possible bot attack:
Name | Explanation | Priority |
---|---|---|
VMBucketRateLimit | Declares the minimum possible rate limit for access: 100 requests in a 5 min interval. | 0 |
CAPTCHA | Forces a captcha action for any IP which does not match a predefined set of IP-addresses. | 1 |
The following diagram shows the involved cloudformation stacks:
The following resources are permanent and need to be deployed using the "deploy" commands:
DATA-SCIENCE-SANDBOX-VM-Bucket
DATA-SCIENCE-SANDBOX-CI-TEST-CODEBUILD
DATA-SCIENCE-SANDBOX-RELEASE-CODEBUILD
The EC2-stack lives only during the creation of a new sandbox image.
Each of the involved resources might cause costs: cloudformation stacks, AMI, EC2 key-pairs.
To enable keeping track of all these resources, the implementation tags them after creation with a specific keyword (called asset-id).
The S3 objects are identified by the prefix in the S3 bucket.
The command tags only the dynamically created entities with the asset-id but not the permanent cloudformation stacks.
The command show-aws-assets
lists all assets which were created during the execution.
- This is very useful if an error occured.
- If the creation of a sandbox finished normally the list should contain only the AMI, images (S3 objects) and the export tasks (one for each image).