Installing Bang¶
Overview¶
Bang is published in PyPI and can be installed via pip:
pip install bang
However, Bang depends on other libraries for such things as cloud provider integration and configuration management. The OpenStack client libraries in particular have extra dependencies that can be tricky to install (e.g. python-reddwarfclient depends on lxml).
Installing Dependencies¶
Debian/Ubuntu¶
... Using System Packages¶
Warning
This will likely upgrade some of your system Python packages. E.g. On a stock Ubuntu 12.04 LTS installation, it upgrades boto.
The benefit of installing Bang into your system Python installation is that you don’t need to build the native extensions in Bang’s dependencies - you can just use the prebuilt packages for your system. The following commands will install Bang to your system Python installation:
sudo apt-get install python-pip python-lxml
sudo pip install bang
... In a Virtualenv¶
Unfortunately, some of Bang’s dependencies have native extensions that require extra headers and compilation tools. Install the build-time dependencies from the Debian/Ubuntu package repos:
sudo apt-get install build-essential python-dev libxml2-dev libxslt-dev
Then install Bang as directed above.
RightScale¶
Bang allows you to combine traditional cloud providers like AWS with higher-level cloud managers like RightScale in the same stack. Generally, RightScale provides ample automation on top of AWS. However, it is sometimes necessary to supplement RightScale’s features. E.g.
- Using new AWS technologies that are not yet supported by RightScale.
- Integrating inherited application stacks that do not use Chef.
- Working with resources in multiple public cloud providers or even traditional private datacenters.
To enable the rightscale provider, install the following dependency:
pip install git+https://github.com/brantai/python-rightscale
OpenStack¶
As much as possible, Bang uses official OpenStack client libraries to provision resources in OpenStack clouds. Prior to Bang 0.10, this dependency was explicitly defined in the Bang package such that pip install bang would install the OpenStack client libraries as well. From Bang 0.10 onwards, OpenStack users will need to install the client libraries on their own.
Note
Problems with the client libraries include:
- Not having dependencies defined correctly in their packages
- Unnecessary dependency on native libraries like lxml
Bugs have been filed with upstream, but they have not been very responsive to feedback from outside the OpenStack organization.
The following commands should install the necessary dependencies:
sudo apt-get install build-essential python-dev libxml2-dev libxslt-dev
pip install \
python-novaclient==2.11.1
python-swiftclient==1.3.0
python-reddwarfclient==0.1.2
novaclient-auth-secretkey
HP Cloud¶
HP Cloud uses OpenStack as a base cloud operating system. However, HP has its own proprietary extensions and modifications which have meaningful effects on the provisioning API. Bang subclasses the appropriate OpenStack client library classes and adjusts behaviour for HP Cloud. In addition to the OpenStack dependency installation listed above, the following commands will enable Bang to deploy databases to HP Cloud’s beta DBaaS:
pip install PyMySQL==0.5