Advertisement
Guest User

Untitled

a guest
Jan 29th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. _OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')
  2. for param in $_OS_PARAMS; do
  3. if [ "$param" = "OS_AUTH_PROTOCOL" ]; then continue; fi
  4. if [ "$param" = "OS_CACERT" ]; then continue; fi
  5. unset $param
  6. done
  7. unset _OS_PARAMS
  8.  
  9. _keystone_unit=$(juju status keystone --format yaml | \
  10. awk '/units:$/ {getline; gsub(/:$/, ""); print $1}')
  11. _keystone_ip=$(juju run --unit ${_keystone_unit} 'unit-get private-address')
  12. _password=$(juju run --unit ${_keystone_unit} 'leader-get admin_passwd')
  13.  
  14. export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://${_keystone_ip}:5000/v3
  15. export OS_USERNAME=admin
  16. export OS_PASSWORD=${_password}
  17. export OS_USER_DOMAIN_NAME=admin_domain
  18. export OS_PROJECT_DOMAIN_NAME=admin_domain
  19. export OS_PROJECT_NAME=admin
  20. export OS_REGION_NAME=RegionOne
  21. export OS_IDENTITY_API_VERSION=3
  22. # Swift needs this:
  23. export OS_AUTH_VERSION=3
  24. # Gnocchi needs this
  25. export OS_AUTH_TYPE=password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement