Hello EC2, Part 1: Bootstrapping Instances with cloud-init, git, and puppet
This is the first of a series of posts about setting up a scalable and robust ”Hello Word” web server using Amazon EC2—an exercise I am working through. The target audience is developers with some experience using EC2. This first installment looks at how to get an EC2 instance to configure itself when it boots up.
It is all too easy to treat EC2 instances as if they were ordinary virtual private servers, especially now that we have Elastic Block Store as an alternative to ephemeral instance-store disks. EC2 is supposed to be more than that. Reading about Elastic Load Balancing, Auto Scaling, and CloudWatch gives the impression that Amazon makes it easy to configure clusters that automatically scale and recover from failures. Unfortunately, it is not so easy.
This is the first installment of a series on setting up a simple, scalable and robust ”Hello World” web server. If the ultimate target is a dynamic web application supporting quick and easy deployment of new versions to staging or production, the road ahead will be long and hard indeed. For many projects, you will be better off building on a platform-as-a-service such as Heroku. Nevertheless, I will assume that for some reason or other we want to provision and pay for EC2 instances directly, maybe because the project targets a local audience somewhere in Europe and storing and processing the data in Amazon’s EU West region is desirable for legal reasons.
via Hello EC2, Part 1: Bootstrapping Instances with cloud-init, git, and puppet | Codento – Blog.