From f645a8504a2b0b824cfa6693a49e5032d0b9d1ee Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Mon, 26 Aug 2013 10:13:36 +1000 Subject: [PATCH] Add support for heat enviroments heat now has global environments that make it easy to rename and customise resource behaviour. These are yaml files that need to be in /etc/heat/environment.d/ Change-Id: I5a08c6ce8f5d7222f79aab2be0903ba783c10aa1 --- lib/heat | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/heat b/lib/heat index fb4002b7e6..5d6c6aa29b 100644 --- a/lib/heat +++ b/lib/heat @@ -31,6 +31,8 @@ HEAT_DIR=$DEST/heat HEATCLIENT_DIR=$DEST/python-heatclient HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat} HEAT_STANDALONE=`trueorfalse False $HEAT_STANDALONE` +HEAT_CONF_DIR=/etc/heat +HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d # Functions # --------- @@ -39,13 +41,13 @@ HEAT_STANDALONE=`trueorfalse False $HEAT_STANDALONE` # runs that a clean run would need to clean up function cleanup_heat() { sudo rm -rf $HEAT_AUTH_CACHE_DIR + sudo rm -rf $HEAT_ENV_DIR } # configure_heat() - Set config files, create data dirs, etc function configure_heat() { setup_develop $HEAT_DIR - HEAT_CONF_DIR=/etc/heat if [[ ! -d $HEAT_CONF_DIR ]]; then sudo mkdir -p $HEAT_CONF_DIR fi @@ -155,6 +157,12 @@ function configure_heat() { iniset_rpc_backend heat $HEAT_API_CW_CONF DEFAULT + # heat environment + sudo mkdir -p $HEAT_ENV_DIR + sudo chown $STACK_USER $HEAT_ENV_DIR + # copy the default environment + cp $HEAT_DIR/etc/heat/environment.d/* $HEAT_ENV_DIR/ + } # init_heat() - Initialize database