Skip to main content
OpenStack CLI
Last update:

OpenStack CLI

The OpenStack CLI is a console client for working with the OpenStack API. Through the OpenStack CLI in Selectel, you can manage your cloud infrastructure: servers, placement groups, network volumes, networks, images, and load balancers.

Product documentation via the OpenStack CLI can be found under the OpenStack tab in instructions such as Create cloud server or Connect disk.

The current versions of the components that are supported in Selectel can be viewed in the OpenStack Component Versions table.

The OpenStack CLI can be installed on your local system.

  1. Install the OpenStack CLI and additional packages. If you want to use a Docker container to work with the OpenStack CLI, you do not need to perform this step.
  2. Create a service user to authorize to the OpenStack API.
  3. Configure OpenStack API authorization.

OpenStack component versions

Release versionAPI version
NovaZed2.1 (maximum microversion is 2.93)
CinderWallaby3.0 (maximum microversion is 3.64)

Install OpenStack CLI

  1. Open the CLI.

  2. Install the OpenStack CLI:

    sudo apt update
    sudo apt install python3-openstackclient
  3. Verify that the OpenStack CLI is installed:

    openstack --version

    The version number will appear in the response.

  4. Optional: Install additional packages for OpenStack components:

    apt install python3-<compoment>client

    Specify <compoment> is the name of the component:

    • octavia — to work with load balancers;
    • glance is for working with images.

Create a service user

To authorize in the OpenStack API, you need to create a service user with the role Project Administrator or Project Viewer and add it to cloud platform project.

  1. From the control panel in the upper right corner, open the menu (account number) and select Profile & Settings.

  2. Go to User Management.

  3. Click Add User.

  4. Select the Service User type.

  5. Enter a username. It will be used during authorization.

  6. Enter a password for the user or generate one.

  7. Save password — once a user is created, you cannot view the password, only change it.

  8. Select user role:

    • Project administrator — can create, edit and delete project resources;
    • Project Viewer — can view project resources.
  9. Check the projects to which you want to add the user.

  10. Click Add User.

Set up authorization

To authorize in the OpenStack API, you need to add environment variables. In Unix systems (Ubuntu, Debian, CentOS and macOS), you need to run a script from an RC file that can be downloaded from the control panel, in Windows you need to add variables manually.

Authorization in the OpenStack API can only be configured for a single service user, cloud platform project, and pool. If necessary, you can change the authorization data.

  1. In Control Panel, go to Cloud PlatformAccess.

  2. Open the External Access tab.

  3. Select created service user with the role of Project Administrator or Project Supervisor.

  4. Select pool. Only this pool will be able to manage the infrastructure of the project.

  5. Click Download.

  6. On the local system, navigate to the directory with the downloaded RC file:

    cd <directory_name>

    Specify <directory_name> — the name of the directory with the RC file.

  7. Run the script from the RC file:

    source <>

    Specify <> is the name of the RC file, the default is

  8. Enter the OpenStack password — the password of the service user for which the RC file was created.

  9. Check the OpenStack CLI operation, for example, open the list of cloud servers:

    openstack server list

    If cloud servers have been created in the pool and project that are specified in the RC file, a list of them will appear in the command output. If no servers have been created yet, the output of the command will be an empty string.

Change authorization data

To change the authorization details:

  • set new values for the environment variables. For Ubuntu, Debian, CentOS and macOS, change the variables in the RC file; for Windows, set the values directly;
  • pass the new values in OpenStack CLI commands with keys. For example, use the --os-region-name key to change the pool. A list of all options and examples can be found in the Options section of the OpenStack documentation.