When installing the CLI using pip, it is recommended to use a python virtual environment to contain the required dependencies. The examples below all make reference to the use of a virtual environment. If you require more information on the basic functions of the python virtual environment, please refer to the Using python virtual environments tutorial.
Here is an outline for installing the Openstack command line tools on the common Linux/Unix based systems. This includes OSX as it runs a BSD based system.
The Catalyst Cloud CLI is available as a Docker container that is easy to use, packaging the command line interface and all its dependencies.
This tool requires Docker to be installed to function. You can find
instructions on how to install and configure Docker here. You can run the
docker ps command to confirm Docker has been successfully installed.
Run the following command to install the Catalyst Cloud CLI:
bash <(wget -qO - https://raw.githubusercontent.com/catalyst-cloud/openstackclient-container/master/fetch-installer.sh) -a ccloud -u https://api.cloud.catalyst.net.nz:5000/v3
Our documentation currently refers to the CLI command as
using the containerised version of the CLI, this command must be replaced with
ccloud in the provided examples.
If you are intending to use the containerised tools you will need to acquire
an openRC file for authentication. To get a copy of the your projects openrc
file, select the dropdown in the upper right corner of the dashboard and click
OpenStack RC for Linux/macOS. Select
Save As when prompted, and
select the location on your machine to save this file to.
If you need more information on using the file see Source an openstack RC file.
To keep the command line tools up to date, you will need to perform upgrades on them after changes have come out. The following code snippet will upgrade all of the tools listed above; make sure that you have activated your virtual environment before running the command below:
pip install --upgrade pip \ python-openstackclient \ python-ceilometerclient \ python-heatclient \ python-neutronclient \ python-swiftclient \ python-octaviaclient \ python-magnumclient \ aodhclient
Prior to using the CLI, ensure you are working from a whitelisted IP address. More information can be found here
When no configuration arguments are passed, the OpenStack client tools will try to obtain their configuration from environment variables. To help you define these variables, the cloud dashboard allows you to download an OpenStack RC file from which you can easily source the required configuration.
To download an OpenStack RC file from the dashboard:
Log in to your project on the dashboard and select your preferred region.
From the left hand menu select “API Access” and click on “Download OpenStack RC File”. Save the “OpenStack RC for Linux/macOS” file on to the host where the client tools are going to be used from.
Source the configuration from the OpenStack RC file:
When prompted for a password, enter the password of the user who downloaded the file. Note that your password is not displayed on the screen as you type it in.
If you have MFA enabled on your account, this is also where you input your
code. If you do not have MFA enabled then simply hit
You should never type in your password on the command line (or pass it as an argument to the client tools), because the password will be stored in plain text in the shell history file. This is unsafe and could allow a potential attacker to compromise your credentials.
You can confirm the configuration works by running a simple command, such as
openstack network list and ensuring it returns no errors.
You are also able to download the Openstack RC file from the top-right corner where your login details are display as shown below:
You will notice that when you go to download the OpenRC file from the dashboard there are 2 version available. One that is for Linux and Mac based systems, and one that is for Windows. The reason for this is because Windows Powershell works differently than the Linux and Mac equivalent.
When authenticating with the linux/macOS open RC, you need to supply a password
and MFA if you have it. If not, then you hit enter to
continue and you are issued a token for authentication. This token lasts up to
12 hours before you need to authenticate your details again. Powershell, does
not work with this functionality and as such, if you do not have MFA then you
need to authenticate only with your password using the
This is discussed more in the Setting up the command line environment on Windows section.
This means that for Windows users authenticating without MFA, you are storing your password in your command line environment. This is not as secure as using a token, but this does mean that you will not have to re-authenticate because of an expired token.
This page assumes that you have installed the python virtual environment and other dependencies from the Installation on Linux and Mac page earlier in this section of the documentation. If you have, then the following should make sense. If you want more information about how to use the python virtual environment then please check the Activate a virtual environment section of our documentation under tutorials.
If you installed the CLI using pip:
Activate your virtual environment.
Invoke the CLI with the
If you installed the CLI using docker:
Invoke the CLI with the
ccloud alias anywhere the
is otherwise used.
For a reference of all commands supported by the CLI, refer to the OpenStack Client documentation.
We highly recommend that if you are going to be using the CLI often that you take the time to go through the documentation section on setting up your first instance, using the CLI method. It gives you a great step-by-step process to how to create an instance but also teaches you the common commands found in openstack and the CLI.