Configure OpenStack in charm-deployment-guide

Bug #2032697 reported by Paul Wilson
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Charms Deployment Guide

Bug Description

This bug tracker is for errors with the documentation, use the following as a template and remove or add fields as you see fit. Convert [ ] into [x] to check boxes:

- [X] This doc is inaccurate in this way:
Using juju version 3.1.5-genericlinux-amd64 the following set of commands do not work:

juju run -m openstack --unit vault/leader 'leader-get root-ca'
juju run -m openstack --unit keystone/leader 'leader-get admin_passwd'

- [X] This is a doc addition request.
- [X] I have a fix to the document that I can paste below including example: input and output.

the updated charm and juju require the commands to be modified

juju run -m openstack vault/leader get-root-ca
juju exec openstack --unit keystone/leader leader-get admin_passwd

The code for the sources ~/openstack-bundles/stable/openstack-base needs to be changed as well.

the openrc:
if [ ! -z $JUJU_MODEL ]; then
  _juju_model_arg="-m $JUJU_MODEL"
_keystone_major_version=$(juju status $_juju_model_arg keystone --format yaml| \
    awk '/^ version:/ {print $2; exit}' | cut -f1 -d\.)
_keystone_preferred_api_version=$(juju config $_juju_model_arg keystone preferred-api-version)

# The per user snap data directory is not created until first execution of snap
openstack --version 2>&1 > /dev/null || true

if [ -d ~/snap/openstackclients/common/ ]; then
  # When using the openstackclients confined snap the certificate has to be
  # placed in a location reachable by the clients in the snap.
juju run $_juju_model_arg vault/leader get-root-ca | tee $_root_ca >/dev/null 2>&1

if [ $_keystone_major_version -ge 13 -o \
     "$_keystone_preferred_api_version" = '3' ]; then
    echo Using Keystone v3 API
    . $(dirname ${BASH_SOURCE[0]})/openrcv3_project
    echo Using Keystone v2.0 API
    . $(dirname ${BASH_SOURCE[0]})/openrcv2

The openrcv3_project:
_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')
for param in $_OS_PARAMS; do
    unset $param
unset _OS_PARAMS

_keystone_vip=$(juju config $_juju_model_arg keystone vip)
if [ -n "$_keystone_vip" ]; then
    _keystone_ip=$(echo $_keystone_vip | awk '{print $1}')
    _keystone_ip=$(juju run $_juju_model_arg keystone/leader -- 'network-get --bind-address public')
_password=$(juju $_juju_model_arg exec --unit keystone/leader leader-get admin_passwd)

if [ ! -z "$_root_ca" -a -s "$_root_ca" ]; then
    export OS_AUTH_PROTOCOL=https
    export OS_CACERT=${_root_ca}
export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://${_keystone_ip}:5000/v3
export OS_USERNAME=admin
export OS_PASSWORD=${_password}
export OS_REGION_NAME=RegionOne
export OS_DOMAIN_NAME=admin_domain
export OS_USER_DOMAIN_NAME=admin_domain
# Swift needs this:
# Gnocchi needs this:
export OS_AUTH_TYPE=password

If you have a troubleshooting or support issue, use the following resources:

 - The mailing list:
 - IRC: 'openstack' channel on OFTC

Release: 0.0.1.dev511 on 2023-08-02 09:18:30
SHA: d78e6e79bf2cd0f46bbe5a12faa2febbe8998709

description: updated
description: updated
description: updated
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Thanks for the report. This was essentially a 'bug' about the differences between Juju 2.x and Juju 3.x commands; this has been overtaken by events as both the charm guide and deployment guide have been updated to juju 3.x commands.

Changed in charm-deployment-guide:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.