Skip to content

Instantly share code, notes, and snippets.

@adhorn
Created July 17, 2018 12:37
Show Gist options
  • Save adhorn/eb418ca59af0cef39edaf1925cb09740 to your computer and use it in GitHub Desktop.
Save adhorn/eb418ca59af0cef39edaf1925cb09740 to your computer and use it in GitHub Desktop.
START
Create a Base AMI and harden it if you have too.
IF DOCKER:
Create base Container with libraries and dependencies and store it in your container hub (you don't want to recreate the whole container every time)
Create an as-light-as possible Dockerfile (used a base container)
Copy code on build into Docker Container (run dockerfile)
Deploy Container to base AMI
ELSE:
Bake the AMI using configuration scripts.
Create new configuration with auto-scaling group (with or without ELB) and use the previously bake AMI ID as reference.
Test in different environments (dev, staging)
Deploy to prod (inactive)
Add new reference (DNS or Load Balancer)
Allow traffic flow slowly to new version (start with 5% and ramp up)
Keep old version around until new version is 100% and you are fully satisfied with the behaviour
Fast rollback if things go wrong
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment