summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-extended/cloud-init
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-extended/cloud-init
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-extended/cloud-init')
-rw-r--r--meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb13
1 files changed, 9 insertions, 4 deletions
diff --git a/meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb b/meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb
index 9e460a7..baa186b 100644
--- a/meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb
+++ b/meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb
@@ -27,15 +27,20 @@ do_install_prepend() {
27} 27}
28 28
29do_install_append() { 29do_install_append() {
30 sed -e "s:%MANAGE_HOSTS%:${MANAGE_HOSTS}:g" -i ${WORKDIR}/cloud.cfg
31 sed -e "s:%HOSTNAME%:${HOSTNAME}:g" -i ${WORKDIR}/cloud.cfg
32 install -m 0755 ${WORKDIR}/cloud.cfg ${D}${sysconfdir}/cloud/cloud.cfg 30 install -m 0755 ${WORKDIR}/cloud.cfg ${D}${sysconfdir}/cloud/cloud.cfg
33 31 if [ -z "${OPENSTACKCHEF_ENABLED}" ]; then
32 sed -e "s:%MANAGE_HOSTS%:${MANAGE_HOSTS}:g" -i ${D}${sysconfdir}/cloud/cloud.cfg
33 sed -e "s:%HOSTNAME%:${HOSTNAME}:g" -i ${D}${sysconfdir}/cloud/cloud.cfg
34 fi
34 ln -s ${libdir}/${BPN}/uncloud-init ${D}${sysconfdir}/cloud/uncloud-init 35 ln -s ${libdir}/${BPN}/uncloud-init ${D}${sysconfdir}/cloud/uncloud-init
35 ln -s ${libdir}/${BPN}/write-ssh-key-fingerprints ${D}${sysconfdir}/cloud/write-ssh-key-fingerprints 36 ln -s ${libdir}/${BPN}/write-ssh-key-fingerprints ${D}${sysconfdir}/cloud/write-ssh-key-fingerprints
36} 37}
37 38
38inherit setuptools update-rc.d 39inherit setuptools update-rc.d openstackchef
40
41CHEF_SERVICES_CONF_FILES := " \
42 ${sysconfdir}/cloud/cloud.cfg \
43 "
39 44
40FILES_${PN} += "${sysconfdir}/* \ 45FILES_${PN} += "${sysconfdir}/* \
41 ${datadir}/*" 46 ${datadir}/*"