Skip to main content

OpenStack CLI

Vietnix Cloud exposes an OpenStack-compatible API. That means the standard openstack client works against it, so you can script the same operations you see in the console and in the API reference.

This section uses python-openstackclient only. It does not wrap the commands, so anything you learn here also works with OpenStack tooling and CI systems.

Install​

python3 -m pip install --user python-openstackclient
openstack --version

Python 3.8 or newer is recommended. If openstack is not on your PATH, add the user bin directory printed by pip.

Authenticate​

The identity endpoint is:

https://auth.vietnix.cloud:5000/v3

The minimum set of environment variables is:

export OS_AUTH_URL=https://auth.vietnix.cloud:5000/v3
export OS_USERNAME="<username>"
export OS_PASSWORD="<password>"
export OS_USER_DOMAIN_NAME="<domain>"
export OS_PROJECT_NAME="<project>"
export OS_PROJECT_DOMAIN_NAME="<domain>"
export OS_IDENTITY_API_VERSION=3

Then check that the token is issued:

openstack token issue
openstack flavor list
openstack image list

The next page shows the same values in an openrc file and in clouds.yaml.

2FA

If your account enforces two-factor authentication, password login from the CLI may be rejected. Ask Vietnix for an application credential or a service account for automation, and keep that credential out of the repository. Do not disable 2FA on a personal account to work around this.

What is next​