Nova is the the cloud management command line utility for RackSpace and other OpenStack clouds. Special setup is required to use Nova with RackSpace Cloud Networks.
Here’s the docs from RackSpace:
http://docs.rackspace.com/servers/api/v2/cn-gettingstarted/content/ch_overview.html
http://docs.rackspace.com/servers/api/v2/cn-devguide/content/index.html
Here are the steps:
1. Install python-pip package
1 |
apt-get -y install python-pip |
For RedHat/CentOS we need to install EPEL repository if it’s not already installed:
1 2 |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6*.rpm |
Now we can install python-pip:
1 |
yum install python-pip |
2. Install rackspace version of nova client
1 |
python-pip install rackspace-novaclient |
If “python-pip” does not work then try:
1 |
pip install rackspace-novaclient |
3. Reinstall nova client from latest github souce:
1 2 3 4 |
cd /root git clone git://github.com/openstack/python-novaclient.git cd python-novaclient python setup.py install |
Note that you might need to install git to complete this step:
1 |
apt-get -y install git |
1 |
yum install git |
4. Add credentials to .bash_profile
1 2 3 4 5 6 7 8 9 10 11 12 |
cat << 'EOF' >> /root/.bash_profile export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/ export OS_AUTH_SYSTEM=rackspace export OS_REGION_NAME=DFW export OS_USERNAME=acme export OS_TENANT_NAME=11111 export NOVA_RAX_AUTH=1 export OS_PASSWORD=mypass export OS_PROJECT_ID=11111 export OS_NO_CACHE=1 EOF source /root/.bash_profile |
You’ll need to set the appropriate region, account number, username and password.
5. Verify credentials
1 |
nova credentials |
If this fails with an error like:
1 2 3 4 5 6 7 |
root@web01:~/python-novaclient# nova credentials Traceback (most recent call last): File "/usr/local/bin/nova", line 6, in <module> from novaclient.shell import main File "/usr/local/lib/python2.7/dist-packages/novaclient/__init__.py", line 15, in <module> import pbr.version ImportError: No module named pbr.version |
then install “pbr” module:
1 |
pip install pbr |
6. Install RackSpace Cloud Networks Virtual Interface extensions
1 |
pip install os_virtual_interfacesv2_python_novaclient_ext |
7. List Cloud Networks
1 |
nova network-list |