Fixed setup script directory search path
Change-Id: I66f326d5cc4dac4abcac490e37a4368b8074e916
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
# CentOS script
|
# CentOS script
|
||||||
|
|
||||||
LOGLVL=1
|
LOGLVL=1
|
||||||
SERVICE_CONTENT_DIRECTORY=`cd $(dirname "$0") && pwd`
|
SERVICE_CONTENT_DIRECTORY=`cd $(dirname "$0") && pwd`
|
||||||
PREREQ_PKGS="upstart wget git make python-pip python-devel mysql-connector-python"
|
PREREQ_PKGS="upstart wget git make python-pip python-devel mysql-connector-python"
|
||||||
@@ -102,14 +103,17 @@ CLONE_FROM_GIT=$1
|
|||||||
#fi
|
#fi
|
||||||
## Setup through pip
|
## Setup through pip
|
||||||
# Creating tarball
|
# Creating tarball
|
||||||
cd $GIT_CLONE_DIR/$SERVICE_SRV_NAME && $MRN_CND_SPY sdist
|
#cd $GIT_CLONE_DIR/$SERVICE_SRV_NAME && $MRN_CND_SPY sdist
|
||||||
|
cd $SERVICE_CONTENT_DIRECTORY && $MRN_CND_SPY sdist
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
log "\"$MRN_CND_SPY\" tarball creation FAILS, exiting!!!"
|
log "\"$MRN_CND_SPY\" tarball creation FAILS, exiting!!!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Running tarball install
|
# Running tarball install
|
||||||
TRBL_FILE=$(basename `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/*.tar.gz`)
|
#TRBL_FILE=$(basename `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/*.tar.gz`)
|
||||||
pip install $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/$TRBL_FILE
|
#pip install $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/$TRBL_FILE
|
||||||
|
TRBL_FILE=$(basename `ls $SERVICE_CONTENT_DIRECTORY/dist/*.tar.gz`)
|
||||||
|
pip install $SERVICE_CONTENT_DIRECTORY/dist/$TRBL_FILE
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
log "pip install \"$TRBL_FILE\" FAILS, exiting!!!"
|
log "pip install \"$TRBL_FILE\" FAILS, exiting!!!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -128,13 +132,16 @@ CLONE_FROM_GIT=$1
|
|||||||
fi
|
fi
|
||||||
# making sample configs
|
# making sample configs
|
||||||
log "Making sample configuration files at \"$ETC_CFG_DIR\""
|
log "Making sample configuration files at \"$ETC_CFG_DIR\""
|
||||||
for file in `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/etc`
|
#for file in `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/etc`
|
||||||
|
for file in `ls $SERVICE_CONTENT_DIRECTORY/etc`
|
||||||
do
|
do
|
||||||
cp -f "$GIT_CLONE_DIR/$SERVICE_SRV_NAME/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
#cp -f "$GIT_CLONE_DIR/$SERVICE_SRV_NAME/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
||||||
|
cp -f "$SERVICE_CONTENT_DIRECTORY/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
||||||
done
|
done
|
||||||
# making templates data
|
# making templates data
|
||||||
log "Making templates directory"
|
log "Making templates directory"
|
||||||
cp -f -R "$GIT_CLONE_DIR/$SERVICE_SRV_NAME/data" "$ETC_CFG_DIR/"
|
#cp -f -R "$GIT_CLONE_DIR/$SERVICE_SRV_NAME/data" "$ETC_CFG_DIR/"
|
||||||
|
cp -f -R "$SERVICE_CONTENT_DIRECTORY/data" "$ETC_CFG_DIR/"
|
||||||
}
|
}
|
||||||
|
|
||||||
# searching for service executable in path
|
# searching for service executable in path
|
||||||
|
|||||||
24
setup.sh
24
setup.sh
@@ -14,9 +14,10 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
# Ubuntu script.
|
# Ubuntu script.
|
||||||
|
|
||||||
LOGLVL=1
|
LOGLVL=1
|
||||||
SERVICE_CONTENT_DIRECTORY=`cd $(dirname "$0") && pwd`
|
SERVICE_CONTENT_DIRECTORY=`cd $(dirname "$0") && pwd`
|
||||||
PREREQ_PKGS="upstart wget git make python-pip python-dev python-mysqldb"
|
PREREQ_PKGS="upstart wget git make python-pip python-dev python-mysqldb libxml2-dev libxslt-dev"
|
||||||
SERVICE_SRV_NAME="murano-conductor"
|
SERVICE_SRV_NAME="murano-conductor"
|
||||||
GIT_CLONE_DIR=`echo $SERVICE_CONTENT_DIRECTORY | sed -e "s/$SERVICE_SRV_NAME//"`
|
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"
|
||||||
@@ -91,7 +92,8 @@ CLONE_FROM_GIT=$1
|
|||||||
|
|
||||||
# Setupping...
|
# Setupping...
|
||||||
log "Running setup.py"
|
log "Running setup.py"
|
||||||
MRN_CND_SPY=$GIT_CLONE_DIR/$SERVICE_SRV_NAME/setup.py
|
#MRN_CND_SPY=$GIT_CLONE_DIR/$SERVICE_SRV_NAME/setup.py
|
||||||
|
MRN_CND_SPY=$SERVICE_CONTENT_DIRECTORY/setup.py
|
||||||
if [ -e $MRN_CND_SPY ];then
|
if [ -e $MRN_CND_SPY ];then
|
||||||
chmod +x $MRN_CND_SPY
|
chmod +x $MRN_CND_SPY
|
||||||
log "$MRN_CND_SPY output:_____________________________________________________________"
|
log "$MRN_CND_SPY output:_____________________________________________________________"
|
||||||
@@ -102,14 +104,17 @@ CLONE_FROM_GIT=$1
|
|||||||
#fi
|
#fi
|
||||||
## Setup through pip
|
## Setup through pip
|
||||||
# Creating tarball
|
# Creating tarball
|
||||||
cd $GIT_CLONE_DIR/$SERVICE_SRV_NAME && $MRN_CND_SPY sdist
|
#cd $GIT_CLONE_DIR/$SERVICE_SRV_NAME && $MRN_CND_SPY sdist
|
||||||
|
cd $SERVICE_CONTENT_DIRECTORY && $MRN_CND_SPY sdist
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
log "\"$MRN_CND_SPY\" tarball creation FAILS, exiting!!!"
|
log "\"$MRN_CND_SPY\" tarball creation FAILS, exiting!!!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Running tarball install
|
# Running tarball install
|
||||||
TRBL_FILE=$(basename `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/*.tar.gz`)
|
#TRBL_FILE=$(basename `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/*.tar.gz`)
|
||||||
pip install $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/$TRBL_FILE
|
#pip install $GIT_CLONE_DIR/$SERVICE_SRV_NAME/dist/$TRBL_FILE
|
||||||
|
TRBL_FILE=$(basename `ls $SERVICE_CONTENT_DIRECTORY/dist/*.tar.gz`)
|
||||||
|
pip install $SERVICE_CONTENT_DIRECTORY/dist/$TRBL_FILE
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
log "pip install \"$TRBL_FILE\" FAILS, exiting!!!"
|
log "pip install \"$TRBL_FILE\" FAILS, exiting!!!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -128,13 +133,16 @@ CLONE_FROM_GIT=$1
|
|||||||
fi
|
fi
|
||||||
# making sample configs
|
# making sample configs
|
||||||
log "Making sample configuration files at \"$ETC_CFG_DIR\""
|
log "Making sample configuration files at \"$ETC_CFG_DIR\""
|
||||||
for file in `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/etc`
|
#for file in `ls $GIT_CLONE_DIR/$SERVICE_SRV_NAME/etc`
|
||||||
|
for file in `ls $SERVICE_CONTENT_DIRECTORY/etc`
|
||||||
do
|
do
|
||||||
cp -f "$GIT_CLONE_DIR/$SERVICE_SRV_NAME/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
#cp -f "$GIT_CLONE_DIR/$SERVICE_SRV_NAME/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
||||||
|
cp -f "$SERVICE_CONTENT_DIRECTORY/etc/$file" "$ETC_CFG_DIR/$file.sample"
|
||||||
done
|
done
|
||||||
# making templates data
|
# making templates data
|
||||||
log "Making templates directory"
|
log "Making templates directory"
|
||||||
cp -f -R "$GIT_CLONE_DIR/$SERVICE_SRV_NAME/data" "$ETC_CFG_DIR/"
|
#cp -f -R "$GIT_CLONE_DIR/$SERVICE_SRV_NAME/data" "$ETC_CFG_DIR/"
|
||||||
|
cp -f -R "$SERVICE_CONTENT_DIRECTORY/data" "$ETC_CFG_DIR/"
|
||||||
}
|
}
|
||||||
|
|
||||||
# searching for service executable in path
|
# searching for service executable in path
|
||||||
|
|||||||
Reference in New Issue
Block a user