aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-extended
diff options
context:
space:
mode:
authorAndy Ning <andy.ning@windriver.com>2014-07-16 11:37:37 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-07-30 10:46:55 -0400
commit354e385c90a6005271eb69102cd2818cdee27237 (patch)
tree0cc96bc649c9cc567c58191e0d520b1db7f3933f /meta-openstack/recipes-extended
parent5d5ffe95e8abe4503e9908bc0cab2ac60cd28144 (diff)
downloadmeta-cloud-services-354e385c90a6005271eb69102cd2818cdee27237.tar.gz
meta-cloud-services-354e385c90a6005271eb69102cd2818cdee27237.tar.bz2
meta-cloud-services-354e385c90a6005271eb69102cd2818cdee27237.zip
Keystone: package service/user additions
Instead of creating tenant/user/role and service/endpoint for all openstack services in keystone postinstall, now each of the services creates its own keystone identities by queueing them up in its postinstall to a file /etc/keystone/service-user-setup. service-user-setup script, when run as the last postinstall, calls identity.sh with keystone identity parameters to create necessary identities for the services. Signed-off-by: Andy Ning <andy.ning@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-extended')
-rw-r--r--meta-openstack/recipes-extended/images/openstack-image-controller.bb2
-rw-r--r--meta-openstack/recipes-extended/tempest/tempest_git.bb57
2 files changed, 58 insertions, 1 deletions
diff --git a/meta-openstack/recipes-extended/images/openstack-image-controller.bb b/meta-openstack/recipes-extended/images/openstack-image-controller.bb
index 36b5b7a..d2cc90f 100644
--- a/meta-openstack/recipes-extended/images/openstack-image-controller.bb
+++ b/meta-openstack/recipes-extended/images/openstack-image-controller.bb
@@ -16,9 +16,11 @@ IMAGE_INSTALL = "\
"
IMAGE_FEATURES += " ssh-server-openssh"
+POST_KEYSTONE_SETUP_COMMAND = "/etc/keystone/hybrid-backend-setup"
inherit core-image
inherit openstack-base
+inherit identity
# Ensure extra space for guest images, and rabbit MQ has a hard coded
# check for 2G of free space, so we use 5G as a starting point.
diff --git a/meta-openstack/recipes-extended/tempest/tempest_git.bb b/meta-openstack/recipes-extended/tempest/tempest_git.bb
index 75d8340..c7003a3 100644
--- a/meta-openstack/recipes-extended/tempest/tempest_git.bb
+++ b/meta-openstack/recipes-extended/tempest/tempest_git.bb
@@ -18,6 +18,49 @@ SRCREV="50af5d5ecc7d21d5e0d1a36fa564ef4850cf94ff"
PV="2014.1+git${SRCPV}"
S = "${WORKDIR}/git"
+SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-setup-altdemo ${SRCNAME}-setup-admin"
+KEYSTONE_HOST="${CONTROLLER_IP}"
+
+# USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set.
+# If the flag for a parameter in the list is not set here, the default value will be given to that parameter.
+# Parameters not in the list will be set to empty.
+
+# create demo user
+USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
+python () {
+ flags = {'name':'demo',\
+ 'pass':'password',\
+ 'tenant':'demo',\
+ 'role':'${MEMBER_ROLE}',\
+ 'email':'demo@domain.com',\
+ }
+ d.setVarFlags("USERCREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags)
+}
+
+# create alt-demo user
+USERCREATE_PARAM_${SRCNAME}-setup-altdemo = "name pass tenant role email"
+python () {
+ flags = {'name':'alt_demo',\
+ 'pass':'password',\
+ 'tenant':'alt_demo',\
+ 'role':'${MEMBER_ROLE}',\
+ 'email':'alt_demo@domain.com',\
+ }
+ d.setVarFlags("USERCREATE_PARAM_%s-setup-altdemo" % d.getVar('SRCNAME',True), flags)
+}
+
+# add admin user to demo tenant as admin role
+USERCREATE_PARAM_${SRCNAME}-setup-admin = "name pass tenant role email"
+python () {
+ flags = {'name':'${ADMIN_USER}',\
+ 'pass':'${ADMIN_PASSWORD}',\
+ 'tenant':'demo',\
+ 'role':'${ADMIN_ROLE}',\
+ 'email':'${ADMIN_USER_EMAIL}',\
+ }
+ d.setVarFlags("USERCREATE_PARAM_%s-setup-admin" % d.getVar('SRCNAME',True), flags)
+}
+
do_install_append() {
TEMPLATE_CONF_DIR=${S}${sysconfdir}/
TEMPEST_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
@@ -57,7 +100,11 @@ do_install_append() {
cp -r tools ${TEMPEST_CONF_DIR}
}
-PACKAGES =+ "${SRCNAME}-tests"
+PACKAGES =+ "${SRCNAME}-tests \
+ ${SRCNAME}-setup \
+ ${SRCNAME}-setup-altdemo \
+ ${SRCNAME}-setup-admin \
+ "
FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*"
@@ -65,8 +112,16 @@ FILES_${PN} = "${libdir}/* \
${sysconfdir}/* \
${bindir}/* \
"
+
+ALLOW_EMPTY_${SRCNAME}-setup = "1"
+ALLOW_EMPTY_${SRCNAME}-setup-altdemo = "1"
+ALLOW_EMPTY_${SRCNAME}-setup-admin = "1"
+
RDEPENDS_${PN} += " \
${SRCNAME}-tests \
+ ${SRCNAME}-setup \
+ ${SRCNAME}-setup-altdemo \
+ ${SRCNAME}-setup-admin \
python-mox \
python-mock \
python-hp3parclient \