Chef and Fabric scripts for provisioning Ubuntu server and django app.
Vagrant, EC2.
- fabric
- apache-libcloud
- vagrant (with base box which can be installed with
vagrant box add base http://files.vagrantup.com/precise32.box
)
git clone git@github.com:bmihelac/django-virtualized.git cd django-virtualized
vagrant up fab -R vagrant vagrant bootstrap
This will install blank Django 1.4 application, which is accessible at:
Setup EC2 environment variables
export EC2_ACCESS_ID="ec2-access-id" export EC2_SECRET_KEY="ec2-secret-key" export EC2_KEYPATH="~/ec2.pem"
Create EC2 instance
fab ec2 ec2_create_instance
List EC2 instances:
fab ec2 ec2_list_instances
Bootstrap instance
fab --hosts=ubuntu@50.17.62.32 ec2 bootstrap
Replace IP with one that was listed with ec2_list_instances.
Author: Bojan Mihelac with some code and inspiration from: