Setting environment variables

The openstack CLI needs several pieces of information about the PowerVC deployment in order to work. You can provide this information by using CLI arguments, but it is easier to set environment variables before using the CLI. PowerVC includes the /opt/ibm/powervc/powervcrc file to simplify this task.

The powervcrc file comes configured with default values that match your PowerVC environment. It does not set the administrator's user name or password. Follow these steps to use powervcrc:
  1. Copy the file to your user's home directory and edit it as necessary. In particular, set these values:
    • OS_USERNAME - Your user name
    • OS_PASSWORD - Your password
    • OS_PROJECT_NAME - If you have multiple projects, specify the project you want to access.
    • OS_TENANT_NAME - If you have multiple projects, specify the project you want to access.
    Note: If you add your password to this file, restrict the file permissions so that other users will not be able to read it. Alternatively, you can choose to not set OS_PASSWORD. In this case, the openstack CLI prompts you for the password when run.
    Example file after editing:
    export OS_AUTH_URL=
    export OS_CACERT=/etc/pki/tls/certs/powervc.crt
    export OS_REGION_NAME=RegionOne
    export OS_PROJECT_DOMAIN_NAME=Default
    export OS_PROJECT_NAME=ibm-default
    export OS_TENANT_NAME=ibm-default
    export OS_USER_DOMAIN_NAME=Default
    export OS_USERNAME=admin
    export OS_PASSWORD=passw0rd
    export OS_COMPUTE_API_VERSION=2.37
  2. Before using the openstack CLI run source powervcrc to set the environment variables.