Use the OpenStack Client

This page:


If you wish to avoid using the dashboard and perform actions from the command line (particularly if you wish to script certain actions), you can instead use the OpenStack client.

Information on using the OpenStack client can be found here: https://docs.openstack.org/developer/python-openstackclient/

Installation


Depending on your operating system, the OpenStack client should be available through the default repositories (these are run as root, or using sudo privileges):

  • Ubuntu 16.04: apt-get install openstack
  • Ubuntu 17.10: apt-get install python3-openstackclient
  • CentOS 7: pip install python-openstackclient
  • MacOS: pip install python-openstackclient
    • Note for MacOS: If you need to install missing packages, Homebrew (https://brew.sh/) a missing package manager for MacOS can assist with this.

More information on installing the client can be found here: https://docs.openstack.org/user-guide/common/cli-install-openstack-command-line-clients.html


Windows 10 Users - Ubuntu Bash Shell (WSL):

If you are running Windows 10, you can optionally install the Ubuntu Bash Shell (Currently Ubuntu 14.04) - See the MSDN page for details and installation instructions. Once installed, the following commands can be used to install the OpenStack CLI client:

# Install dependencies to install the OpenStack client
sudo apt-get update
sudo apt-get install -y python-pip  #apt-get install -y python3-pip
sudo apt-get install -y build-essential
sudo apt-get install -y python-dev libxslt1-dev libxml2-dev #apt-get install -y python3-dev libxslt1-dev libxml2-dev

# Install the OpenStack client
pip install python-openstackclient #pip install python3-openstackclient


Credentials


While potentially you can input your user credentials on the command line every time you run openstack, the simpler (and more secure) option is to put your credentials into a file which you read from before using the CLI. First log in to the Nimbus dashboard, where you can download your Nimbus credentials file by clicking on your username in the top right corner and selecting "OpenStack RC File v3" (save it as something like nimbus-rc).


Once created, you can load your credentials by running:

. nimbus-rc

Running your Nimbus credentials file will prompt you to input your Pawsey account password (NOTE: be aware that your password will then be available in plaintext in the environment variable OS_PASSWORD, until you either log out or unset that variable).