Connecting to OpenStack command-line interface

For managing the compute cluster, you can also use the OpenStack command-line client, which is automatically installed along with the Virtuozzo Hybrid Infrastructure.

To connect to and be able to use the OpenStack CLI

  1. Locate the node with the management role in the admin panel. Open the Infrastructure > Nodes screen. The management node runs the Admin panel service.
  2. Access the management node via SSH and log in as the service user. For example:

    # ssh node001.vstoragedomain
    # su - vstoradmin
  3. Generate the admin OpenRC script that sets environment variables:

    # kolla-ansible post-deploy

    The command will create the /etc/kolla/ bash script:

    export OS_PROJECT_DOMAIN_NAME=Default
    export OS_USER_DOMAIN_NAME=Default
    export OS_PROJECT_NAME=admin
    export OS_USERNAME=vstorage-service-user
    export OS_PASSWORD=<password>
    export OS_AUTH_URL=https://<MN_IP_address>:5000/v3
    export OS_AUTH_TYPE=password
    export OS_INSECURE=true
    export PYTHONWARNINGS="ignore:Unverified HTTPS request is being made"

    By default, the script is created to authorize OpenStack commands in the admin project under the vstorage-service-user user for managing the compute cluster with administrative privileges.

  4. To perform administrative actions, run this script:

    You need to run the script each session.

    # source /etc/kolla/

If you want to work in another project under another user, you need to make changes to the script. For example, to authorize OpenStack commands in the myproject project under the myuser user within the mydomain domain, do the following:

  1. Copy the script to the chosen directory with a new name. For example:

    # cp /etc/kolla/ /root/
  2. Open the copied script for editing and change the first five variables as follows:

    export OS_PROJECT_DOMAIN_NAME=mydomain
    export OS_USER_DOMAIN_NAME=mydomain
    export OS_PROJECT_NAME=myproject
    export OS_USERNAME=myuser
    export OS_PASSWORD=<myuser_password>

    Leave other variables as is and save your changes.

  3. Run the modified script:

    You need to run the script each session.

    # source /root/

Now you can work in the project you have authorized in by executing OpenStack commands with the --insecure option. For example:

# openstack --insecure server list
| ID                  | Name | Status | Networks               | Image | Flavor |
| 32b0f95d-477f-<...> | vm1  | ACTIVE | private= |       | tiny   |