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_USERNAME
  • OS_PASSWORD
  • OS_REGION_NAME
  • OS_NETWORK_API_VERSION
  • OS_USER_DOMAIN_NAME
  • OS_IMAGE_API_VERSION
  • OS_PROJECT_NAME
  • OS_PROJECT_DOMAIN_NAME
  • OS_IDENTITY_API_VERSION
  • OS_AUTH_URL
  • OS_COMPUTE_API_VERSION
  • OS_TENANT_NAME
  • OS_VOLUME_API_VERSION
  • OS_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

Table 1. 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

  1. To create an RC file with the username as testuser and password as testpasswd, enter the following command:
    createrc set OS_USERNAME=testuser OS_PASSWORD=testpasswd
    An 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.crt
    

    All the fields, except the OS_USERNAME and OS_PASSWORD field, are updated with a default value.

  2. To delete the OS_USERNAME and OS_PASSWORD fields from the RC file, enter the following command:
    createrc delete OS_USERNAME OS_PASSWORD