This repo builds and deploys a simple Tornado web app and server both locally using test kitchen and remotely using chef provisioning.
Install the following software packages (these instructions assume you are using a recent version of Mac OS X):
To run the local development environment install the following:
chef gem install chef-provisioning-aws chef-provisioning
This will build a local environment and run infrastructure tests on the built server / VM.
kitchen verify
kitchen destroy
Configure your local AWS environment according to this guide: Credential Setup or use the following steps if you already have your access key and secret:
Create the .aws directory:
mkdir ~/.aws
Then edit both config files as below:
vi ~/.aws/credentials
[default]
aws_access_key_id=keyhere
aws_secret_access_key=secretkeyhere
vi ~/.aws/config
[default]
region=us-east-1
output=json
Generate a key for Chef Provisioning
ssh-keygen -t rsa -N "" -f .chef/keys/ref-key-pair-eni
Run the following command using chef provisioning:
chef-client -z amazon_ec2.rb
chef-client -z amazon_ec2_destroy.rb