diff options
author | Mustapha Lansana <Mustapha.Lansana@windriver.com> | 2014-05-27 22:02:58 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-09-26 09:09:21 -0400 |
commit | 48bd378fda4db37b519742bdcf98b6a48f83b594 (patch) | |
tree | 399306667c5de33d5fac1b311f53e91150f9b88e /meta-openstack/recipes-support/deploychef/files/conf-templates/heat-template.inc | |
parent | 800f64a64014fdbe046a6d0969303057de2e6539 (diff) | |
download | meta-cloud-services-48bd378fda4db37b519742bdcf98b6a48f83b594.tar.gz |
deploychef: make chef-solo templates for openstack services
The deploychef package enables us to reconfigure an openstack
installation at run-time. It does this with the help of chef-solo,
by first creating a set of template files from openstack services'
configuration files. The template files are then passed on to chef-solo
at run-time. Finally, chef-solo recreates the services' configuration
files from the template files at run-time; this enables us to reconfigure
openstack services with dynamic run-time environment variables.
This patch set consist of files with helper functions which enables
deploychef to recreate the template files for the respective openstack
services.
Later on in this commit series, the files in this patch set
will be deleted, because the functionality they provide will be
provided by openstackchef class.
Signed-off-by: Mustapha Lansana <Mustapha.Lansana@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-support/deploychef/files/conf-templates/heat-template.inc')
-rw-r--r-- | meta-openstack/recipes-support/deploychef/files/conf-templates/heat-template.inc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-openstack/recipes-support/deploychef/files/conf-templates/heat-template.inc b/meta-openstack/recipes-support/deploychef/files/conf-templates/heat-template.inc new file mode 100644 index 0000000..578d2e7 --- /dev/null +++ b/meta-openstack/recipes-support/deploychef/files/conf-templates/heat-template.inc | |||
@@ -0,0 +1,15 @@ | |||
1 | #Heat related configuration function(s) | ||
2 | heat-conf_chefsolo_template() { | ||
3 | file_name=$1 | ||
4 | if [ -e $file_name ]; then | ||
5 | sed "s/$DB_USER:/<%=node[:DB_USER]%>:/g" -i $file_name | ||
6 | sed "s/$DB_PASSWORD@/<%=node[:DB_PASSWORD]%>@/g" -i $file_name | ||
7 | sed "s/^auth_host =.*$/auth_host = <%=node[:CONTROLLER_IP]%> /" -i $file_name | ||
8 | sed "s/^admin_tenant_name =.*$/admin_tenant_name = <%=node[:SERVICE_TENANT_NAME]%> /" -i $file_name | ||
9 | sed "s/^admin_password =.*$/admin_password = <%=node[:ADMIN_PASSWORD]%> /" -i $file_name | ||
10 | sed "s/$CONTROLLER_IP/<%=node[:CONTROLLER_IP]%>/g" -i $file_name | ||
11 | sed "s/$CONTROLLER_HOST/<%=node[:CONTROLLER_HOST]%>/g" -i $file_name | ||
12 | mv $file_name $file_name$SUFFIX | ||
13 | fi | ||
14 | } | ||
15 | |||