From f793205c73a006734b84c708f49049a1067f6b6a Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Fri, 1 Dec 2017 15:13:33 -0500 Subject: python-keystone: generate admin-openrc In order to interact with the openstack CLI commands it is common practice to source *openrc files which populate the environment with a base set of values. See https://docs.openstack.org/keystone/pike/install/keystone-openrc-obs.html We used to do this as part of nova but it makes more sense to create these as part of keystone. This makes them available early in the setup process and also maps with the keystone bootstrapping. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- meta-openstack/recipes-devtools/python/python-keystone_git.bb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'meta-openstack/recipes-devtools/python/python-keystone_git.bb') diff --git a/meta-openstack/recipes-devtools/python/python-keystone_git.bb b/meta-openstack/recipes-devtools/python/python-keystone_git.bb index c3437cd..118574b 100644 --- a/meta-openstack/recipes-devtools/python/python-keystone_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystone_git.bb @@ -13,6 +13,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/pike \ file://identity.sh \ file://convert_keystone_backend.py \ file://wsgi-keystone.conf \ + file://admin-openrc \ " # TBD: update or drop @@ -92,6 +93,13 @@ do_install_append() { sed -e "s:%ADMIN_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${KS_INIT_FILE} sed -e "s:%ADMIN_ROLE%:${ADMIN_ROLE}:g" -i ${KS_INIT_FILE} + # Setup the admin-openrc file + KS_OPENRC_FILE=${KEYSTONE_CONF_DIR}/admin-openrc + install -m 600 ${WORKDIR}/admin-openrc ${KS_OPENRC_FILE} + sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${KS_OPENRC_FILE} + sed -e "s:%ADMIN_USER%:${ADMIN_USER}:g" -i ${KS_OPENRC_FILE} + sed -e "s:%ADMIN_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${KS_OPENRC_FILE} + # Install various configuration files. We have to select suitable # permissions as packages such as Apache require read access. # -- cgit v1.2.3-54-g00ecf