Recipes for provisioning software stacks using Chef Provisioning
- Install ChefDK
curl -L https://www.opscode.com/chef/install.sh | sudo bash -s -- -P chefdk
easy_install fabric PyYaml
git clone https://github.com/viglesiasce/chef-provisioning-recipes
The config file is a YAML formatted dictionary with the following structure. By default the tool uses the config.yml found in the current working directory. The default profile is used when no command line option is passed to the deployer.
The image should be Ubuntu Trusty with at least 5GB of free space on the root file system.
The following environment variables can be used instead of hardcoding credentials:
profiles: default: # name of the profile credentials: default # credentials/endpoints to use from below imageId: emi-5B295ED1 # image to use sshUsername: root # user to login to image as instanceType: m1.small # instance type to launch credentials: default: # name of credentials accessKey: XXXXXXXXXXXXXXXXXXX secretKey: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY ec2Endpoint: 'http://compute.home' # only necessary for Euca iamEndpoint: 'http://euare.home' # only necessary for Euca region: eucalyptus # only necessary for AWS
Deployment and Destroyment
In order to deploy a cluster run the deployer script with the name of the cluster you would like to deploy and the profile you'd like to use to deploy it:
./deployer.py mesos -p myCloud
You should now be able to login to your instances with the keys found in
To destroy the cluster you currently have deployed, use the --operation flag and set it to 'destroy'. For example:
./deployer.py mesos -p myCloud --operation destroy