summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--meta-openstack/recipes-devtools/python/python-barbican_git.bb18
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer_git.bb31
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb21
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_git.bb21
-rw-r--r--meta-openstack/recipes-devtools/python/python-heat_git.bb45
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone_git.bb50
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutron_git.bb19
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_git.bb34
-rw-r--r--meta-openstack/recipes-devtools/python/python-swift_git.bb19
-rw-r--r--meta-openstack/recipes-extended/images/openstack-image-controller.bb2
-rw-r--r--meta-openstack/recipes-extended/tempest/tempest_git.bb57
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
22inherit update-rc.d setuptools identity hosts useradd default_configs 22inherit update-rc.d setuptools identity hosts useradd default_configs
23 23
24SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
25KEYSTONE_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
31USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
32SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
33python () {
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
24do_install_append() { 42do_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
24CEILOMETER_SECRET ?= "12121212" 24CEILOMETER_SECRET ?= "12121212"
25 25
26SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-reseller"
27KEYSTONE_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
33USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
34SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
35python () {
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
46USERCREATE_PARAM_${SRCNAME}-reseller = "name pass tenant role email"
47python () {
48 flags = {'role':'ResellerAdmin'}
49 d.setVarFlags("USERCREATE_PARAM_%s-reseller" % d.getVar('SRCNAME',True), flags)
50}
51
26do_configure_append() { 52do_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"
104PACKAGES += "${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator" 130PACKAGES += "${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator"
105PACKAGES += "${SRCNAME}-agent-notification" 131PACKAGES += "${SRCNAME}-agent-notification"
106PACKAGES += "${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" 132PACKAGES += "${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller"
133PACKAGES += " ${SRCNAME}-reseller"
107 134
108ALLOW_EMPTY_${SRCNAME}-setup = "1" 135ALLOW_EMPTY_${SRCNAME}-setup = "1"
136ALLOW_EMPTY_${SRCNAME}-reseller = "1"
109 137
110FILES_${PN} = "${libdir}/*" 138FILES_${PN} = "${libdir}/*"
111 139
@@ -199,12 +227,13 @@ RDEPENDS_${PN} += " \
199 python-pysnmp \ 227 python-pysnmp \
200 " 228 "
201 229
202RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common ${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator ${SRCNAME}-agent-notification \ 230RDEPENDS_${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"
204RDEPENDS_${SRCNAME}-api = "${SRCNAME}-controller" 232RDEPENDS_${SRCNAME}-api = "${SRCNAME}-controller"
205RDEPENDS_${SRCNAME}-collector = "${SRCNAME}-controller" 233RDEPENDS_${SRCNAME}-collector = "${SRCNAME}-controller"
206RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-ceilometerclient libvirt" 234RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-ceilometerclient libvirt"
207RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-controller" 235RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-controller"
236RDEPENDS_${SRCNAME}-reseller = "postgresql sudo ${SRCNAME}-controller"
208 237
209INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" 238INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller"
210INITSCRIPT_PACKAGES += "${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator ${SRCNAME}-agent-notification" 239INITSCRIPT_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"
24PV="2013.2.3+git${SRCPV}" 24PV="2013.2.3+git${SRCPV}"
25S = "${WORKDIR}/git" 25S = "${WORKDIR}/git"
26 26
27inherit setuptools update-rc.d identity default_configs 27inherit setuptools update-rc.d identity default_configs hosts
28 28
29CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" 29CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift"
30 30
31SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
32KEYSTONE_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
38USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
39SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
40python () {
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
31do_install_prepend() { 50do_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
18S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
19 19
20inherit setuptools update-rc.d identity default_configs 20inherit setuptools update-rc.d identity default_configs hosts
21 21
22GLANCE_DEFAULT_STORE ?= "file" 22GLANCE_DEFAULT_STORE ?= "file"
23 23
24SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
25KEYSTONE_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
31USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
32SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
33python () {
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
24do_install_prepend() { 43do_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"
20PV="2013.2.3+git${SRCPV}" 20PV="2013.2.3+git${SRCPV}"
21S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
22 22
23SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-templates ${SRCNAME}-cfn"
24KEYSTONE_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
30USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
31SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
32python () {
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
43USERCREATE_PARAM_${SRCNAME}-templates = "role"
44python () {
45 flags = {'role':'heat_stack_user'}
46 d.setVarFlags("USERCREATE_PARAM_%s-templates" % d.getVar('SRCNAME',True), flags)
47}
48
49# api-cfn service
50SERVICECREATE_PARAM_${SRCNAME}-cfn = "name type description region publicurl adminurl internalurl"
51python () {
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
23do_install_append() { 61do_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
90PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" 128PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine"
91PACKAGES += "${SRCNAME}-setup" 129PACKAGES += "${SRCNAME}-setup"
130PACKAGES += "${SRCNAME}-cfn"
92 131
93ALLOW_EMPTY_${SRCNAME}-setup = "1" 132ALLOW_EMPTY_${SRCNAME}-setup = "1"
133ALLOW_EMPTY_${SRCNAME}-templates = "1"
134ALLOW_EMPTY_${SRCNAME}-cfn = "1"
94 135
95FILES_${PN} = "${libdir}/*" 136FILES_${PN} = "${libdir}/*"
96 137
@@ -164,10 +205,12 @@ RDEPENDS_${PN} += " \
164 python-pbr \ 205 python-pbr \
165 " 206 "
166 207
167RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-templates ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt" 208RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-templates ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt ${SRCNAME}-cfn"
168RDEPENDS_${SRCNAME}-api = "${SRCNAME}-engine" 209RDEPENDS_${SRCNAME}-api = "${SRCNAME}-engine"
169RDEPENDS_${SRCNAME}-api-cfn = "${SRCNAME}-engine" 210RDEPENDS_${SRCNAME}-api-cfn = "${SRCNAME}-engine"
170RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-engine" 211RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-engine"
212RDEPENDS_${SRCNAME}-templates = "postgresql sudo"
213RDEPENDS_${SRCNAME}-cfn = "postgresql sudo"
171 214
172INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" 215INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine"
173INITSCRIPT_NAME_${SRCNAME}-api = "${SRCNAME}-api" 216INITSCRIPT_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
32LDAP_DN ?= "dc=my-domain,dc=com" 32LDAP_DN ?= "dc=my-domain,dc=com"
33 33
34SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
35KEYSTONE_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
41USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
42python () {
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}
51SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
52python () {
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
34do_install_append() { 61do_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
27inherit setuptools update-rc.d identity hosts default_configs 27inherit setuptools update-rc.d identity hosts default_configs
28 28
29SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
30KEYSTONE_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
36USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
37SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
38python () {
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
29do_install_append() { 48do_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
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 \
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
31SWIFT_BACKING_FILE_SIZE ?= "2G" 31SWIFT_BACKING_FILE_SIZE ?= "2G"
32 32
33SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
34KEYSTONE_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
40USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
41SERVICECREATE_PARAM_${SRCNAME}-setup = "name type description region publicurl adminurl internalurl"
42python () {
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
33do_install_append() { 52do_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
18IMAGE_FEATURES += " ssh-server-openssh" 18IMAGE_FEATURES += " ssh-server-openssh"
19POST_KEYSTONE_SETUP_COMMAND = "/etc/keystone/hybrid-backend-setup"
19 20
20inherit core-image 21inherit core-image
21inherit openstack-base 22inherit openstack-base
23inherit 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"
21PV="2013.2+git${SRCPV}" 21PV="2013.2+git${SRCPV}"
22S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"
23 23
24SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-setup-altdemo ${SRCNAME}-setup-admin"
25KEYSTONE_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
32USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
33python () {
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
44USERCREATE_PARAM_${SRCNAME}-setup-altdemo = "name pass tenant role email"
45python () {
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
56USERCREATE_PARAM_${SRCNAME}-setup-admin = "name pass tenant role email"
57python () {
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
24do_install_append() { 67do_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
63PACKAGES =+ "${SRCNAME}-tests" 106PACKAGES =+ "${SRCNAME}-tests \
107 ${SRCNAME}-setup \
108 ${SRCNAME}-setup-altdemo \
109 ${SRCNAME}-setup-admin \
110 "
64 111
65FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*" 112FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*"
66 113
67FILES_${PN} = "${libdir}/* \ 114FILES_${PN} = "${libdir}/* \
68 ${sysconfdir}/* \ 115 ${sysconfdir}/* \
69" 116"
117
118ALLOW_EMPTY_${SRCNAME}-setup = "1"
119ALLOW_EMPTY_${SRCNAME}-setup-altdemo = "1"
120ALLOW_EMPTY_${SRCNAME}-setup-admin = "1"
121
70RDEPENDS_${PN} += " \ 122RDEPENDS_${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 \