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-31 15:15:31 -0400
commitbe2e56c0bbd019e450beca62f1cad13cf5fe37e4 (patch)
tree7cbf2f17513a79242709706558af68682100bc00 /meta-openstack/recipes-devtools/python/python-nova_git.bb
parentf300718c549178e924699d4b8de7f98a7bad6375 (diff)
downloadmeta-cloud-services-be2e56c0bbd019e450beca62f1cad13cf5fe37e4.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 7b390d3..e3174fb 100644
--- a/meta-openstack/recipes-devtools/python/python-nova_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb
@@ -35,6 +35,36 @@ inherit update-rc.d setuptools identity hosts useradd default_configs
35 35
36LIBVIRT_IMAGES_TYPE ?= "default" 36LIBVIRT_IMAGES_TYPE ?= "default"
37 37
38SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-ec2"
39KEYSTONE_HOST="${CONTROLLER_IP}"
40
41# USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set.
42# If the flag for a parameter in the list is not set here, the default value will be given to that parameter.
43# Parameters not in the list will be set to empty.
44
45USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
46SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
47python () {
48 flags = {'type':'compute',\
49 'description':'OpenStack Compute Service',\
50 'publicurl':"'http://${KEYSTONE_HOST}:8774/v2/\$(tenant_id)s'",\
51 'adminurl':"'http://${KEYSTONE_HOST}:8774/v2/\$(tenant_id)s'",\
52 'internalurl':"'http://${KEYSTONE_HOST}:8774/v2/\$(tenant_id)s'"}
53 d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags)
54}
55
56# ec2 is provided by nova-api
57SERVICECREATE_PARAM_${SRCNAME}-ec2 = "name type description region publicurl adminurl internalurl"
58python () {
59 flags = {'name':'ec2',\
60 'type':'ec2',\
61 'description':'OpenStack EC2 Service',\
62 'publicurl':"'http://${KEYSTONE_HOST}:8773/services/Cloud'",\
63 'adminurl':"'http://${KEYSTONE_HOST}:8773/services/Admin'",\
64 'internalurl':"'http://${KEYSTONE_HOST}:8773/services/Cloud'"}
65 d.setVarFlags("SERVICECREATE_PARAM_%s-ec2" % d.getVar('SRCNAME',True), flags)
66}
67
38do_install_append() { 68do_install_append() {
39 if [ ! -f "${WORKDIR}/nova.conf" ]; then 69 if [ ! -f "${WORKDIR}/nova.conf" ]; then
40 return 70 return
@@ -172,6 +202,7 @@ PACKAGES += " ${SRCNAME}-scheduler"
172PACKAGES += " ${SRCNAME}-cert" 202PACKAGES += " ${SRCNAME}-cert"
173PACKAGES += " ${SRCNAME}-conductor" 203PACKAGES += " ${SRCNAME}-conductor"
174PACKAGES += " ${SRCNAME}-api" 204PACKAGES += " ${SRCNAME}-api"
205PACKAGES += " ${SRCNAME}-ec2"
175 206
176PACKAGECONFIG ?= "bash-completion" 207PACKAGECONFIG ?= "bash-completion"
177PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion python-nova-bash-completion" 208PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion python-nova-bash-completion"
@@ -181,6 +212,7 @@ FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"
181 212
182 213
183ALLOW_EMPTY_${SRCNAME}-setup = "1" 214ALLOW_EMPTY_${SRCNAME}-setup = "1"
215ALLOW_EMPTY_${SRCNAME}-ec2 = "1"
184 216
185FILES_${PN} = "${libdir}/*" 217FILES_${PN} = "${libdir}/*"
186 218
@@ -273,6 +305,7 @@ RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \
273 iptables curl dnsmasq sudo procps" 305 iptables curl dnsmasq sudo procps"
274 306
275RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \ 307RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \
308 ${SRCNAME}-ec2 \
276 ${SRCNAME}-consoleauth \ 309 ${SRCNAME}-consoleauth \
277 ${SRCNAME}-novncproxy \ 310 ${SRCNAME}-novncproxy \
278 ${SRCNAME}-spicehtml5proxy \ 311 ${SRCNAME}-spicehtml5proxy \
@@ -286,6 +319,7 @@ RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \
286RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common \ 319RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common \
287 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh" 320 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh"
288RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" 321RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common"
322RDEPENDS_${SRCNAME}-ec2 = "postgresql sudo ${SRCNAME}-common"
289 323
290RDEPENDS_${SRCNAME}-tests = " \ 324RDEPENDS_${SRCNAME}-tests = " \
291 python-coverage \ 325 python-coverage \