Update installl.sh
This commit is contained in:
parent
258a1c2d65
commit
091e0a4535
@ -5,28 +5,28 @@ TEMP=`getopt -o u:l: --long url: --long location: -- "$@"`
|
|||||||
if [ $? != 0 ] ; then echo "Exit" ; exit 1 ; fi
|
if [ $? != 0 ] ; then echo "Exit" ; exit 1 ; fi
|
||||||
|
|
||||||
eval set -- "$TEMP"
|
eval set -- "$TEMP"
|
||||||
echo $TEMP
|
SHOVEL_URL=${SHOVEL_URL-}
|
||||||
ADDR_IP=${ADDR_IP-}
|
|
||||||
FILE_LOC=${FILE_LOC-}
|
FILE_LOC=${FILE_LOC-}
|
||||||
|
|
||||||
while true ; do
|
while true ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-u | --url) ADDR_IP=$2 ;shift 2 ;;
|
-u | --url) SHOVEL_URL=$2 ;shift 2 ;;
|
||||||
-l | --location) FILE_LOC=$2;shift 2 ;;
|
-l | --location) FILE_LOC=$2;shift 2 ;;
|
||||||
--) shift; break ;;
|
--) shift; break ;;
|
||||||
*) echo "Internal error!" ; exit 1 ;;
|
*) echo "Internal error!" ; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
echo "get shovel url: " $ADDR_IP
|
echo "get shovel url: " $SHOVEL_URL
|
||||||
echo "get file location: " $FILE_LOC
|
echo "get file location: " $FILE_LOC
|
||||||
if [ -z "$ADDR_IP" -o -z "$FILE_LOC" ]
|
if [ -z "$SHOVEL_URL" -o -z "$FILE_LOC" ]
|
||||||
then
|
then
|
||||||
echo "You must specify ipaddr of shovel and horizon location"
|
echo "You must specify Shovel service URL(http://<ipaddr>)using --url <shovel-url>"
|
||||||
|
echo "and horizon location using --location <horizon path>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#replace in shovel.py SHOVEL_URL with the new addre value
|
#replace in shovel.py SHOVEL_URL with the new url value
|
||||||
sed -i "s|.*URI = .*|URI = \"$ADDR_IP\" + SHOVEL_BASE_API|g" rackhd/shovel.py
|
sed -i "s|.*URI = .*|URI = \"$SHOVEL_URL\" + SHOVEL_BASE_API|g" rackhd/shovel.py
|
||||||
#copy rackhd to horizon admin dashboard
|
#copy rackhd to horizon admin dashboard
|
||||||
cp -r rackhd $FILE_LOC/openstack_dashboard/dashboards/admin
|
cp -r rackhd $FILE_LOC/openstack_dashboard/dashboards/admin
|
||||||
#copy _50_admin_rackhd_panels.py to dashboard enabled
|
#copy _50_admin_rackhd_panels.py to dashboard enabled
|
||||||
|
Loading…
x
Reference in New Issue
Block a user