Add common log and configuration places
Change-Id: I2de692931fbc3de923489eb943ecc233d1366730
This commit is contained in:
parent
84600e4a1c
commit
a1173478ce
@ -22,7 +22,9 @@ PIPAPPS="pip python-pip pip-python"
|
||||
PIPCMD=""
|
||||
SERVICE_SRV_NAME="murano-conductor"
|
||||
GIT_CLONE_DIR=`echo $SERVICE_CONTENT_DIRECTORY | sed -e "s/$SERVICE_SRV_NAME//"`
|
||||
ETC_CFG_DIR="/etc/$SERVICE_SRV_NAME"
|
||||
#ETC_CFG_DIR="/etc/$SERVICE_SRV_NAME"
|
||||
ETC_CFG_DIR="/etc/murano"
|
||||
LOG_DIR="/var/log/murano/"
|
||||
SERVICE_CONFIG_FILE_PATH="$ETC_CFG_DIR/conductor.conf"
|
||||
|
||||
# Functions
|
||||
@ -150,15 +152,29 @@ CLONE_FROM_GIT=$1
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
# Creating log directory for the murano
|
||||
if [ ! -d $LOG_DIR ];then
|
||||
log "Creating $LOG_DIR direcory..."
|
||||
mkdir -p $LOG_DIR
|
||||
if [ $? -ne 0 ];then
|
||||
log "Can't create $LOG_DIR, exiting!!!"
|
||||
exit 1
|
||||
fi
|
||||
chmod -R a+rw $LOG_DIR
|
||||
fi
|
||||
# making sample configs
|
||||
log "Making sample configuration files at \"$ETC_CFG_DIR\""
|
||||
for file in $(ls $SERVICE_CONTENT_DIRECTORY/etc)
|
||||
do
|
||||
if [ -d "$SERVICE_CONTENT_DIRECTORY/etc/$file" ];then
|
||||
cp -f -R "$SERVICE_CONTENT_DIRECTORY/etc/$file" "$ETC_CFG_DIR/"
|
||||
else
|
||||
cp -f "$SERVICE_CONTENT_DIRECTORY/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
||||
fi
|
||||
done
|
||||
# making templates data
|
||||
log "Making templates directory"
|
||||
cp -f -R "$SERVICE_CONTENT_DIRECTORY/data" "$ETC_CFG_DIR/"
|
||||
#log "Making templates directory"
|
||||
#cp -f -R "$SERVICE_CONTENT_DIRECTORY/data" "$ETC_CFG_DIR/"
|
||||
}
|
||||
|
||||
# searching for service executable in path
|
||||
|
22
setup.sh
22
setup.sh
@ -20,7 +20,9 @@ SERVICE_CONTENT_DIRECTORY=`cd $(dirname "$0") && pwd`
|
||||
PREREQ_PKGS="upstart wget git make python-pip python-dev python-mysqldb libxml2-dev libxslt-dev libffi-dev"
|
||||
SERVICE_SRV_NAME="murano-conductor"
|
||||
GIT_CLONE_DIR=`echo $SERVICE_CONTENT_DIRECTORY | sed -e "s/$SERVICE_SRV_NAME//"`
|
||||
ETC_CFG_DIR="/etc/$SERVICE_SRV_NAME"
|
||||
#ETC_CFG_DIR="/etc/$SERVICE_SRV_NAME"
|
||||
ETC_CFG_DIR="/etc/murano"
|
||||
LOG_DIR="/var/log/murano/"
|
||||
SERVICE_CONFIG_FILE_PATH="$ETC_CFG_DIR/conductor.conf"
|
||||
|
||||
# Functions
|
||||
@ -128,15 +130,29 @@ CLONE_FROM_GIT=$1
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# Creating log directory for the murano
|
||||
if [ ! -d $LOG_DIR ];then
|
||||
log "Creating $LOG_DIR direcory..."
|
||||
mkdir -p $LOG_DIR
|
||||
if [ $? -ne 0 ];then
|
||||
log "Can't create $LOG_DIR, exiting!!!"
|
||||
exit 1
|
||||
fi
|
||||
chmod -R a+rw $LOG_DIR
|
||||
fi
|
||||
# making sample configs
|
||||
log "Making sample configuration files at \"$ETC_CFG_DIR\""
|
||||
for file in $(ls $SERVICE_CONTENT_DIRECTORY/etc)
|
||||
do
|
||||
if [ -d "$SERVICE_CONTENT_DIRECTORY/etc/$file" ];then
|
||||
cp -f -R "$SERVICE_CONTENT_DIRECTORY/etc/$file" "$ETC_CFG_DIR/"
|
||||
else
|
||||
cp -f "$SERVICE_CONTENT_DIRECTORY/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
||||
fi
|
||||
done
|
||||
# making templates data
|
||||
log "Making templates directory"
|
||||
cp -f -R "$SERVICE_CONTENT_DIRECTORY/data" "$ETC_CFG_DIR/"
|
||||
#log "Making templates directory"
|
||||
#cp -f -R "$SERVICE_CONTENT_DIRECTORY/data" "$ETC_CFG_DIR/"
|
||||
}
|
||||
|
||||
# searching for service executable in path
|
||||
|
Loading…
x
Reference in New Issue
Block a user