Installation on Linux and Mac¶
Download Maelstrom (OS X) for Mac to shoot down enemy spaceships. Join or Sign In. Sign in to add and modify your software. Continue with Facebook Continue with email. Uninstall MongoDB on Mac OS X. Ask Question Asked 6 years, 9 months ago. Active 7 months ago. Viewed 60k times 35. When I try to run mongod from the terminal, I.
When installing the CLI using pip, it is recommended to use a python virtualenvironment to contain the required dependencies. The examples below all makereference to the use of a virtual environment. If you require more informationon the basic functions of the python virtual environment, please refer to theUsing python virtual environments tutorial.
Operating system specific steps¶
Here is an outline for installing the Openstack command line tools on thecommon Linux/Unix based systems. This includes OSX as it runs a BSD basedsystem.
Using docker (experimental)¶
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 findinstructions on how to install and configure Docker here. You can run thedockerps
command to confirm Docker has been successfully installed.
Run the following command to install the Catalyst Cloud CLI:
Note
Our documentation currently refers to the CLI command as openstack
. Whenusing the containerised version of the CLI, this command must be replaced withccloud
in the provided examples.
If you are intending to use the containerised tools you will need to acquirean openRC file for authentication. To get a copy of the your projects openrcfile, select the dropdown in the upper right corner of the dashboard and clickon OpenStackRCforLinux/macOS
. Select SaveAs
when prompted, andselect 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.
Upgrading the CLI¶
To keep the command line tools up to date, you will need to perform upgradeson them after changes have come out. The following code snippet will upgradeall of the tools listed above;make sure that you have activated your virtual environment before running thecommand below:
Configuration on Linux and Mac¶
Warning
Prior to using the CLI, ensure you are working from a whitelisted IP address.More information can be found here
Source an openstack RC file¶
When no configuration arguments are passed, the OpenStack client tools will tryto obtain their configuration from environment variables. To help you definethese variables, the cloud dashboard allows you to download an OpenStack RCfile 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' fileon 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 downloadedthe file. Note that your password is not displayed on the screen as you typeit in.
If you have MFA enabled on your account, this is also where you input yourcode. If you do not have MFA enabled then simply hit
ENTER
Warning
You should never type in your password on the command line (or pass it asan argument to the client tools), because the password will be stored inplain text in the shell history file. This is unsafe and could allow apotential attacker to compromise your credentials.
You can confirm the configuration works by running a simple command, such as
openstacknetworklist
and ensuring it returns no errors.
Note
You are also able to download the Openstack RC file from the top-rightcorner where your login details are display as shown below:
Difference between OpenRC for Linux/macOS and for Windows¶
Configuration on Linux and Mac¶
Warning
Prior to using the CLI, ensure you are working from a whitelisted IP address.More information can be found here
Source an openstack RC file¶
When no configuration arguments are passed, the OpenStack client tools will tryto obtain their configuration from environment variables. To help you definethese variables, the cloud dashboard allows you to download an OpenStack RCfile 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' fileon 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 downloadedthe file. Note that your password is not displayed on the screen as you typeit in.
If you have MFA enabled on your account, this is also where you input yourcode. If you do not have MFA enabled then simply hit
ENTER
Warning
You should never type in your password on the command line (or pass it asan argument to the client tools), because the password will be stored inplain text in the shell history file. This is unsafe and could allow apotential attacker to compromise your credentials.
You can confirm the configuration works by running a simple command, such as
openstacknetworklist
and ensuring it returns no errors.
Note
You are also able to download the Openstack RC file from the top-rightcorner where your login details are display as shown below:
Difference between OpenRC for Linux/macOS and for Windows¶
Mac Os Versions
You will notice that when you go to download the OpenRC file from thedashboard there are 2 version available. One that is for Linux and Mac basedsystems, and one that is for Windows. The reason for this is because WindowsPowershell works differently than the Linux and Mac equivalent.
When authenticating with the linux/macOS open RC, you need to supply a passwordand MFA if you have it. If not, then you hit enter tocontinue and you are issued a token for authentication. This token lasts up to12 hours before you need to authenticate your details again. Powershell, doesnot work with this functionality and as such, if you do not have MFA then youneed to authenticate only with your password using the --NoToken
flag.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 storingyour password in your command line environment. This is not as secure as usinga token, but this does mean that you will not have to re-authenticate becauseof an expired token.
Using the CLI on Linux and Mac¶
Cataclysm Mac Os Catalina
This page assumes that you have installed the python virtual environment andother dependencies from the Installation on Linux and Mac page earlier in thissection of the documentation. If you have, then the following should makesense. If you want more information about how to use the python virtualenvironment then please check the Activate a virtual environment section of ourdocumentation under tutorials.
If you installed the CLI using pip:
Activate your virtual environment.
Invoke the CLI with the
openstack
command
If you installed the CLI using docker:
Invoke the CLI with the
ccloud
alias anywhere theopenstack
commandis otherwise used.
For a reference of all commands supported by the CLI, refer to the OpenStackClient documentation.
The next step¶
We highly recommend that if you are going to be using the CLI often that youtake the time to go through the documentation section on setting up yourfirst instance, using the CLI method. Itgives you a great step-by-step process to how to create an instance but alsoteaches you the common commands found in openstack and the CLI.