createrc Command
Purpose
The createrc command is used to manage the run commands (RC) file for PowerVC.
Syntax
- To create the RC file
-
createrc set OS_USERNAME=<value> OS_PASSWORD=<value> [VAR=<value> ...] - To delete fields in the RC file
-
createrc delete OS_USERNAME [VAR_NAME ...]
Description
The createrc set command is used to create the RC file for PowerVC. The RC file is named
powervcrc in PowerVC. The
powervcrc file can have the following fields:
OS_USERNAMEOS_PASSWORDOS_REGION_NAMEOS_NETWORK_API_VERSIONOS_USER_DOMAIN_NAMEOS_IMAGE_API_VERSIONOS_PROJECT_NAMEOS_PROJECT_DOMAIN_NAMEOS_IDENTITY_API_VERSIONOS_AUTH_URLOS_COMPUTE_API_VERSIONOS_TENANT_NAMEOS_VOLUME_API_VERSIONOS_CACERT
You must provide the OS_USERNAME and OS_PASSWORD field values
while you create the RC file. A default values is updated for all the other fields if not
specified.
Subcommands
| Subcommand | Description |
|---|---|
| set | Creates the RC file for PowerVC and
sets the field values as specified. The OS_USERNAME and
OS_PASSWORD field values must be provided. All the other fields are optional. A
default value is updated for the fields that are not specified. |
| delete | Deletes the specified field entry from the RC file. |
Examples
- To create an RC file with the username as
testuserand password astestpasswd, enter the following command:createrc set OS_USERNAME=testuser OS_PASSWORD=testpasswdAn RC file with the following field entries is created:export OS_USERNAME=testuser export OS_PASSWORD=testpasswd export OS_REGION_NAME=RegionOne export OS_NETWORK_API_VERSION=2.0 export OS_USER_DOMAIN_NAME=Default export OS_IMAGE_API_VERSION=2 export OS_PROJECT_NAME=ibm-default export OS_PROJECT_DOMAIN_NAME=Default export OS_IDENTITY_API_VERSION=3 export OS_AUTH_URL=<authentication_url> export OS_COMPUTE_API_VERSION=2.46 export OS_TENANT_NAME=ibm-default export OS_VOLUME_API_VERSION=3 export OS_CACERT=/etc/pki/tls/certs/powervc.crtAll the fields, except the
OS_USERNAMEandOS_PASSWORDfield, are updated with a default value. - To delete the
OS_USERNAMEandOS_PASSWORDfields from the RC file, enter the following command:createrc delete OS_USERNAME OS_PASSWORD