From 0aec82d70fa032bfe616ea5058d504f860e241f8 Mon Sep 17 00:00:00 2001 From: Andy Ning Date: Wed, 16 Jul 2014 11:37:37 -0400 Subject: 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 --- .../recipes-devtools/python/python-heat_git.bb | 45 +++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'meta-openstack/recipes-devtools/python/python-heat_git.bb') diff --git a/meta-openstack/recipes-devtools/python/python-heat_git.bb b/meta-openstack/recipes-devtools/python/python-heat_git.bb index 90a456c..fd21af2 100644 --- a/meta-openstack/recipes-devtools/python/python-heat_git.bb +++ b/meta-openstack/recipes-devtools/python/python-heat_git.bb @@ -20,6 +20,44 @@ SRCREV="45f97e6a840bbba2a467558e60549e664496633e" PV="2014.2.b1+git${SRCPV}" S = "${WORKDIR}/git" +SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-templates ${SRCNAME}-cfn" +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. + +USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" +SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" +python () { + flags = {'type':'orchestration',\ + 'description':'OpenStack Orchestration Service',\ + 'publicurl':"'http://${KEYSTONE_HOST}:8004/v1/\$(tenant_id)s'",\ + 'adminurl':"'http://${KEYSTONE_HOST}:8004/v1/\$(tenant_id)s'",\ + 'internalurl':"'http://${KEYSTONE_HOST}:8004/v1/\$(tenant_id)s'"} + + d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) +} + +# heat stack template user role +USERCREATE_PARAM_${SRCNAME}-templates = "role" +python () { + flags = {'role':'heat_stack_user'} + d.setVarFlags("USERCREATE_PARAM_%s-templates" % d.getVar('SRCNAME',True), flags) +} + +# api-cfn service +SERVICECREATE_PARAM_${SRCNAME}-cfn = "name type description region publicurl adminurl internalurl" +python () { + flags = {'name':'heat-cfn',\ + 'type':'cloudformation',\ + 'description':'OpenStack Cloudformation Service',\ + 'publicurl':"'http://${KEYSTONE_HOST}:8000/v1'",\ + 'adminurl':"'http://${KEYSTONE_HOST}:8000/v1'",\ + 'internalurl':"'http://${KEYSTONE_HOST}:8000/v1'"} + d.setVarFlags("SERVICECREATE_PARAM_%s-cfn" % d.getVar('SRCNAME',True), flags) +} + do_install_append() { TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} HEAT_CONF_DIR=${D}${sysconfdir}/${SRCNAME} @@ -89,8 +127,11 @@ inherit setuptools identity hosts update-rc.d default_configs PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" PACKAGES += "${SRCNAME}-setup" +PACKAGES += "${SRCNAME}-cfn" ALLOW_EMPTY_${SRCNAME}-setup = "1" +ALLOW_EMPTY_${SRCNAME}-templates = "1" +ALLOW_EMPTY_${SRCNAME}-cfn = "1" FILES_${PN} = "${libdir}/*" @@ -164,10 +205,12 @@ RDEPENDS_${PN} += " \ python-pbr \ " -RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-templates ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt" +RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-templates ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt ${SRCNAME}-cfn" RDEPENDS_${SRCNAME}-api = "${SRCNAME}-engine" RDEPENDS_${SRCNAME}-api-cfn = "${SRCNAME}-engine" RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-engine" +RDEPENDS_${SRCNAME}-templates = "postgresql sudo" +RDEPENDS_${SRCNAME}-cfn = "postgresql sudo" INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" INITSCRIPT_NAME_${SRCNAME}-api = "${SRCNAME}-api" -- cgit v1.2.3-54-g00ecf