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:
parent
17be7d5de2
commit
f645a8504a
10
lib/heat
10
lib/heat
@ -31,6 +31,8 @@ HEAT_DIR=$DEST/heat
|
|||||||
HEATCLIENT_DIR=$DEST/python-heatclient
|
HEATCLIENT_DIR=$DEST/python-heatclient
|
||||||
HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat}
|
HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat}
|
||||||
HEAT_STANDALONE=`trueorfalse False $HEAT_STANDALONE`
|
HEAT_STANDALONE=`trueorfalse False $HEAT_STANDALONE`
|
||||||
|
HEAT_CONF_DIR=/etc/heat
|
||||||
|
HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
# ---------
|
# ---------
|
||||||
@ -39,13 +41,13 @@ HEAT_STANDALONE=`trueorfalse False $HEAT_STANDALONE`
|
|||||||
# runs that a clean run would need to clean up
|
# runs that a clean run would need to clean up
|
||||||
function cleanup_heat() {
|
function cleanup_heat() {
|
||||||
sudo rm -rf $HEAT_AUTH_CACHE_DIR
|
sudo rm -rf $HEAT_AUTH_CACHE_DIR
|
||||||
|
sudo rm -rf $HEAT_ENV_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
# configure_heat() - Set config files, create data dirs, etc
|
# configure_heat() - Set config files, create data dirs, etc
|
||||||
function configure_heat() {
|
function configure_heat() {
|
||||||
setup_develop $HEAT_DIR
|
setup_develop $HEAT_DIR
|
||||||
|
|
||||||
HEAT_CONF_DIR=/etc/heat
|
|
||||||
if [[ ! -d $HEAT_CONF_DIR ]]; then
|
if [[ ! -d $HEAT_CONF_DIR ]]; then
|
||||||
sudo mkdir -p $HEAT_CONF_DIR
|
sudo mkdir -p $HEAT_CONF_DIR
|
||||||
fi
|
fi
|
||||||
@ -155,6 +157,12 @@ function configure_heat() {
|
|||||||
|
|
||||||
iniset_rpc_backend heat $HEAT_API_CW_CONF DEFAULT
|
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
|
# init_heat() - Initialize database
|
||||||
|
Loading…
x
Reference in New Issue
Block a user