VK Cloud logo
Updated atMarch 20, 2024   06:18 AM

OpenStack CLI

The OpenStack Command line interface (OpenStack CLI) allows you to work with VK Cloud platform services via the console. To use the OpenStack CLI, install the OpenStack client and authenticate.

1. Install the OpenStack client

1sudo apt update
2sudo apt install python3-openstackclient

2. Install additional packages

If necessary, install packages to work with individual OpenStack services:

pip install python-<service name>client

Service names:

  • cinder – block storage API and extensions;
  • glance – images API;
  • heat – orchestration API;
  • manila – shared file systems API;
  • neutron – network API;
  • nova – cloud computing (VM) and extensions API;
  • octavia — load balancer API;
  • sahara – Cloud Big Data processing API.

3. Complete authentication

  1. Go to personal account VK Cloud.

  2. Make sure that two-factor authentication and API access are enabled.

  3. Select a project.

  4. On the page Project settings go to the tab API access.

  5. Click Download openrc version 3. A file <project name>-openrc.sh will be uploaded.

  6. Specify the authentication credentials in the environment variables.

    1. Run the script execution:

      source <project name>-openrc.sh
    2. Enter the password of the project user.

4. Check if the OpenStack CLI is ready to work

  1. Check the availability of the OpenStack client:

    openstack --version

    If the OpenStack client is installed, its version will be displayed in the console output.

  2. Make sure that the environment variables match the project by running the command:

    env | grep OS_

    The environment variables must contain authentication credentials corresponding to the project.

  3. Run the command that uses the OpenStack client. For example:

    openstack project list

    The console output should display a list of available projects.

Examples of OpenStack CLI commands

  • View the list of available flavors:

    openstack flavor list
  • Output information about a separate image:

    openstack image show c6320138-035f-40d8-XXXX-e814edb2ce5f