Seperate the case of using agent with local server from with c.stack360.io

Change-Id: I648fcb19415494fff5564b9269b05e8cd2ff08e6
This commit is contained in:
Xicheng Chang 2016-12-08 22:52:12 -05:00
parent 8ba3e5ccb5
commit b24e35fa51
3 changed files with 7 additions and 1 deletions

View File

@ -95,6 +95,8 @@ domains=$(echo $NAMESERVER_DOMAINS | sed "s/,/','/g")
sudo sed -i "s/\$domains/$domains/g" /etc/compass/setting
if [ "$FULL_COMPASS_SERVER" == "true" ]; then
sudo sed -i "/DATABASE_SERVER =/c\DATABASE_SERVER = '127.0.0.1:3306'" /etc/compass/setting
else
sudo sed -i "/DATABASE_SERVER =/c\DATABASE_SERVER = '\$COMPASS_API_SERVER:3306'" /etc/compass/setting
fi
sudo sed -i "s/\$cobbler_ip/$IPADDR/g" /etc/compass/os_installer/cobbler.conf
@ -130,6 +132,9 @@ else
fi
if [ "$FULL_COMPASS_SERVER" == "true" ]; then
sudo mv /etc/compass/celeryconfig_local /etc/compass/celeryconfig
elif [ "$COMPASS_API_SERVER" != "c.stack360.io" ];then
sudo mv /etc/compass/celeryconfig_local /etc/compass/celeryconfig
sudo sed -i "s/localhost/\$COMPASS_API_SERVER/g" /etc/compass/celeryconfig
else
sudo mv /etc/compass/celeryconfig_remote /etc/compass/celeryconfig
wget -O /tmp/aws_credentials "http://www.stack360.io/aws_credentials"

View File

@ -7,6 +7,8 @@ export FULL_COMPASS_SERVER="true"
export USER_EMAIL="test@huawei.com"
# User Password
export USER_PASSWORD=
# Compass Server Address, required if installing agent
export COMPASS_API_SERVER="c.stack360.io"
# OS_INSTALLER indicates the tool for OS provisioning, default is 'cobbler'.
export OS_INSTALLER="cobbler"

View File

@ -8,7 +8,6 @@ echo "The email address you use to register is ${USER_EMAIL}"
password=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6`
USER_PASSWORD="${USER_PASSWORD:-$password}"
data=`echo "{\"email\":\"${USER_EMAIL}\",\"password\":\"${USER_PASSWORD}\"}"`
COMPASS_API_SERVER="c.stack360.io"
if [ "$FULL_COMPASS_SERVER" == "true" ]; then
COMPASS_API_SERVER="127.0.0.1"
fi