Skip to content

Comment on Ask HN: Do you bake AMIs for AWS deployments?

Comments

I create an AMI with a bare minimum OS. Then I use a configuration management tool to install all software packages, libraries and configurations. My new favorite is Ansible (ansibleworks.com) but Chef and Puppet are others.

Updates are easier this way versus having to rebake images.

Easier in what sense? Baking, deploying, or managing the AMIs?

Also, are you using AutoScaling Groups with this methodology?

I think more flexible is a better word -- it can do more than what you can do when you bake a static image because you also use it to dynamically manage a running system post-boot.

Ansible can deploy all of your dependencies, keep them updated, push out configuration changes, and deploy your main application code.

I don't use AutoScaling, but no reason it couldn't be used with Ansible. The docs have a bit of detail on how to do it. http://docs.ansible.com/guide_aws.html

I wrote the EC2 inventory plugin, so yes, I am a big fan of Ansible. I however, now use Ansible almost exclusively to build AMIs. Do your application code deploys require downtime, or do you have a technique to keep the service online while making changes?

I highly recommend you start using ASGs. It is only a matter of time before things go bad if you don't.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.