Toward more dynAMIc deploys
The bad old days
"LaunchConfig": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"ImageId": "ami-f6b11181", # standard Ubuntu AMI
...
"UserData": {
# Install Java
# Install AWS CLI
# Download authorized_keys
# Download and extract app artifact
# Start the app
}
}
}Problems
-
Slow
-
Unreliable
-
Duplicated effort
Solution
pre-bake dependencies into the AMI
- Packer + a bunch of bash scripts
- Runs as a TeamCity build
- Installs a large number of 'features'
Problems
- No way to select the features you need
- Built AMIs are hard to discover and inspect
- Quickly descended into bash hell
- TeamCity + bunch of bash scripts is hard to grok
- Play app wrapping Ansible and Packer
- Installs only the features you need
- Pointy-clicky UI
- Scheduled bakes
DEMO
Riff Raff integration
(also AMIable)
The future
- Automated testing of AMIs using ServerSpec
- Docker??
Get involved!
Toward more dynAMIc deploys
By Chris Birchall
Toward more dynAMIc deploys
- 2,322