compute-deploy is an Apache Libcloud wrapper used to deploy & bootstrap a cloud compute server. You can create or download a shell script to bootstrap your server with. See
- Python 2.7
- Apache Libcloud -
pip install apache-libcloud
- simplejson -
pip install simplejson
- paramiko -
pip install paramiko
Currently, this version supports the following providers:
- Rackspace
--size [SERVER_SIZE]
--name [SERVER_NAME]
--flavor [SERVER_OS]
--region [PROVIDER_REGION]
--bootstrap [BOOTSTRAP_FILE.sh]
--bootstrapargs [COMMA_SEPARATED_ARG_STRING]
--customfile [CUSTOMFILE_PATH]
Deploy a 512MB server running CentOS 5.10 at Rackspace Chicago and bootstrap the server with salt-bootstrap
./compute-deploy.py --size=512 --name=saltbox1 --flavor='CentOS 5.10' --region=ord --bootstrap='salt-bootstrap/bootstrap-salt.sh'
Deploy a 512MB server running CentOS 6.5 at Rackspace Chicago and bootstrap the server with puppet-bootstrap with the puppetmaster IP being 192.168.1.1 and the puppet environment being production
./compute-deploy.py --size=512 --name=puppetclient1 --flavor='CentOS 6.5' --region=ord --bootstrap='puppet-bootstrap/puppet-bootstrap.py' --bootstrapargs='192.168.1.1,production'
Deploy a 512MB server running CentOS 6.5 at Rackspace Chicago and bootstrap the server with puppet-bootstrap with the puppetmaster IP being 192.168.1.1 and the puppet environment being production and create / mount 1GB swap disk
./compute-deploy.py --size=512 --name=puppetclient1 --flavor='CentOS 6.5' --region=ord --bootstrap='puppet-bootstrap/puppet-bootstrap.py' --bootstrapargs='192.168.1.1,production,swap.sh' --customfile='swap.sh'
A bootstrap plugin is any shell script you want the server to initialize with. To use a bootstrap plugin, download or create a shell file within the compute-deploy directory and call it with the --boostrap
flag.
- cd to the
compute-deploy
dir - add the submodule (ex:
git submodule add git@github.com:saltstack/salt-bootstrap.git
) - run:
git submodule init
- run:
git submodule update
- use the shell file provided by the plugin (ex:
--bootstrap='salt-bootstrap/bootstrap-salt.sh'
)
This is probably the most common error you may run into when first trying out the program. This is apache-libcloud complaining that it can't find a valid certificate bundle. See https://libcloud.readthedocs.org/en/latest/other/ssl-certificate-validation.html for more information. The easiest workaround I found was as follows:
- run this gist: https://gist.github.com/1stvamp/2158128 (this downloads and installs the ca-bundle.crt under
/usr/share/curl
) - set the
SSL_CERT_FILE
parameter before execute as follows:
SSL_CERT_FILE=/usr/share/curl/ca-bundle.crt python2.7 ./compute-deploy.py --size=1024 ...