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.
- Install Xcode from AppStore
- From the Terminal, run:
xcode-select --install - Install Brew (essentially a package manager that allows for easy installation of other tools).
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - Install qemu. This is very useful for converting images from one format to another. Completely optional but comes in handy when working with OpenStack
- Use brew to install python
brew install python - Install qemu - very useful for converting images from one format to another - optional but probably good to install this as well
brew install qemu - 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 - 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 - Activate the virtual environment you just created
. openstack/bin/activate - 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 - Do a test by first connecting to the environment. Download the OpenStck RC file from Access & Security >> API Access page as shown below.
- Source the RC file
. rc_filename.sh
enter your password - 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=10.100.0.33, 208.90.61.59 |
| 6ffd5640-0421-451c-81f2-4278441632e4 | oneops | ACTIVE | - | Running | trial5-shared=10.100.0.12, 208.90.61.57 |
| ef177087-8090-41b5-a3d3-d34ccb3b2fd5 | workplease | ACTIVE | - | Running | trial5-shared=10.100.0.34, 208.90.61.52 |
+--------------------------------------+------------------+--------+------------+-------------+-----------------------------------------+
(openstack) CRIVIERE-M-K0ET:piston criviere$