Commit f2e265ba authored by Daniel Seybold's avatar Daniel Seybold
Browse files

removed auto discovery of public ip

parent d3302280
Pipeline #28649 passed with stage
in 12 minutes and 6 seconds
...@@ -13,7 +13,7 @@ GLOBAL_VAR="xyz" ...@@ -13,7 +13,7 @@ GLOBAL_VAR="xyz"
# validate if all container variables are set # validate if all container variables are set
############################################################################## ##############################################################################
function validate(){ function validate(){
vars="MYSQL_PW MYSQL_USER MYSQL_DB MYSQL_HOST ETCD_HOST" vars="MYSQL_PW MYSQL_USER MYSQL_DB MYSQL_HOST ETCD_HOST PUBLIC_IP"
for var in $vars; do for var in $vars; do
if [[ $(env | awk -F "=" '{print $1}' | grep "^$var$") != "$var" ]]; then if [[ $(env | awk -F "=" '{print $1}' | grep "^$var$") != "$var" ]]; then
echo "$var not set but required." echo "$var not set but required."
...@@ -36,6 +36,7 @@ function writeConfigOptions(){ ...@@ -36,6 +36,7 @@ function writeConfigOptions(){
export MYSQL_DB=$MYSQL_DB export MYSQL_DB=$MYSQL_DB
export MYSQL_HOST=$MYSQL_HOST export MYSQL_HOST=$MYSQL_HOST
export ETCD_HOST=$ETCD_HOST export ETCD_HOST=$ETCD_HOST
export PUBLIC_IP=$PUBLIC_IP
#cat /etc/docker-conf/configfile.conf.tmpl | envsubst > /etc/docker-conf/configfile.conf #cat /etc/docker-conf/configfile.conf.tmpl | envsubst > /etc/docker-conf/configfile.conf
cat /etc/docker-config/application.conf | envsubst > /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/conf/application.conf cat /etc/docker-config/application.conf | envsubst > /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/conf/application.conf
cp /etc/docker-config/logback.xml /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/conf/ cp /etc/docker-config/logback.xml /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/conf/
...@@ -73,7 +74,7 @@ function colosseum_service(){ ...@@ -73,7 +74,7 @@ function colosseum_service(){
rm /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/RUNNING_PID rm /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/RUNNING_PID
# resolve public IP # resolve public IP
PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com) #PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
echo "starting colosseum..." echo "starting colosseum..."
/opt/cloudiator/colosseum-0.2.0-SNAPSHOT/bin/colosseum -Dconfig.file=/opt/cloudiator/colosseum-0.2.0-SNAPSHOT/conf/application.conf -Dlca.client.config.registry=etcdregistry -Dlca.client.config.registry.etcd.hosts=${PUBLIC_IP} 2>&1 /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/bin/colosseum -Dconfig.file=/opt/cloudiator/colosseum-0.2.0-SNAPSHOT/conf/application.conf -Dlca.client.config.registry=etcdregistry -Dlca.client.config.registry.etcd.hosts=${PUBLIC_IP} 2>&1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment