Setting up OpenStack CLI environment
You need to prepare your environment by defining some variables that will be used by the CLI tools when interacting with the OpenStack endpoints.
Below is a sample of an environment variable file that we can then source in our current session.
You can also navigate to the Access & Security > API Access tab in the portal to obtain the environment variables for that specific portal session. Copy and paste those into a file on your computer to later source.
After you’ve created your RC file, in your terminal session, source it:
Now activate the virtual OpenStack CLI environment. This example assumes you created the virtual environment in your home directory in “.virtualenvs/os_cli”:
You can now execute commands against the OpenStack API endpoints.
Refer to the OpenStack Client documentation for additional information on leveraging the CLI.