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
This commit is contained in:
Angus Salkeld 2013-08-26 10:13:36 +10:00
parent 17be7d5de2
commit f645a8504a

View File

@ -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