summaryrefslogtreecommitdiffstats
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
commitb23d78ca58c54251138a9edabeaab3982e4eebc8 (patch)
tree1f0006966c9a80e29356bbf294140da77a185c30
parentd42684ccde8f2dcd1fea0fc1f2ec7df6c89a0ce6 (diff)
downloadmeta-cloud-services-b23d78ca58c54251138a9edabeaab3982e4eebc8.tar.gz
cinder/glance/neutron: support for openstackchef class
Openstackchef enables us to recreate configuration files for services in an openstack installation. It does this by creating template file(s) out of openstack services' configuration file(s) exposed to it. The following services are inheriting the openstack class and then exposing a set of configuration files to the class. The configuration files are assumed to have been installed in the image in the service's WORKDIR and are exposed to openstackchef by assigning them to the variable CHEF_SERVICES_CONF_FILES. For legacy reasons, the string OPENSTACKCHEF_ENABLED is defined in openstackchef class, but it can be overwritten to an empty string in a .bb, .class, .bbapend or local.conf file when openstackchef support is not desired. This enables all of these services to be built without openstackchef support. In addition, it prevents the recipes for these sevices from substituting the placeholders in their configuration files when inheriting openstackchef. However, since services like python-glance and python-cinder install some of their configuration files to the image directory during the substitution, it means that these files at not installed when the substitutions are not required. Therefore, we have taken the liberty to install those missing configuration files before the check for whether or not substitutions should be made, without having any side effect on when the substitutions are required. 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. In making template files out of configuration files, openstackchef makes a simple placeholder/value substitution in the configuration files. However, it provides a mechanism for services inheriting the class to define a special shell callback function which can do more than a simple placeholder/value substitution. This special callback function is exposed to openstackchef by assigning it to the variable CHEF_SERVICES_SPECIAL_FUNC. And the name of the file passed back to the shell callback function as an argument is set to the variable CHEF_SERVICES_FILE_NAME by openstackchef. In this patch set, only python-neutron and python-glance recipe files makes special substitutions. Signed-off-by: Mustapha Lansana <Mustapha.Lansana@windriver.com>
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb40
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_git.bb40
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutron_git.bb67
3 files changed, 96 insertions, 51 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
index 5abf4bc..ef66656 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
@@ -24,7 +24,7 @@ SRCREV="58eda5d1f41082a7e1ffef66239be30b8ac1321a"
24PV="2014.2.b3+git${SRCPV}" 24PV="2014.2.b3+git${SRCPV}"
25S = "${WORKDIR}/git" 25S = "${WORKDIR}/git"
26 26
27inherit setuptools update-rc.d identity default_configs hosts 27inherit setuptools update-rc.d identity default_configs hosts openstackchef
28 28
29CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" 29CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift"
30 30
@@ -61,23 +61,12 @@ CINDER_GLUSTERFS_VOLUME_SERVERS ?= "${CINDER_GLUSTERFS_VOLUME_SERVERS_DEFAULT}"
61do_install_append() { 61do_install_append() {
62 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} 62 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
63 CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME} 63 CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
64 64
65 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ 65 #Instead of substituting api-paste.ini from the WORKDIR,
66 ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini 66 #move it over to the image's directory and do the substitution there
67 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini
68 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
69 -i ${WORKDIR}/api-paste.ini
70
71 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/cinder.conf
72 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/cinder.conf
73 sed -e "s:%CINDER_BACKUP_BACKEND_DRIVER%:${CINDER_BACKUP_BACKEND_DRIVER}:g" -i ${WORKDIR}/cinder.conf
74 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" -i ${WORKDIR}/cinder.conf
75 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/cinder.conf
76 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" -i ${WORKDIR}/cinder.conf
77
78 install -d ${CINDER_CONF_DIR} 67 install -d ${CINDER_CONF_DIR}
79 install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/ 68 install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/
80 install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/ 69 install -m 600 ${TEMPLATE_CONF_DIR}/api-paste.ini ${CINDER_CONF_DIR}/
81 install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/ 70 install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/
82 71
83 install -d ${CINDER_CONF_DIR}/drivers 72 install -d ${CINDER_CONF_DIR}/drivers
@@ -87,6 +76,21 @@ do_install_append() {
87 install -m 700 ${WORKDIR}/add-cinder-volume-types.sh ${CINDER_CONF_DIR}/ 76 install -m 700 ${WORKDIR}/add-cinder-volume-types.sh ${CINDER_CONF_DIR}/
88 77
89 install -d ${D}${localstatedir}/log/${SRCNAME} 78 install -d ${D}${localstatedir}/log/${SRCNAME}
79
80 if [ -z "${OPENSTACKCHEF_ENABLED}" ]; then
81 for file in api-paste.ini cinder.conf; do
82 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
83 -i ${CINDER_CONF_DIR}/$file
84 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${CINDER_CONF_DIR}/$file
85 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
86 -i ${CINDER_CONF_DIR}/$file
87
88 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${CINDER_CONF_DIR}/$file
89 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${CINDER_CONF_DIR}/$file
90 sed -e "s:%CINDER_BACKUP_BACKEND_DRIVER%:${CINDER_BACKUP_BACKEND_DRIVER}:g" \
91 -i ${CINDER_CONF_DIR}/$file
92 done
93 fi
90 94
91 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 95 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
92 install -d ${D}${sysconfdir}/init.d 96 install -d ${D}${sysconfdir}/init.d
@@ -121,6 +125,10 @@ do_install_append() {
121 sed -e "s:%IS_DEFAULT%:${is_default}:g" -i ${D}/etc/cinder/drivers/glusterfs_setup.sh 125 sed -e "s:%IS_DEFAULT%:${is_default}:g" -i ${D}/etc/cinder/drivers/glusterfs_setup.sh
122} 126}
123 127
128CHEF_SERVICES_CONF_FILES :="\
129 ${sysconfdir}/${SRCNAME}/cinder.conf \
130 ${sysconfdir}/${SRCNAME}/api-paste.ini \
131 "
124pkg_postinst_${SRCNAME}-setup () { 132pkg_postinst_${SRCNAME}-setup () {
125 if [ "x$D" != "x" ]; then 133 if [ "x$D" != "x" ]; then
126 exit 1 134 exit 1
diff --git a/meta-openstack/recipes-devtools/python/python-glance_git.bb b/meta-openstack/recipes-devtools/python/python-glance_git.bb
index 7775956..fa74aca 100644
--- a/meta-openstack/recipes-devtools/python/python-glance_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-glance_git.bb
@@ -19,7 +19,7 @@ PV="2014.2.b3+git${SRCPV}"
19 19
20S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
21 21
22inherit setuptools update-rc.d identity default_configs hosts 22inherit setuptools update-rc.d identity default_configs hosts openstackchef
23 23
24GLANCE_DEFAULT_STORE ?= "file" 24GLANCE_DEFAULT_STORE ?= "file"
25GLANCE_KNOWN_STORES ?= "glance.store.rbd.Store,\ 25GLANCE_KNOWN_STORES ?= "glance.store.rbd.Store,\
@@ -58,18 +58,15 @@ do_install_prepend() {
58do_install_append() { 58do_install_append() {
59 TEMPLATE_CONF_DIR=${S}${sysconfdir} 59 TEMPLATE_CONF_DIR=${S}${sysconfdir}
60 GLANCE_CONF_DIR=${D}${sysconfdir}/glance 60 GLANCE_CONF_DIR=${D}${sysconfdir}/glance
61 61
62 for file in api registry cache 62 for file in api registry cache
63 do 63 do
64 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ 64 install -m 0600 ${TEMPLATE_CONF_DIR}/glance-$file.conf ${WORKDIR}
65 ${TEMPLATE_CONF_DIR}/glance-$file.conf > ${WORKDIR}/glance-$file.conf 65 sed -e "s!^#connection =.*!connection = postgresql://%DB_USER%:%DB_PASSWORD%@localhost/glance!g" \
66 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/glance-$file.conf 66 -i ${WORKDIR}/glance-$file.conf
67 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
68 -i ${WORKDIR}/glance-$file.conf
69 sed -e "s!^#connection =.*!connection = postgresql://${DB_USER}:${DB_PASSWORD}@localhost/glance!g" \
70 -i ${WORKDIR}/glance-$file.conf
71 sed -i '/\[keystone_authtoken\]/aidentity_uri=http://127.0.0.1:8081/keystone/admin' ${WORKDIR}/glance-$file.conf 67 sed -i '/\[keystone_authtoken\]/aidentity_uri=http://127.0.0.1:8081/keystone/admin' ${WORKDIR}/glance-$file.conf
72 done 68 done
69
73 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \ 70 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \
74 -i ${WORKDIR}/glance-api.conf 71 -i ${WORKDIR}/glance-api.conf
75 72
@@ -79,8 +76,8 @@ do_install_append() {
79 76
80 sed 's:^default_store =.*:default_store = ${GLANCE_DEFAULT_STORE}:g' -i ${WORKDIR}/glance-api.conf 77 sed 's:^default_store =.*:default_store = ${GLANCE_DEFAULT_STORE}:g' -i ${WORKDIR}/glance-api.conf
81 sed 's:^swift_store_auth_address =.*:swift_store_auth_address = http\://127.0.0.1\:8081/keystone/main/:g' -i ${WORKDIR}/glance-api.conf 78 sed 's:^swift_store_auth_address =.*:swift_store_auth_address = http\://127.0.0.1\:8081/keystone/main/:g' -i ${WORKDIR}/glance-api.conf
82 sed 's:^swift_store_user =.*:swift_store_user = ${SERVICE_TENANT_NAME}\:${SRCNAME}:g' -i ${WORKDIR}/glance-api.conf 79 sed 's:^swift_store_user =.*:swift_store_user = %SERVICE_TENANT_NAME%\:${SRCNAME}:g' -i ${WORKDIR}/glance-api.conf
83 sed 's:^swift_store_key =.*:swift_store_key = ${SERVICE_PASSWORD}:g' -i ${WORKDIR}/glance-api.conf 80 sed 's:^swift_store_key =.*:swift_store_key = %SERVICE_PASSWORD%:g' -i ${WORKDIR}/glance-api.conf
84 sed 's:^swift_store_create_container_on_put =.*:swift_store_create_container_on_put = True:g' -i ${WORKDIR}/glance-api.conf 81 sed 's:^swift_store_create_container_on_put =.*:swift_store_create_container_on_put = True:g' -i ${WORKDIR}/glance-api.conf
85 82
86 # multi line match, replace the known stores with the ones we support. 83 # multi line match, replace the known stores with the ones we support.
@@ -101,6 +98,21 @@ do_install_append() {
101 98
102 install -d ${D}${localstatedir}/log/${SRCNAME} 99 install -d ${D}${localstatedir}/log/${SRCNAME}
103 100
101 if [ -z "${OPENSTACKCHEF_ENABLED}" ]; then
102 for file in api registry cache
103 do
104 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
105 -i ${GLANCE_CONF_DIR}/glance-$file.conf
106 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${GLANCE_CONF_DIR}/glance-$file.conf
107 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
108 -i ${GLANCE_CONF_DIR}/glance-$file.conf
109 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" \
110 -i ${GLANCE_CONF_DIR}/glance-$file.conf
111 sed -e "s:%DB_USER%:${DB_USER}:g" \
112 -i ${GLANCE_CONF_DIR}/glance-$file.conf
113 done
114 fi
115
104 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 116 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
105 install -d ${D}${sysconfdir}/init.d 117 install -d ${D}${sysconfdir}/init.d
106 sed 's:@suffix@:api:' < ${WORKDIR}/glance.init >${WORKDIR}/glance-api.init.sh 118 sed 's:@suffix@:api:' < ${WORKDIR}/glance.init >${WORKDIR}/glance-api.init.sh
@@ -112,6 +124,12 @@ do_install_append() {
112 cp run_tests.sh ${GLANCE_CONF_DIR} 124 cp run_tests.sh ${GLANCE_CONF_DIR}
113} 125}
114 126
127CHEF_SERVICES_CONF_FILES := "\
128 ${sysconfdir}/${SRCNAME}/glance-api.conf \
129 ${sysconfdir}/${SRCNAME}/glance-cache.conf \
130 ${sysconfdir}/${SRCNAME}/glance-registry.conf \
131 "
132
115pkg_postinst_${SRCNAME}-setup () { 133pkg_postinst_${SRCNAME}-setup () {
116 if [ "x$D" != "x" ]; then 134 if [ "x$D" != "x" ]; then
117 exit 1 135 exit 1
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb
index 295db97..f961487 100644
--- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb
@@ -25,7 +25,7 @@ PV="2014.2.b3+git${SRCPV}"
25 25
26S = "${WORKDIR}/git" 26S = "${WORKDIR}/git"
27 27
28inherit setuptools update-rc.d identity hosts default_configs 28inherit setuptools update-rc.d identity hosts default_configs openstackchef
29 29
30SERVICECREATE_PACKAGES = "${SRCNAME}-setup" 30SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
31KEYSTONE_HOST="${CONTROLLER_IP}" 31KEYSTONE_HOST="${CONTROLLER_IP}"
@@ -60,11 +60,11 @@ do_install_append() {
60 install -m 600 ${S}/etc/api-paste.ini ${NEUTRON_CONF_DIR}/ 60 install -m 600 ${S}/etc/api-paste.ini ${NEUTRON_CONF_DIR}/
61 install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/ 61 install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/
62 62
63 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ 63 #sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
64 -i ${NEUTRON_CONF_DIR}/neutron.conf 64 # -i ${NEUTRON_CONF_DIR}/neutron.conf
65 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${NEUTRON_CONF_DIR}/neutron.conf 65 #sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${NEUTRON_CONF_DIR}/neutron.conf
66 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ 66 #sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
67 -i ${NEUTRON_CONF_DIR}/neutron.conf 67 # -i ${NEUTRON_CONF_DIR}/neutron.conf
68 sed -e "s:^# core_plugin.*:core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2:g" \ 68 sed -e "s:^# core_plugin.*:core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2:g" \
69 -i ${NEUTRON_CONF_DIR}/neutron.conf 69 -i ${NEUTRON_CONF_DIR}/neutron.conf
70 70
@@ -74,15 +74,7 @@ do_install_append() {
74 sed -e "s:^# notify_nova_on_port_data_changes.*:notify_nova_on_port_data_changes = False:g" \ 74 sed -e "s:^# notify_nova_on_port_data_changes.*:notify_nova_on_port_data_changes = False:g" \
75 -i ${NEUTRON_CONF_DIR}/neutron.conf 75 -i ${NEUTRON_CONF_DIR}/neutron.conf
76 76
77 sed -e "s:^# rabbit_host =.*:rabbit_host = ${CONTROLLER_IP}:" -i ${NEUTRON_CONF_DIR}/neutron.conf 77 sed -e "s:^# rabbit_host =.*:rabbit_host = %CONTROLLER_IP%:" -i ${NEUTRON_CONF_DIR}/neutron.conf
78
79 for file in plugins/openvswitch/ovs_neutron_plugin.ini plugins/linuxbridge/linuxbridge_conf.ini
80 do
81 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${NEUTRON_CONF_DIR}/${file}
82 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${NEUTRON_CONF_DIR}/${file}
83 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${NEUTRON_CONF_DIR}/${file}
84 sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${NEUTRON_CONF_DIR}/${file}
85 done
86 78
87 PLUGIN=openvswitch 79 PLUGIN=openvswitch
88 ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini" 80 ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini"
@@ -121,15 +113,23 @@ do_install_append() {
121 install -m 0755 ${WORKDIR}/neutron-$AGENT.init.sh ${D}${sysconfdir}/init.d/neutron-$AGENT-agent 113 install -m 0755 ${WORKDIR}/neutron-$AGENT.init.sh ${D}${sysconfdir}/init.d/neutron-$AGENT-agent
122 install -m 600 ${WORKDIR}/${AGENT}_agent.ini ${NEUTRON_CONF_DIR}/ 114 install -m 600 ${WORKDIR}/${AGENT}_agent.ini ${NEUTRON_CONF_DIR}/
123 fi 115 fi
124 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ 116 if [ -z "${OPENSTACKCHEF_ENABLED}" ]; then
125 -i ${NEUTRON_CONF_DIR}/metadata_agent.ini 117 for file in plugins/openvswitch/ovs_neutron_plugin.ini \
126 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" \ 118 plugins/linuxbridge/linuxbridge_conf.ini neutron.conf metadata_agent.ini; do
127 -i ${NEUTRON_CONF_DIR}/metadata_agent.ini 119 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
128 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ 120 -i ${NEUTRON_CONF_DIR}/$file
129 -i ${NEUTRON_CONF_DIR}/metadata_agent.ini 121 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" \
130 sed -e "s:%METADATA_SHARED_SECRET%:${METADATA_SHARED_SECRET}:g" \ 122 -i ${NEUTRON_CONF_DIR}/$file
131 -i ${NEUTRON_CONF_DIR}/metadata_agent.ini 123 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
132 124 -i ${NEUTRON_CONF_DIR}/$file
125 sed -e "s:%METADATA_SHARED_SECRET%:${METADATA_SHARED_SECRET}:g" \
126 -i ${NEUTRON_CONF_DIR}/$file
127 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${NEUTRON_CONF_DIR}/$file
128 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${NEUTRON_CONF_DIR}/$file
129 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${NEUTRON_CONF_DIR}/$file
130 sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${NEUTRON_CONF_DIR}/$file
131 done
132 fi
133 sed -e "s:^auth_host.*:#auth_host:g" -i ${NEUTRON_CONF_DIR}/neutron.conf 133 sed -e "s:^auth_host.*:#auth_host:g" -i ${NEUTRON_CONF_DIR}/neutron.conf
134 sed -e "s:^auth_port.*:#auth_port:g" -i ${NEUTRON_CONF_DIR}/neutron.conf 134 sed -e "s:^auth_port.*:#auth_port:g" -i ${NEUTRON_CONF_DIR}/neutron.conf
135 sed -e "s:^auth_protocol.*:#auth_protocol:g" -i ${NEUTRON_CONF_DIR}/neutron.conf 135 sed -e "s:^auth_protocol.*:#auth_protocol:g" -i ${NEUTRON_CONF_DIR}/neutron.conf
@@ -157,6 +157,25 @@ pkg_postinst_${SRCNAME}-setup () {
157 --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini upgrade head 157 --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini upgrade head
158} 158}
159 159
160CHEF_SERVICES_CONF_FILES := " \
161 ${sysconfdir}/${SRCNAME}/neutron.conf \
162 ${sysconfdir}/${SRCNAME}/metadata_agent.ini \
163 ${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini \
164 ${sysconfdir}/${SRCNAME}/plugins/linuxbridge/linuxbridge_conf.ini \
165 "
166deploychef_services_special_func(){
167 #This function is a callback function for the deploychef .bbclass
168 #We define this special callback funtion because we are doing
169 #more than a placeholder substitution. The variable CHEF_SERVICES_FILE_NAME
170 #is defined in deploychef_framework.bbclass
171 if [ -n "${CHEF_SERVICES_FILE_NAME}" ]; then
172 sed "s:^# rabbit_host =.*:rabbit_host = %CONTROLLER_IP%:" -i \
173 ${CHEF_SERVICES_FILE_NAME}
174 fi
175}
176
177CHEF_SERVICES_SPECIAL_FUNC := "deploychef_services_special_func"
178
160pkg_postinst_${SRCNAME}-plugin-openvswitch-setup () { 179pkg_postinst_${SRCNAME}-plugin-openvswitch-setup () {
161 if [ "x$D" != "x" ]; then 180 if [ "x$D" != "x" ]; then
162 exit 1 181 exit 1