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 | |
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>
11 files changed, 298 insertions, 19 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-barbican_git.bb b/meta-openstack/recipes-devtools/python/python-barbican_git.bb index b0d32ae..86b86e6 100644 --- a/meta-openstack/recipes-devtools/python/python-barbican_git.bb +++ b/meta-openstack/recipes-devtools/python/python-barbican_git.bb | |||
@@ -21,6 +21,24 @@ S = "${WORKDIR}/git" | |||
21 | 21 | ||
22 | inherit update-rc.d setuptools identity hosts useradd default_configs | 22 | inherit update-rc.d setuptools identity hosts useradd default_configs |
23 | 23 | ||
24 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | ||
25 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
26 | |||
27 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
28 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
29 | # Parameters not in the list will be set to empty. | ||
30 | |||
31 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
32 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
33 | python () { | ||
34 | flags = {'type':'keystore',\ | ||
35 | 'description':'Barbican Key Management Service',\ | ||
36 | 'publicurl':"'http://${KEYSTONE_HOST}:9311/v1'",\ | ||
37 | 'adminurl':"'http://${KEYSTONE_HOST}:9312/v1'",\ | ||
38 | 'internalurl':"'http://${KEYSTONE_HOST}:9313/v1'"} | ||
39 | d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
40 | } | ||
41 | |||
24 | do_install_append() { | 42 | do_install_append() { |
25 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} | 43 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} |
26 | BARBICAN_CONF_DIR=${D}${sysconfdir}/${SRCNAME} | 44 | BARBICAN_CONF_DIR=${D}${sysconfdir}/${SRCNAME} |
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb index c3354c0..6e58cac 100644 --- a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb +++ b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb | |||
@@ -23,6 +23,32 @@ S = "${WORKDIR}/git" | |||
23 | 23 | ||
24 | CEILOMETER_SECRET ?= "12121212" | 24 | CEILOMETER_SECRET ?= "12121212" |
25 | 25 | ||
26 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-reseller" | ||
27 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
28 | |||
29 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
30 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
31 | # Parameters not in the list will be set to empty. | ||
32 | |||
33 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
34 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
35 | python () { | ||
36 | flags = {'type':'metering',\ | ||
37 | 'description':'OpenStack Metering Service',\ | ||
38 | 'publicurl':"'http://${KEYSTONE_HOST}:8777/'",\ | ||
39 | 'adminurl':"'http://${KEYSTONE_HOST}:8777/'",\ | ||
40 | 'internalurl':"'http://${KEYSTONE_HOST}:8777/'"} | ||
41 | |||
42 | d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
43 | } | ||
44 | |||
45 | # Add service user to service tenant as ResellerAdmin role | ||
46 | USERCREATE_PARAM_${SRCNAME}-reseller = "name pass tenant role email" | ||
47 | python () { | ||
48 | flags = {'role':'ResellerAdmin'} | ||
49 | d.setVarFlags("USERCREATE_PARAM_%s-reseller" % d.getVar('SRCNAME',True), flags) | ||
50 | } | ||
51 | |||
26 | do_configure_append() { | 52 | do_configure_append() { |
27 | # We are using postgresql support, hence this requirement is not valid | 53 | # We are using postgresql support, hence this requirement is not valid |
28 | # removing it, to avoid on-target runtime issues | 54 | # removing it, to avoid on-target runtime issues |
@@ -104,8 +130,10 @@ PACKAGES += "${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-api" | |||
104 | PACKAGES += "${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator" | 130 | PACKAGES += "${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator" |
105 | PACKAGES += "${SRCNAME}-agent-notification" | 131 | PACKAGES += "${SRCNAME}-agent-notification" |
106 | PACKAGES += "${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" | 132 | PACKAGES += "${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" |
133 | PACKAGES += " ${SRCNAME}-reseller" | ||
107 | 134 | ||
108 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 135 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
136 | ALLOW_EMPTY_${SRCNAME}-reseller = "1" | ||
109 | 137 | ||
110 | FILES_${PN} = "${libdir}/*" | 138 | FILES_${PN} = "${libdir}/*" |
111 | 139 | ||
@@ -199,12 +227,13 @@ RDEPENDS_${PN} += " \ | |||
199 | python-pysnmp \ | 227 | python-pysnmp \ |
200 | " | 228 | " |
201 | 229 | ||
202 | RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common ${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator ${SRCNAME}-agent-notification \ | 230 | RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common ${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator ${SRCNAME}-agent-notification ${SRCNAME}-reseller \ |
203 | postgresql postgresql-client python-psycopg2 tgt" | 231 | postgresql postgresql-client python-psycopg2 tgt" |
204 | RDEPENDS_${SRCNAME}-api = "${SRCNAME}-controller" | 232 | RDEPENDS_${SRCNAME}-api = "${SRCNAME}-controller" |
205 | RDEPENDS_${SRCNAME}-collector = "${SRCNAME}-controller" | 233 | RDEPENDS_${SRCNAME}-collector = "${SRCNAME}-controller" |
206 | RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-ceilometerclient libvirt" | 234 | RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-ceilometerclient libvirt" |
207 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-controller" | 235 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-controller" |
236 | RDEPENDS_${SRCNAME}-reseller = "postgresql sudo ${SRCNAME}-controller" | ||
208 | 237 | ||
209 | INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" | 238 | INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" |
210 | INITSCRIPT_PACKAGES += "${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator ${SRCNAME}-agent-notification" | 239 | INITSCRIPT_PACKAGES += "${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator ${SRCNAME}-agent-notification" |
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb index 2d7e76c..acabfa0 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb | |||
@@ -24,10 +24,29 @@ SRCREV="81259f36f57e91b31009fbd209ea2a07a2ceb213" | |||
24 | PV="2013.2.3+git${SRCPV}" | 24 | PV="2013.2.3+git${SRCPV}" |
25 | S = "${WORKDIR}/git" | 25 | S = "${WORKDIR}/git" |
26 | 26 | ||
27 | inherit setuptools update-rc.d identity default_configs | 27 | inherit setuptools update-rc.d identity default_configs hosts |
28 | 28 | ||
29 | CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" | 29 | CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" |
30 | 30 | ||
31 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | ||
32 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
33 | |||
34 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
35 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
36 | # Parameters not in the list will be set to empty. | ||
37 | |||
38 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
39 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
40 | python () { | ||
41 | flags = {'type':'volume',\ | ||
42 | 'description':'OpenStack Volume Service',\ | ||
43 | 'publicurl':"'http://${KEYSTONE_HOST}:8776/v1/\$(tenant_id)s'",\ | ||
44 | 'adminurl':"'http://${KEYSTONE_HOST}:8776/v1/\$(tenant_id)s'",\ | ||
45 | 'internalurl':"'http://${KEYSTONE_HOST}:8776/v1/\$(tenant_id)s'"} | ||
46 | |||
47 | d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
48 | } | ||
49 | |||
31 | do_install_prepend() { | 50 | do_install_prepend() { |
32 | sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/conf_fixture.py | 51 | sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/conf_fixture.py |
33 | sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/fake_flags.py | 52 | sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/fake_flags.py |
diff --git a/meta-openstack/recipes-devtools/python/python-glance_git.bb b/meta-openstack/recipes-devtools/python/python-glance_git.bb index 57ad34c..1f94939 100644 --- a/meta-openstack/recipes-devtools/python/python-glance_git.bb +++ b/meta-openstack/recipes-devtools/python/python-glance_git.bb | |||
@@ -17,10 +17,29 @@ PV="2013.2.3+git${SRCPV}" | |||
17 | 17 | ||
18 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
19 | 19 | ||
20 | inherit setuptools update-rc.d identity default_configs | 20 | inherit setuptools update-rc.d identity default_configs hosts |
21 | 21 | ||
22 | GLANCE_DEFAULT_STORE ?= "file" | 22 | GLANCE_DEFAULT_STORE ?= "file" |
23 | 23 | ||
24 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | ||
25 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
26 | |||
27 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
28 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
29 | # Parameters not in the list will be set to empty. | ||
30 | |||
31 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
32 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
33 | python () { | ||
34 | flags = {'type':'image',\ | ||
35 | 'description':'OpenStack Image Service',\ | ||
36 | 'publicurl':"'http://${KEYSTONE_HOST}:9292/v2'",\ | ||
37 | 'adminurl':"'http://${KEYSTONE_HOST}:9292/v2'",\ | ||
38 | 'internalurl':"'http://${KEYSTONE_HOST}:9292/v2'"} | ||
39 | |||
40 | d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
41 | } | ||
42 | |||
24 | do_install_prepend() { | 43 | do_install_prepend() { |
25 | sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/functional/__init__.py | 44 | sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/functional/__init__.py |
26 | sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/unit/base.py | 45 | sed 's:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g' -i ${S}/${SRCNAME}/tests/unit/base.py |
diff --git a/meta-openstack/recipes-devtools/python/python-heat_git.bb b/meta-openstack/recipes-devtools/python/python-heat_git.bb index 8b7db6a..176cfa1 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="58de9e6415f5bdabde708c8584b21b59b7e96a88" | |||
20 | PV="2013.2.3+git${SRCPV}" | 20 | PV="2013.2.3+git${SRCPV}" |
21 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
22 | 22 | ||
23 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-templates ${SRCNAME}-cfn" | ||
24 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
25 | |||
26 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
27 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
28 | # Parameters not in the list will be set to empty. | ||
29 | |||
30 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
31 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
32 | python () { | ||
33 | flags = {'type':'orchestration',\ | ||
34 | 'description':'OpenStack Orchestration Service',\ | ||
35 | 'publicurl':"'http://${KEYSTONE_HOST}:8004/v1/\$(tenant_id)s'",\ | ||
36 | 'adminurl':"'http://${KEYSTONE_HOST}:8004/v1/\$(tenant_id)s'",\ | ||
37 | 'internalurl':"'http://${KEYSTONE_HOST}:8004/v1/\$(tenant_id)s'"} | ||
38 | |||
39 | d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
40 | } | ||
41 | |||
42 | # heat stack template user role | ||
43 | USERCREATE_PARAM_${SRCNAME}-templates = "role" | ||
44 | python () { | ||
45 | flags = {'role':'heat_stack_user'} | ||
46 | d.setVarFlags("USERCREATE_PARAM_%s-templates" % d.getVar('SRCNAME',True), flags) | ||
47 | } | ||
48 | |||
49 | # api-cfn service | ||
50 | SERVICECREATE_PARAM_${SRCNAME}-cfn = "name type description region publicurl adminurl internalurl" | ||
51 | python () { | ||
52 | flags = {'name':'heat-cfn',\ | ||
53 | 'type':'cloudformation',\ | ||
54 | 'description':'OpenStack Cloudformation Service',\ | ||
55 | 'publicurl':"'http://${KEYSTONE_HOST}:8000/v1'",\ | ||
56 | 'adminurl':"'http://${KEYSTONE_HOST}:8000/v1'",\ | ||
57 | 'internalurl':"'http://${KEYSTONE_HOST}:8000/v1'"} | ||
58 | d.setVarFlags("SERVICECREATE_PARAM_%s-cfn" % d.getVar('SRCNAME',True), flags) | ||
59 | } | ||
60 | |||
23 | do_install_append() { | 61 | do_install_append() { |
24 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} | 62 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} |
25 | HEAT_CONF_DIR=${D}${sysconfdir}/${SRCNAME} | 63 | HEAT_CONF_DIR=${D}${sysconfdir}/${SRCNAME} |
@@ -89,8 +127,11 @@ inherit setuptools identity hosts update-rc.d default_configs | |||
89 | 127 | ||
90 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" | 128 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" |
91 | PACKAGES += "${SRCNAME}-setup" | 129 | PACKAGES += "${SRCNAME}-setup" |
130 | PACKAGES += "${SRCNAME}-cfn" | ||
92 | 131 | ||
93 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | 132 | ALLOW_EMPTY_${SRCNAME}-setup = "1" |
133 | ALLOW_EMPTY_${SRCNAME}-templates = "1" | ||
134 | ALLOW_EMPTY_${SRCNAME}-cfn = "1" | ||
94 | 135 | ||
95 | FILES_${PN} = "${libdir}/*" | 136 | FILES_${PN} = "${libdir}/*" |
96 | 137 | ||
@@ -164,10 +205,12 @@ RDEPENDS_${PN} += " \ | |||
164 | python-pbr \ | 205 | python-pbr \ |
165 | " | 206 | " |
166 | 207 | ||
167 | RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-templates ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt" | 208 | RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-templates ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt ${SRCNAME}-cfn" |
168 | RDEPENDS_${SRCNAME}-api = "${SRCNAME}-engine" | 209 | RDEPENDS_${SRCNAME}-api = "${SRCNAME}-engine" |
169 | RDEPENDS_${SRCNAME}-api-cfn = "${SRCNAME}-engine" | 210 | RDEPENDS_${SRCNAME}-api-cfn = "${SRCNAME}-engine" |
170 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-engine" | 211 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-engine" |
212 | RDEPENDS_${SRCNAME}-templates = "postgresql sudo" | ||
213 | RDEPENDS_${SRCNAME}-cfn = "postgresql sudo" | ||
171 | 214 | ||
172 | INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" | 215 | INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" |
173 | INITSCRIPT_NAME_${SRCNAME}-api = "${SRCNAME}-api" | 216 | INITSCRIPT_NAME_${SRCNAME}-api = "${SRCNAME}-api" |
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_git.bb b/meta-openstack/recipes-devtools/python/python-keystone_git.bb index 96ce440..ec5d775 100644 --- a/meta-openstack/recipes-devtools/python/python-keystone_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystone_git.bb | |||
@@ -31,6 +31,33 @@ TOKEN_FORMAT ?= "PKI" | |||
31 | 31 | ||
32 | LDAP_DN ?= "dc=my-domain,dc=com" | 32 | LDAP_DN ?= "dc=my-domain,dc=com" |
33 | 33 | ||
34 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | ||
35 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
36 | |||
37 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
38 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
39 | # Parameters not in the list will be set to empty. | ||
40 | |||
41 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
42 | python () { | ||
43 | flags = {'name':'${ADMIN_USER}',\ | ||
44 | 'pass':'${ADMIN_PASSWORD}',\ | ||
45 | 'tenant':'${ADMIN_TENANT}',\ | ||
46 | 'role':'${ADMIN_ROLE}',\ | ||
47 | 'email':'${ADMIN_USER_EMAIL}',\ | ||
48 | } | ||
49 | d.setVarFlags("USERCREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
50 | } | ||
51 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
52 | python () { | ||
53 | flags = {'type':'identity',\ | ||
54 | 'description':'OpenStack Identity',\ | ||
55 | 'publicurl':"'http://${KEYSTONE_HOST}:5000/v2.0'",\ | ||
56 | 'adminurl':"'http://${KEYSTONE_HOST}:35357/v2.0'",\ | ||
57 | 'internalurl':"'http://${KEYSTONE_HOST}:5000/v2.0'"} | ||
58 | d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
59 | } | ||
60 | |||
34 | do_install_append() { | 61 | do_install_append() { |
35 | 62 | ||
36 | KEYSTONE_CONF_DIR=${D}${sysconfdir}/keystone | 63 | KEYSTONE_CONF_DIR=${D}${sysconfdir}/keystone |
@@ -41,7 +68,7 @@ do_install_append() { | |||
41 | install -d ${D}${localstatedir}/log/${SRCNAME} | 68 | install -d ${D}${localstatedir}/log/${SRCNAME} |
42 | 69 | ||
43 | install -m 600 ${WORKDIR}/keystone.conf ${KEYSTONE_CONF_DIR}/ | 70 | install -m 600 ${WORKDIR}/keystone.conf ${KEYSTONE_CONF_DIR}/ |
44 | install -m 600 ${WORKDIR}/identity.sh ${KEYSTONE_CONF_DIR}/ | 71 | install -m 755 ${WORKDIR}/identity.sh ${KEYSTONE_CONF_DIR}/ |
45 | install -m 600 ${WORKDIR}/openrc ${KEYSTONE_CONF_DIR}/ | 72 | install -m 600 ${WORKDIR}/openrc ${KEYSTONE_CONF_DIR}/ |
46 | install -m 600 ${S}/etc/logging.conf.sample ${KEYSTONE_CONF_DIR}/logging.conf | 73 | install -m 600 ${S}/etc/logging.conf.sample ${KEYSTONE_CONF_DIR}/logging.conf |
47 | install -m 600 ${S}/etc/policy.json ${KEYSTONE_CONF_DIR}/policy.json | 74 | install -m 600 ${S}/etc/policy.json ${KEYSTONE_CONF_DIR}/policy.json |
@@ -124,20 +151,15 @@ pkg_postinst_${SRCNAME}-setup () { | |||
124 | sleep 2 | 151 | sleep 2 |
125 | fi | 152 | fi |
126 | 153 | ||
127 | sudo -u postgres createdb keystone | 154 | # This is to make sure keystone is configured and running |
128 | keystone-manage db_sync | 155 | PIDFILE="/var/run/keystone-all.pid" |
129 | keystone-manage pki_setup --keystone-user=root --keystone-group=root | 156 | if [ -z `cat $PIDFILE 2>/dev/null` ]; then |
157 | sudo -u postgres createdb keystone | ||
158 | keystone-manage db_sync | ||
159 | keystone-manage pki_setup --keystone-user=root --keystone-group=root | ||
130 | 160 | ||
131 | # Create users, services and endpoints | 161 | /etc/init.d/keystone start |
132 | /etc/init.d/keystone start | 162 | fi |
133 | sleep 2 | ||
134 | |||
135 | ADMIN_PASSWORD=${ADMIN_PASSWORD} \ | ||
136 | SERVICE_PASSWORD=${SERVICE_PASSWORD} \ | ||
137 | SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME} \ | ||
138 | bash /etc/keystone/identity.sh | ||
139 | |||
140 | # end python-keystone postinst | ||
141 | } | 163 | } |
142 | 164 | ||
143 | # By default tokens are expired after 1 day so by default we can set | 165 | # By default tokens are expired after 1 day so by default we can set |
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb index c1c67d5..f59d111 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
@@ -26,6 +26,25 @@ S = "${WORKDIR}/git" | |||
26 | 26 | ||
27 | inherit setuptools update-rc.d identity hosts default_configs | 27 | inherit setuptools update-rc.d identity hosts default_configs |
28 | 28 | ||
29 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | ||
30 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
31 | |||
32 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
33 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
34 | # Parameters not in the list will be set to empty. | ||
35 | |||
36 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
37 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
38 | python () { | ||
39 | flags = {'type':'network',\ | ||
40 | 'description':'OpenStack Networking service',\ | ||
41 | 'publicurl':"'http://${KEYSTONE_HOST}:9696/'",\ | ||
42 | 'adminurl':"'http://${KEYSTONE_HOST}:9696/'",\ | ||
43 | 'internalurl':"'http://${KEYSTONE_HOST}:9696/'"} | ||
44 | |||
45 | d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
46 | } | ||
47 | |||
29 | do_install_append() { | 48 | do_install_append() { |
30 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/ | 49 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/ |
31 | NEUTRON_CONF_DIR=${D}${sysconfdir}/neutron | 50 | NEUTRON_CONF_DIR=${D}${sysconfdir}/neutron |
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 \ |
diff --git a/meta-openstack/recipes-devtools/python/python-swift_git.bb b/meta-openstack/recipes-devtools/python/python-swift_git.bb index 19c056f..43ba8dd 100644 --- a/meta-openstack/recipes-devtools/python/python-swift_git.bb +++ b/meta-openstack/recipes-devtools/python/python-swift_git.bb | |||
@@ -30,6 +30,25 @@ inherit setuptools python-dir update-rc.d hosts identity | |||
30 | # filesystem of must support xattrs. e.g ext4 | 30 | # filesystem of must support xattrs. e.g ext4 |
31 | SWIFT_BACKING_FILE_SIZE ?= "2G" | 31 | SWIFT_BACKING_FILE_SIZE ?= "2G" |
32 | 32 | ||
33 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | ||
34 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
35 | |||
36 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
37 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
38 | # Parameters not in the list will be set to empty. | ||
39 | |||
40 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
41 | SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl" | ||
42 | python () { | ||
43 | flags = {'type':'object-store',\ | ||
44 | 'description':'OpenStack object-store',\ | ||
45 | 'publicurl':"'http://${KEYSTONE_HOST}:8888/v1/AUTH_\$(tenant_id)s'",\ | ||
46 | 'adminurl':"'http://${KEYSTONE_HOST}:8888/v1'",\ | ||
47 | 'internalurl':"'http://${KEYSTONE_HOST}:8888/v1/AUTH_\$(tenant_id)s'"} | ||
48 | |||
49 | d.setVarFlags("SERVICECREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
50 | } | ||
51 | |||
33 | do_install_append() { | 52 | do_install_append() { |
34 | SWIFT_CONF_DIR=${D}${sysconfdir}/swift | 53 | SWIFT_CONF_DIR=${D}${sysconfdir}/swift |
35 | 54 | ||
diff --git a/meta-openstack/recipes-extended/images/openstack-image-controller.bb b/meta-openstack/recipes-extended/images/openstack-image-controller.bb index 36b5b7a..d2cc90f 100644 --- a/meta-openstack/recipes-extended/images/openstack-image-controller.bb +++ b/meta-openstack/recipes-extended/images/openstack-image-controller.bb | |||
@@ -16,9 +16,11 @@ IMAGE_INSTALL = "\ | |||
16 | " | 16 | " |
17 | 17 | ||
18 | IMAGE_FEATURES += " ssh-server-openssh" | 18 | IMAGE_FEATURES += " ssh-server-openssh" |
19 | POST_KEYSTONE_SETUP_COMMAND = "/etc/keystone/hybrid-backend-setup" | ||
19 | 20 | ||
20 | inherit core-image | 21 | inherit core-image |
21 | inherit openstack-base | 22 | inherit openstack-base |
23 | inherit identity | ||
22 | 24 | ||
23 | # Ensure extra space for guest images, and rabbit MQ has a hard coded | 25 | # Ensure extra space for guest images, and rabbit MQ has a hard coded |
24 | # check for 2G of free space, so we use 5G as a starting point. | 26 | # check for 2G of free space, so we use 5G as a starting point. |
diff --git a/meta-openstack/recipes-extended/tempest/tempest_git.bb b/meta-openstack/recipes-extended/tempest/tempest_git.bb index ae388d9..3667635 100644 --- a/meta-openstack/recipes-extended/tempest/tempest_git.bb +++ b/meta-openstack/recipes-extended/tempest/tempest_git.bb | |||
@@ -21,6 +21,49 @@ SRCREV="6273339e2da725b01560b6a2db11a3bf7a6659d7" | |||
21 | PV="2013.2+git${SRCPV}" | 21 | PV="2013.2+git${SRCPV}" |
22 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
23 | 23 | ||
24 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-setup-altdemo ${SRCNAME}-setup-admin" | ||
25 | KEYSTONE_HOST="${CONTROLLER_IP}" | ||
26 | |||
27 | # USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set. | ||
28 | # If the flag for a parameter in the list is not set here, the default value will be given to that parameter. | ||
29 | # Parameters not in the list will be set to empty. | ||
30 | |||
31 | # create demo user | ||
32 | USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email" | ||
33 | python () { | ||
34 | flags = {'name':'demo',\ | ||
35 | 'pass':'password',\ | ||
36 | 'tenant':'demo',\ | ||
37 | 'role':'${MEMBER_ROLE}',\ | ||
38 | 'email':'demo@domain.com',\ | ||
39 | } | ||
40 | d.setVarFlags("USERCREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags) | ||
41 | } | ||
42 | |||
43 | # create alt-demo user | ||
44 | USERCREATE_PARAM_${SRCNAME}-setup-altdemo = "name pass tenant role email" | ||
45 | python () { | ||
46 | flags = {'name':'alt_demo',\ | ||
47 | 'pass':'password',\ | ||
48 | 'tenant':'alt_demo',\ | ||
49 | 'role':'${MEMBER_ROLE}',\ | ||
50 | 'email':'alt_demo@domain.com',\ | ||
51 | } | ||
52 | d.setVarFlags("USERCREATE_PARAM_%s-setup-altdemo" % d.getVar('SRCNAME',True), flags) | ||
53 | } | ||
54 | |||
55 | # add admin user to demo tenant as admin role | ||
56 | USERCREATE_PARAM_${SRCNAME}-setup-admin = "name pass tenant role email" | ||
57 | python () { | ||
58 | flags = {'name':'${ADMIN_USER}',\ | ||
59 | 'pass':'${ADMIN_PASSWORD}',\ | ||
60 | 'tenant':'demo',\ | ||
61 | 'role':'${ADMIN_ROLE}',\ | ||
62 | 'email':'${ADMIN_USER_EMAIL}',\ | ||
63 | } | ||
64 | d.setVarFlags("USERCREATE_PARAM_%s-setup-admin" % d.getVar('SRCNAME',True), flags) | ||
65 | } | ||
66 | |||
24 | do_install_append() { | 67 | do_install_append() { |
25 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/ | 68 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/ |
26 | TEMPEST_CONF_DIR=${D}${sysconfdir}/${SRCNAME} | 69 | TEMPEST_CONF_DIR=${D}${sysconfdir}/${SRCNAME} |
@@ -60,15 +103,27 @@ do_install_append() { | |||
60 | cp -r tools ${TEMPEST_CONF_DIR} | 103 | cp -r tools ${TEMPEST_CONF_DIR} |
61 | } | 104 | } |
62 | 105 | ||
63 | PACKAGES =+ "${SRCNAME}-tests" | 106 | PACKAGES =+ "${SRCNAME}-tests \ |
107 | ${SRCNAME}-setup \ | ||
108 | ${SRCNAME}-setup-altdemo \ | ||
109 | ${SRCNAME}-setup-admin \ | ||
110 | " | ||
64 | 111 | ||
65 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*" | 112 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*" |
66 | 113 | ||
67 | FILES_${PN} = "${libdir}/* \ | 114 | FILES_${PN} = "${libdir}/* \ |
68 | ${sysconfdir}/* \ | 115 | ${sysconfdir}/* \ |
69 | " | 116 | " |
117 | |||
118 | ALLOW_EMPTY_${SRCNAME}-setup = "1" | ||
119 | ALLOW_EMPTY_${SRCNAME}-setup-altdemo = "1" | ||
120 | ALLOW_EMPTY_${SRCNAME}-setup-admin = "1" | ||
121 | |||
70 | RDEPENDS_${PN} += " \ | 122 | RDEPENDS_${PN} += " \ |
71 | ${SRCNAME}-tests \ | 123 | ${SRCNAME}-tests \ |
124 | ${SRCNAME}-setup \ | ||
125 | ${SRCNAME}-setup-altdemo \ | ||
126 | ${SRCNAME}-setup-admin \ | ||
72 | python-mox \ | 127 | python-mox \ |
73 | python-mock \ | 128 | python-mock \ |
74 | python-hp3parclient \ | 129 | python-hp3parclient \ |