summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-barbican_git.bb
diff options
context:
space:
mode:
authorMustapha Lansana <Mustapha.Lansana@windriver.com>2014-07-30 21:36:33 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-09-26 09:09:22 -0400
commitd42684ccde8f2dcd1fea0fc1f2ec7df6c89a0ce6 (patch)
tree686853037adde6488749d0a9adb26ec8d9242804 /meta-openstack/recipes-devtools/python/python-barbican_git.bb
parent2b726dacf1d2213c0a5ebc01f1db4f0caa8d06d5 (diff)
downloadmeta-cloud-services-d42684ccde8f2dcd1fea0fc1f2ec7df6c89a0ce6.tar.gz
openstack: add support for openstackchef class to services
Openstackchef enables us to recreate configuration files for services in an openstack installation. It does this by creating template file(s) out of configuration file(s) exposed to the class by services. The following services are inheriting the openstack class and then exposing a set of configuration files to the class. These services expose their configuration files to openstackchef by assigning them to the variable CHEF_SERVICES_CONF_FILES. The files are assumend to have been installed in the image directory under the service's WORKDIR. At build-time, openstackchef makes chef-solo templates out of the registered files. And at run-time, the deploychef package makes a call to chef-solo, which in-turn use the template files to recreate the registered configuration files. For legacy reasons, the string OPENSTACKCHEF_ENABLED is defined in openstackchef class, but it can be overwritten in a .bb, .class, .bbappend or local.conf file to an empty string when openstackchef support is not desired. This enables all of these services to be built without openstackchef support. In addition, it prevents the recipes from substituting the placeholders in their configuration files when inheriting openstackchef. Signed-off-by: Mustapha Lansana <Mustapha.Lansana@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-barbican_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-barbican_git.bb14
1 files changed, 9 insertions, 5 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-barbican_git.bb b/meta-openstack/recipes-devtools/python/python-barbican_git.bb
index 7885ab5..d5c43ff 100644
--- a/meta-openstack/recipes-devtools/python/python-barbican_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-barbican_git.bb
@@ -19,7 +19,7 @@ SRCREV="ada968e162d9795613bfb346a1018f63ef7025cc"
19PV="2014.2.b3+git${SRCPV}" 19PV="2014.2.b3+git${SRCPV}"
20S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
21 21
22inherit update-rc.d setuptools identity hosts useradd default_configs 22inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef
23 23
24SERVICECREATE_PACKAGES = "${SRCNAME}-setup" 24SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
25KEYSTONE_HOST="${CONTROLLER_IP}" 25KEYSTONE_HOST="${CONTROLLER_IP}"
@@ -48,10 +48,10 @@ do_install_append() {
48 cp -r ${TEMPLATE_CONF_DIR}/* ${BARBICAN_CONF_DIR} 48 cp -r ${TEMPLATE_CONF_DIR}/* ${BARBICAN_CONF_DIR}
49 49
50 install -d ${D}${localstatedir}/lib/barbican 50 install -d ${D}${localstatedir}/lib/barbican
51 51 if [ -z "${OPENSTACKCHEF_ENABLED}" ]; then
52 sed -e "s:%BARBICAN_MAX_PACKET_SIZE%:${BARBICAN_MAX_PACKET_SIZE}:g" -i ${BARBICAN_CONF_DIR}/vassals/barbican-api.ini 52 sed -e "s:%BARBICAN_MAX_PACKET_SIZE%:${BARBICAN_MAX_PACKET_SIZE}:g" -i ${BARBICAN_CONF_DIR}/vassals/barbican-api.ini
53 sed -e "s:%BARBICAN_MAX_PACKET_SIZE%:${BARBICAN_MAX_PACKET_SIZE}:g" -i ${BARBICAN_CONF_DIR}/vassals/barbican-admin.ini 53 sed -e "s:%BARBICAN_MAX_PACKET_SIZE%:${BARBICAN_MAX_PACKET_SIZE}:g" -i ${BARBICAN_CONF_DIR}/vassals/barbican-admin.ini
54 54 fi
55 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 55 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
56 install -d ${D}${sysconfdir}/init.d 56 install -d ${D}${sysconfdir}/init.d
57 57
@@ -68,6 +68,10 @@ do_install_append() {
68 -i ${D}/${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/tests/api/test_resources_policy.py 68 -i ${D}/${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/tests/api/test_resources_policy.py
69} 69}
70 70
71CHEF_SERVICES_CONF_FILES :="\
72 ${sysconfdir}/${SRCNAME}/vassals/barbican-api.ini \
73 ${sysconfdir}/${SRCNAME}/vassals/barbican-admin.ini \
74 "
71USERADD_PACKAGES = "${PN}" 75USERADD_PACKAGES = "${PN}"
72GROUPADD_PARAM_${PN} = "--system barbican" 76GROUPADD_PARAM_${PN} = "--system barbican"
73USERADD_PARAM_${PN} = "--system --home /var/lib/barbican -g barbican \ 77USERADD_PARAM_${PN} = "--system --home /var/lib/barbican -g barbican \