3.13. Creating the cloudrc file
You can use openstack or cinder client commands for the Block Storage service (cinder) within the openstackclient pod. However you must create the cloudrc file on the openstackclient pod if you want to use cinder client commands. The cloudrc file that you create persists for the lifetime of the openstackclient pod.
Procedure
If the
cloudrcdoes not exist, or it cannot be sourced, then use the following command to create it:$ oc rsh openstackclient bash -c ' cat .config/openstack/* | while read key val; do case $key in "auth_url:") var=OS_AUTH_URL ;; "username:") var=OS_USERNAME ;; "password:") var=OS_PASSWORD ;; "project_name:") var=OS_PROJECT_NAME ;; "project_domain_name:") var=OS_PROJECT_DOMAIN_NAME ;; "user_domain_name:") var=OS_USER_DOMAIN_NAME ;; *) var="" ;; esac [ -z "$var" ] || echo "export ${var}=${val}" done > cloudrc '