mercredi 31 mai 2017

Install Command Line Interface for openstack on MacOSX Sierra 10.12.5

The documents present in the openstack server to install Command Line Interface are not uptodate for MacOSX:
https://docs.openstack.org/user-guide/common/cli-install-openstack-command-line-clients.html

 Here is the solution. It has been tested in Sierra 10.12.5.

First be sure that you have python install. In terminal, enter:
belinda:~ marcgirondot$ python --version
Python 2.7.13

Any version higher than 2.7 should work. If you have not, when installing Xcode, python should be included.

Install Xcode from app store (take care, it is 4 GB !)
https://itunes.apple.com/fr/app/xcode/id497799835?mt=12

Open Xcode from application folder and install line command tools in terminal:
sudo xcode-select --install

Validate the installation in terminal using:
sudo xcodebuild -license

Install pip:
sudo easy_install pip

Upgrade pip:
sudo -H pip install --upgrade pip --ignore-installed six

Install different components of openstack:

# Installation 
sudo -H pip install python-openstackclient --ignore-installed six

sudo -H pip install --upgrade python-novaclient --ignore-installed six
sudo -H pip install --upgrade python-cinderclient --ignore-installed six
sudo -H pip install --upgrade python-neutronclient --ignore-installed six
sudo -H pip install --upgrade python-glanceclient --ignore-installed six
# for nova
sudo -H pip install --upgrade netifaces --ignore-installed six

To run it, you must define environment variables as described here:
https://docs.openstack.org/user-guide/common/cli-set-environment-variables-using-openstack-rc.html

It works for me !

To upgrade openstack client:
sudo -H pip install --upgrade python-openstackclient --ignore-installed six