How to Access OpenStack Utilities from the Command Line

Published on: September 9, 2016

Setup the Shell Environment

1a. In the dashboard at https://nebula.hostdime.com a user’s account credentials can be downloaded.

[ Compute > Access & Security > API Access > Download OpenStack RC File ]

1b. Alternatively, this file can be created manually by copying and pasting these entries and filling in the variables. The tenant and project name should be the same value and is for backwards compatibility.

$ vim <USER>-openrc.sh
export OS_AUTH_URL=https://nebula.hostdime.com:5000/v3
export OS_TENANT_ID=””
export OS_TENANT_NAME=””
export OS_PROJECT_NAME=””
export OS_USERNAME=””
export OS_PASSWORD=””
export OS_REGION_NAME=”Orlando”

2. Source the variables.

$ source <USER>-openrc.sh

3. Optionally, if using Bash, have it source the OpenStack credentials when a new Bash session is started.

$ echo “source <USER>-openrc.sh” >> ~/.bashrc

Install the OpenStack Utilities

CentOS 7:

yum install centos-release-openstack-mitaka
yum install python-ceilometerclient python-cinderclient python-glanceclient python-heatclient python-keystoneclient python-neutronclient python-novaclient python-openstackclient python-swiftclient

CentOS 6 requires Python 2.7 to be installed and enabled from Red Hat’s software collections suite. Then the OpenStack clients should be installed in a virtual Python environment to seperate these packages from the system packages. In order to run the client commands in the Python 2.7 environment, a new Bash session must be created by running [ scl enable python27 bash ].

yum -y install centos-release-scl
yum -y install python27 python27-python-virtualenv
cd /usr/local/
scl enable python27 bash
virtualenv openstack
openstack/bin/pip install -U setuptools pip
openstack/bin/pip install python-cinderclient python-glanceclient python-heatclient python-keystoneclient python-neutronclient python-novaclient python-openstackclient python-swiftclient
ln /usr/local/openstack/bin/<CLIENT>/usr/local/bin/<CLIENT>

 

Ubuntu:

# apt-get install software-properties-common
# add-apt-repository cloud-archive:mitaka
# apt-get update
# apt-get install python-ceilometerclient python-cinderclient python-glanceclient python-heatclient python-keystoneclient python-neutronclient python-novaclient python-openstackclient python-swiftclient

Other:

# pip python-ceilometerclient python-cinderclient python-glanceclient python-heatclient python-keystoneclient python-neutronclient python-novaclient python-openstackclient python-swiftclient

Help

Every OpenStack command has very useful help pages. For verifying it’s usage run:

$ <COMMAND> help
$ <COMMAND>  help <OPTION>

For example, to see how to create a network simply run:

$ neutron help net-create



Back To Top