Install OpenStack CLI on Ubuntu

Written by Christoph Hartmann

To setup the Open Stack Cli on a new server, you need to install Python 2.7 and the xml libraries. Once everything is prepared, the cli can be installed with:

pip install OPENSTACKTOOL-novaclient

Installation on Ubuntu 14.04 LTS

# Install dependencies to install nova and glance client
apt-get update
apt-get install -y python-pip
apt-get install -y build-essential
apt-get install -y python-dev libxslt1-dev libxml2-dev

# Install the Open Stack Cli
pip install python-novaclient
pip install python-glanceclient

Now, configure your environment variables for Open Stack. Since I use multiple tenants, I am going to create a new file for each tenant. eg.

export OS_USERNAME=chris
export OS_PASSWORD=verysecurepassword
export OS_TENANT_NAME=tenant1_name
export OS_AUTH_URL=
export OS_AUTH_STRATEGY=keystone

With this approach I am able to switch tenants quickly. Just source or execute the shell script directly. Test your setup with nova list.

To upload a new Ubuntu cloud image with glance, run the following command:

glance image-create --name 'Ubuntu 12.04.4 LTS' \
  --container-format bare \
  --disk-format qcow2 \
  --is-public true \

Installation on MacOS X

You need to install the following packages:

I experienced issues with Python 2.7 shipped with Mac OS. Therefore I recommend the installation of the official version from the Python team.

After the base packages are available, open the Terminal and run the following commands:

# Install pip
curl --silent |sudo python2.7

# Install Open Stack Tools
pip install python-novaclient
pip install python-glanceclient

If you have any questions contact me via Twitter @chri_hartmann or Github