This folder contains an example of how define infrastructure-as-code using Packer. The
simple-web-server.json
Packer template shows how to create an AMI containing a simple web server that you can deploy
in AWS. The AMI is built on top of Ubuntu, has Ruby on Rails installed, and contains the code from the
example-rails-app
folder.
- Install Packer.
- Add your AWS credentials as the environment variables
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
. - Run
packer build simple-web-server.json
. - When the build is done, it'll output the ID of an AMI in
us-east-2
that you can deploy. See theterraform-example-full
folder for an example of how to deploy this AMI and run the Ruby on Rails app within it.