summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova_git.bb
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 00:50:59 -0400
commit0aec82d70fa032bfe616ea5058d504f860e241f8 (patch)
treecd88ce4f6c7ac88308b85d1ce66941877978cc51 /meta-openstack/recipes-devtools/python/python-nova_git.bb
parentceecd0d46de35111f4c3c1e65176e09cb2117ecb (diff)
downloadmeta-cloud-services-0aec82d70fa032bfe616ea5058d504f860e241f8.tar.gz
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-devtools/python/python-nova_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_git.bb34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb
index 517fe99..07dac6a 100644
--- a/meta-openstack/recipes-devtools/python/python-nova_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb
@@ -33,6 +33,36 @@ inherit update-rc.d setuptools identity hosts useradd default_configs
33 33
34LIBVIRT_IMAGES_TYPE ?= "default" 34LIBVIRT_IMAGES_TYPE ?= "default"
35 35
36SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-ec2"
37KEYSTONE_HOST="${CONTROLLER_IP}"
38
39# USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set.
40# If the flag for a parameter in the list is not set here, the default value will be given to that parameter.
41# Parameters not in the list will be set to empty.
42
43USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
44SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
45python () {
46 flags = {'type':'compute',\
47 'description':'OpenStack Compute Service',\
48 'publicurl':"'http://${KEYSTONE_HOST}:8774/v2/\$(tenant_id)s'",\
49 'adminurl':"'http://${KEYSTONE_HOST}:8774/v2/\$(tenant_id)s'",\
50 'internalurl':"'http://${KEYSTONE_HOST}:8774/v2/\$(tenant_id)s'"}
51 d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags)
52}
53
54# ec2 is provided by nova-api
55SERVICECREATE_PARAM_${SRCNAME}-ec2 = "name type description region publicurl adminurl internalurl"
56python () {
57 flags = {'name':'ec2',\
58 'type':'ec2',\
59 'description':'OpenStack EC2 Service',\
60 'publicurl':"'http://${KEYSTONE_HOST}:8773/services/Cloud'",\
61 'adminurl':"'http://${KEYSTONE_HOST}:8773/services/Admin'",\
62 'internalurl':"'http://${KEYSTONE_HOST}:8773/services/Cloud'"}
63 d.setVarFlags("SERVICECREATE_PARAM_%s-ec2" % d.getVar('SRCNAME',True), flags)
64}
65
36do_install_append() { 66do_install_append() {
37 if [ ! -f "${WORKDIR}/nova.conf" ]; then 67 if [ ! -f "${WORKDIR}/nova.conf" ]; then
38 return 68 return
@@ -174,6 +204,7 @@ PACKAGES += " ${SRCNAME}-scheduler"
174PACKAGES += " ${SRCNAME}-cert" 204PACKAGES += " ${SRCNAME}-cert"
175PACKAGES += " ${SRCNAME}-conductor" 205PACKAGES += " ${SRCNAME}-conductor"
176PACKAGES += " ${SRCNAME}-api" 206PACKAGES += " ${SRCNAME}-api"
207PACKAGES += " ${SRCNAME}-ec2"
177 208
178PACKAGECONFIG ?= "bash-completion" 209PACKAGECONFIG ?= "bash-completion"
179PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion python-nova-bash-completion" 210PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion python-nova-bash-completion"
@@ -183,6 +214,7 @@ FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"
183 214
184 215
185ALLOW_EMPTY_${SRCNAME}-setup = "1" 216ALLOW_EMPTY_${SRCNAME}-setup = "1"
217ALLOW_EMPTY_${SRCNAME}-ec2 = "1"
186 218
187FILES_${PN} = "${libdir}/*" 219FILES_${PN} = "${libdir}/*"
188 220
@@ -278,6 +310,7 @@ RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \
278 iptables curl dnsmasq sudo procps" 310 iptables curl dnsmasq sudo procps"
279 311
280RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \ 312RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \
313 ${SRCNAME}-ec2 \
281 ${SRCNAME}-consoleauth \ 314 ${SRCNAME}-consoleauth \
282 ${SRCNAME}-novncproxy \ 315 ${SRCNAME}-novncproxy \
283 ${SRCNAME}-spicehtml5proxy \ 316 ${SRCNAME}-spicehtml5proxy \
@@ -291,6 +324,7 @@ RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \
291RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-oslo.messaging \ 324RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-oslo.messaging \
292 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh" 325 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh"
293RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" 326RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common"
327RDEPENDS_${SRCNAME}-ec2 = "postgresql sudo ${SRCNAME}-common"
294 328
295RDEPENDS_${SRCNAME}-tests = " \ 329RDEPENDS_${SRCNAME}-tests = " \
296 python-coverage \ 330 python-coverage \