diff options
| author | Andy Ning <andy.ning@windriver.com> | 2014-07-16 11:37:37 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-07-30 00:50:59 -0400 |
| commit | 0aec82d70fa032bfe616ea5058d504f860e241f8 (patch) | |
| tree | cd88ce4f6c7ac88308b85d1ce66941877978cc51 /meta-openstack/recipes-devtools/python/python-nova_git.bb | |
| parent | ceecd0d46de35111f4c3c1e65176e09cb2117ecb (diff) | |
| download | meta-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.bb | 34 |
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 | ||
| 34 | LIBVIRT_IMAGES_TYPE ?= "default" | 34 | LIBVIRT_IMAGES_TYPE ?= "default" |
| 35 | 35 | ||
| 36 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-ec2" | ||
| 37 | KEYSTONE_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 | |||
| 43 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
| 44 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
| 45 | python () { | ||
| 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 | ||
| 55 | SERVICECREATE_PARAM_${SRCNAME}-ec2 = "name type description region publicurl adminurl internalurl" | ||
| 56 | python () { | ||
| 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 | |||
| 36 | do_install_append() { | 66 | do_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" | |||
| 174 | PACKAGES += " ${SRCNAME}-cert" | 204 | PACKAGES += " ${SRCNAME}-cert" |
| 175 | PACKAGES += " ${SRCNAME}-conductor" | 205 | PACKAGES += " ${SRCNAME}-conductor" |
| 176 | PACKAGES += " ${SRCNAME}-api" | 206 | PACKAGES += " ${SRCNAME}-api" |
| 207 | PACKAGES += " ${SRCNAME}-ec2" | ||
| 177 | 208 | ||
| 178 | PACKAGECONFIG ?= "bash-completion" | 209 | PACKAGECONFIG ?= "bash-completion" |
| 179 | PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion python-nova-bash-completion" | 210 | PACKAGECONFIG[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 | ||
| 185 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 216 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
| 217 | ALLOW_EMPTY_${SRCNAME}-ec2 = "1" | ||
| 186 | 218 | ||
| 187 | FILES_${PN} = "${libdir}/*" | 219 | FILES_${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 | ||
| 280 | RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \ | 312 | RDEPENDS_${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 \ | |||
| 291 | RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-oslo.messaging \ | 324 | RDEPENDS_${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" |
| 293 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" | 326 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" |
| 327 | RDEPENDS_${SRCNAME}-ec2 = "postgresql sudo ${SRCNAME}-common" | ||
| 294 | 328 | ||
| 295 | RDEPENDS_${SRCNAME}-tests = " \ | 329 | RDEPENDS_${SRCNAME}-tests = " \ |
| 296 | python-coverage \ | 330 | python-coverage \ |
