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-31 15:15:31 -0400 |
| commit | be2e56c0bbd019e450beca62f1cad13cf5fe37e4 (patch) | |
| tree | 7cbf2f17513a79242709706558af68682100bc00 /meta-openstack/recipes-devtools/python/python-nova_git.bb | |
| parent | f300718c549178e924699d4b8de7f98a7bad6375 (diff) | |
| download | meta-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.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 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 | ||
| 36 | LIBVIRT_IMAGES_TYPE ?= "default" | 36 | LIBVIRT_IMAGES_TYPE ?= "default" |
| 37 | 37 | ||
| 38 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-ec2" | ||
| 39 | KEYSTONE_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 | |||
| 45 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
| 46 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
| 47 | python () { | ||
| 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 | ||
| 57 | SERVICECREATE_PARAM_${SRCNAME}-ec2 = "name type description region publicurl adminurl internalurl" | ||
| 58 | python () { | ||
| 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 | |||
| 38 | do_install_append() { | 68 | do_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" | |||
| 172 | PACKAGES += " ${SRCNAME}-cert" | 202 | PACKAGES += " ${SRCNAME}-cert" |
| 173 | PACKAGES += " ${SRCNAME}-conductor" | 203 | PACKAGES += " ${SRCNAME}-conductor" |
| 174 | PACKAGES += " ${SRCNAME}-api" | 204 | PACKAGES += " ${SRCNAME}-api" |
| 205 | PACKAGES += " ${SRCNAME}-ec2" | ||
| 175 | 206 | ||
| 176 | PACKAGECONFIG ?= "bash-completion" | 207 | PACKAGECONFIG ?= "bash-completion" |
| 177 | PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion python-nova-bash-completion" | 208 | PACKAGECONFIG[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 | ||
| 183 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 214 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
| 215 | ALLOW_EMPTY_${SRCNAME}-ec2 = "1" | ||
| 184 | 216 | ||
| 185 | FILES_${PN} = "${libdir}/*" | 217 | FILES_${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 | ||
| 275 | RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \ | 307 | RDEPENDS_${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 \ | |||
| 286 | RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common \ | 319 | RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common \ |
| 287 | qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh" | 320 | qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh" |
| 288 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" | 321 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" |
| 322 | RDEPENDS_${SRCNAME}-ec2 = "postgresql sudo ${SRCNAME}-common" | ||
| 289 | 323 | ||
| 290 | RDEPENDS_${SRCNAME}-tests = " \ | 324 | RDEPENDS_${SRCNAME}-tests = " \ |
| 291 | python-coverage \ | 325 | python-coverage \ |
