Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In the previous chapter we took a look at using OpenStack through the dashboard. Let's try to follow the same steps now, but through the use of the CLI.

Install the OpenStack client

The first step is to install the client on your VM. Below is an example of installation on CentOS7, but for more details, refer to the official documentation.

Code Block
languagebash
titleOpenStack Client
# Install the prerequisite software
$ sudo yum install python3 python3-devel python3-pip python3-setuptools
$ sudo pip3 install --upgrade setuptools
$ sudo pip3 install --upgrade pip
# Install the OpenStack client
$ pip3 install python-openstackclient
# Verify correct installation
$ openstack --version
  openstack 5.7.0

Application Credentials

Once the client has been downloaded, we need to download the login credentials from OpenStack. Let's connect to the dashboard and click on the tab Identity -> Application Credentials. Create an application credential, assigning a name and an expiration date, and download the generated openrc file. Upload it to your VM and, before launching any OpenStack client command, execute the command $ source <openrc-file>.