• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. Developer Guide
  4. Introduction
  5. Configuring OpenStack Client

Configuring OpenStack Client

You must install the client as user root and can configure the client as a common user.

NOTICE:

The APIs can be invoked only through a secure network (VPN or from the tenant ECS). If the network is insecure, you may suffer Man-In-The-Middle attacks.

For details about how to use OpenStack Client to invoke the native APIs, see CLI-based API Invoking Examples.

Procedure

  1. In the OpenStack client installation directory, create an environment variable file, such as novarc.
  2. Use a text editor to create the environment variable file, and fill in username, password, region, IAM IP address, and port.

    An example is provided as follows:

    export OS_USERNAME="14610751 OTC00000000001000000132"

    export OS_USER_DOMAIN_NAME=OTC0000000000100000132

    export OS_ DOMAIN_NAME=OTC0000000000100000132

    #export OS_USER_DOMAIN_NAME="${OS_USERNAME##* }"

    export OS_PASSWORD=TestApi#$

    # Only change these for a different region

    export OS_TENANT_NAME=eu-de

    export OS_PROJECT_NAME=eu-de

    export OS_AUTH_URL=https://iam.eu-de.otc.t-systems.com:443/v3

    # No changes needed beyond this point

    export NOVA_ENDPOINT_TYPE=publicURL

    export OS_ENDPOINT_TYPE=publicURL

    export CINDER_ENDPOINT_TYPE=publicURL

    export OS_VOLUME_API_VERSION=2

    export OS_IDENTITY_API_VERSION=3

    export OS_IMAGE_API_VERSION=2

    Environment variables to be configured include the username, password, IAM URL, and port number. Table 1 describes the environment variables.

    Table 1 Environment variables

    Parameter

    Description

    OS_USERNAME

    Indicates the usernames used for invoking the commands.

    For details, see Obtaining the OS_USERNAME, OS_TENANT_NAME and OS_PROJECT_NAME Values.

    OS_USER_DOMAIN_NAME

    Indicates the tenant names of current users.

    For details, see Obtaining the OS_USER_DOMAIN_NAME and OS_DOMAIN_NAME Values.

    OS_DOMAIN_NAME

    Indicates the names of the current tenants.

    For details, see Obtaining the OS_USER_DOMAIN_NAME and OS_DOMAIN_NAME Values.

    OS_PASSWORD

    Indicates the passwords used for invoking the commands.

    For details, see Obtaining the OS_PASSWD Value.

    OS_TENANT_NAME

    Indicates the tenant names used for invoking the commands. For details, see Obtaining the OS_USERNAME, OS_TENANT_NAME and OS_PROJECT_NAME Values.

    OS_PROJECT_NAME

    Indicates the project names used for invoking the commands. For details, see Obtaining the OS_USERNAME, OS_TENANT_NAME and OS_PROJECT_NAME Values.

    OS_AUTH_URL

    The parameter value is in https://IAM URL:port number/API version format. For example, https://iam.eu-de.otc.t-systems.com:443/v3.

    • IAM URL: See descriptions of "endpoint" in section "Regions and Endpoints" in the Identity and Access Management API Reference.
    • Port number: 443
    • API version: v3 (current)

    NOVA_ENDPOINT_TYPE

    Indicates the end point type of Nova. This parameter is required when OpenStack commands are used. Set the value to publicURL.

    OS_ENDPOINT_TYPE

    Indicates the end point type of OS. This parameter is required when OpenStack commands are used. Set the value to publicURL.

    CINDER_ENDPOINT_TYPE

    Indicates the endpoint type of Cinder. This parameter is required when OpenStack commands are used. Set the value to publicURL.

    OS_VOLUME_API_VERSION

    Indicates the Cinder API version. Set the value to 2.

    OS_IDENTITY_API_VERSION

    Indicates the authentication API version. Set it to 3.

    OS_IMAGE_API_VERISON

    Indicates the Glance API version. Set it to 2.

  1. Run the following command to set the environment variables:

    source novarc