Commit 9bb9dfec authored by Daniel Seybold's avatar Daniel Seybold

added etcd docker service

parent d82ec101
Pipeline #10017 passed with stage
in 6 minutes and 37 seconds
......@@ -31,6 +31,8 @@ WORKDIR /opt/cloudiator
RUN unzip colosseum-0.2.0-SNAPSHOT.zip
RUN mkdir /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/conf
#create logging directory
# RUN mkdir /var/log/cloudiator/
# expose ports
EXPOSE 9000
......
......@@ -13,7 +13,7 @@ GLOBAL_VAR="xyz"
# validate if all container variables are set
##############################################################################
function validate(){
vars="MYSQL_PW MYSQL_USER MYSQL_DB MYSQL_HOST"
vars="MYSQL_PW MYSQL_USER MYSQL_DB MYSQL_HOST ETCD_HOST"
for var in $vars; do
if [[ $(env | awk -F "=" '{print $1}' | grep "^$var$") != "$var" ]]; then
echo "$var not set but required."
......@@ -35,6 +35,7 @@ function writeConfigOptions(){
export MYSQL_USER=$MYSQL_USER
export MYSQL_DB=$MYSQL_DB
export MYSQL_HOST=$MYSQL_HOST
export ETCD_HOST=$ETCD_HOST
#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
cp /etc/docker-config/logback.xml /opt/cloudiator/colosseum-0.2.0-SNAPSHOT/conf/
......@@ -58,12 +59,6 @@ function init(){
##############################################################################
function start_ui(){
echo "UI currently not activated!"
#service apache2 restart
}
function checkDatabase(){
echo "Checking MariaDB databases:"
......@@ -73,10 +68,10 @@ function checkDatabase(){
function start_colosseum(){
# 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..."
/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 >> /var/log/colosseum.log
/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=${ETCD_HOST} 2>&1 >> /var/log/colosseum.log
}
......@@ -87,9 +82,6 @@ function colosseum_service(){
echo "starting colosseum..."
start_colosseum
echo "starting ui"
start_ui
# whatever blocking call
tail -f /dev/null
}
......
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