Installing OpenStack CLI tools in OSX for use with Metapod

Blog Post created by criviere on Feb 3, 2016

We have found it can be a bit tricky to get the OpenStack CLI tools working correctly with Metapod since making the API endpoints secure. They are very easy to install in Ubuntu but a bit more difficult to install with OSX. I thought it might be a good idea to document and share this with others. Also credit to the Metapod OPS team for helping out with this.

  1. Install Xcode from AppStore
  2. From the Terminal, run:
    xcode-select --install
  3. Install Brew (essentially a package manager that allows for easy installation of other tools).
    ruby -e "$(curl -fsSL"

  4. Install qemu. This is very useful for converting images from one format to another. Completely optional but comes in handy when working with OpenStack
  5. Use brew to install python
    brew install python
  6. Install qemu - very useful for converting images from one format to another - optional but probably good to install this as well
    brew install qemu
  7. Use pip to install virtualenv - this allows the next packages we install to be self-contained within a virtual environment so we don't risk messing with some of OSX's core files
    pip install virtualenv
  8. Create your virtual environment. In this example, I will call my environment "openstack" and I am running the following command from my home directory.
    virtualenv -p /usr/local/bin/python --no-site-packages openstack
  9. Activate the virtual environment you just created
    . openstack/bin/activate
  10. Now we can finally install the OpenStack CLI tools!!
    pip install python-novaclient
    pip install python-glanceclient
    pip install python-cinderclient==1.0.9
    pip install python-keystoneclient
    pip install python-neutronclient
  11. Do a test by first connecting to the environment. Download the OpenStck RC file from Access & Security >> API Access page as shown below.

  12. Source the RC file
    your password
  13. Run a test command. For instance, the one below will show us all VMs in our tenant. You should see similar output to below.
    nova list

(openstack) CRIVIERE-M-K0ET:piston criviere$ nova list


| ID                                   | Name             | Status | Task State | Power State | Networks                                |


| 95099acb-623a-46ac-b5ea-0e4ef312068b | leostream-broker | ACTIVE | -          | Running     | trial5-shared=, |

| 6ffd5640-0421-451c-81f2-4278441632e4 | oneops           | ACTIVE | -          | Running     | trial5-shared=, |

| ef177087-8090-41b5-a3d3-d34ccb3b2fd5 | workplease       | ACTIVE | -          | Running     | trial5-shared=, |


(openstack) CRIVIERE-M-K0ET:piston criviere$