6.8. Creating the cloudrc file
The Image service (glance) uses both openstack and glance client commands, within the openstackclient pod. When glance client commands are required, then the cloudrc file must be created on the openstackclient pod to enable their usage. Once created, the cloudrc file persists for the lifetime of the openstackclient pod.
Procedure
If the
cloudrcdoes not exist, for instance 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 '