Bash scripts for scripted server deployments on Openstack.
Usage: baker.sh <AccountID> [ImageID] [FlavorID] [Script] [Bypass] [Name]
pip for Python 2.X:
- rackspace-novaclient, if on Rackspace's Openstack deployment (Cloud Servers)
- python-novaclient, if not on Rackspace
- supernova, either way.
Also:
- Bash
- OpenSSH
~/.supernova:
[account-region]
NOVA_URL=https://identity.api.rackspacecloud.com/v2.0/
NOVA_RAX_AUTH=1
NOVA_REGION_NAME=REGION
NOVA_SERVICE_NAME=cloudServersOpenStack
NOVA_USERNAME=USERNAME
OS_PASSWORD=APIKEY
OS_TENANT_ID=ACCOUNTNUMBER
OS_AUTH_SYSTEM=rackspace
You can make multiple of those entries per datacenter if you like. Use lon.identity for NOVA_URL on UK accounts.
Protip: Make a [default] account/region. Some recipies use this as a feature. Check out the supernova documentation for more information on this.
Generate an SSH key if you don't already have it. This will use the "default" key of ~/.ssh/id_rsa{,.pub}.
baker.sh nukes the server after you log out or the script is done. You can prevent this by making sure the server is still accessible (at least momentarily) after logout, and touching /root/.baker_preserve.
baker.sh will log you directly into the server if you don't give it a script argument.
- baker.sh account # Boots FreeBSD performance1-1 server, works for Rackspace.
- baker.sh account imageuuid flavor
- https://github.com/teran-mckinney/bitnoder
- https://github.com/teran-mckinney/freebsd-flash-plugin
Symlink baker.sh to your $PATH.