Commit ef82faf9 authored by Spiros Koulouzis's avatar Spiros Koulouzis

bind ports to localhost

parent 4ea3918d
# Pull base image
FROM ubuntu:latest
FROM ubuntu:16.04
# ARG RABBITMQ_HOST=127.0.0.1
ARG RELESE_VERSION=0.1
ARG CERTS=/etc/grid-security/certificates
ARG RELESE_VERSION=0.2
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
RUN apt-get upgrade -y
RUN apt-get install -y wget software-properties-common build-essential libssl-dev libffi-dev python-dev graphviz graphviz-dev python-pip
RUN apt-get install -y wget software-properties-common python-pip
RUN pip install --upgrade pip
RUN pip install pydot
......@@ -30,8 +29,9 @@ WORKDIR /root/
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/drip-deployer.tar.gz
RUN tar -xzvf drip-deployer.tar.gz
ENTRYPOINT sleep 10 && python /root/drip-deployer/rpc_server.py $RABBITMQ_HOST
ENTRYPOINT sleep 10 && \
python /root/drip-deployer/rpc_server.py $RABBITMQ_HOST
# docker build -t drip-deployer .
# docker run --name drip-deployer-inst -d drip-deployer
# docker run -e RABBITMQ_HOST=172.17.0.2 drip-deployer
......@@ -4,15 +4,16 @@ services:
mongo:
image: mongo:3
ports:
- "27017:27017"
- "127.0.0.1:27017:27017"
command: "mongod --port 27017"
restart: always
rabbit:
image: rabbitmq:3-management
ports:
- "5671-5672:5671-5672"
- "15671:15671"
- "127.0.0.1:5671-5672:5671-5672"
- "127.0.0.1:15671:15671"
- "127.0.0.1:50272:50272"
restart: always
drip-planner:
......@@ -51,6 +52,7 @@ services:
drip-manager:
depends_on:
- rabbit
- mongo
build:
context: ./manager
dockerfile: Dockerfile
......@@ -59,7 +61,12 @@ services:
environment:
RABBITMQ_HOST: rabbit
MONOG_HOST: mongo
env_file:
- ./env_file
ports:
- "8080:8080"
- "8443:8443"
#docker-compose build
#docker-compose up -d
#docker-compose up
FROM ubuntu:latest
FROM ubuntu:16.04
MAINTAINER S. Koulouzis "S.Koulouzis@uva.nl"
# ARG RABBITMQ_HOST=127.0.0.1
# ARG MONOG_HOST=127.0.0.1
ARG RELESE_VERSION=0.1
ARG RELESE_VERSION=0.2
ARG CERTS=/etc/grid-security/certificates
......@@ -14,7 +14,6 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
RUN apt-get upgrade -y
RUN apt-get install -y wget software-properties-common mongodb-clients openssh-client
# RUN apt-get install -y python-software-properties debconf-utils apt-utils
RUN add-apt-repository -y ppa:webupd8team/java
RUN apt-get update
RUN "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
......@@ -33,15 +32,27 @@ RUN tar -xzvf drip-api-1.0-SNAPSHOT.tar.gz
RUN cat drip-api-1.0-SNAPSHOT/WEB-INF/classes/drip.properties
RUN mv drip-api-1.0-SNAPSHOT webapps/drip-api
ARG keystorePass
WORKDIR /root
EXPOSE 8080
EXPOSE 8443
# ENTRYPOINT sed -ie "s/^message.broker.host=.*/message.broker.host=$RABBITMQ_HOST/" /root/apache-tomcat-7.0.75/webapps/drip-api/WEB-INF/classes/drip.properties && sed -ie "s/^db.host=.*/db.host=$MONOG_HOST/" /root/apache-tomcat-7.0.75/webapps/drip-api/WEB-INF/classes/drip.properties && sleep 10 && /root/apache-tomcat-7.0.75/bin/shutdown.sh && /root/apache-tomcat-7.0.75/bin/startup.sh && tail -f ./apache-tomcat-7.0.75/logs/catalina.out
ENTRYPOINT sed -ie "s/^message.broker.host=.*/message.broker.host=$RABBITMQ_HOST/" /root/apache-tomcat-7.0.75/webapps/drip-api/WEB-INF/classes/drip.properties && \
sed -ie "s/^db.host=.*/db.host=$MONOG_HOST/" /root/apache-tomcat-7.0.75/webapps/drip-api/WEB-INF/classes/drip.properties && \
mongo -eval 'db.user.insert({"password":"$2a$10$QdysFgsH0sl6Y4BD84UhGO7yyNfoDPXjjEHkDJ3pX6cRfHDj2Q0BO","roles":["ADMIN"],"username":"admin","accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true})' $MONOG_HOST/drip && \
wget $KEYSTORE_URL -O keystore.tar.gz && \
tar -xzf keystore.tar.gz && \
wget https://raw.githubusercontent.com/QCAPI-DRIP/DRIP-integradation/master/conf/server.xml && \
mv /root/server.xml /root/apache-tomcat-7.0.75/conf/server.xml && \
sed -i "s#keystoreFile=\"\${user.home\}/.keystore\" keystorePass=\"changeit\"#keystoreFile=\"\${user.home\}/.keystore\" keystorePass=\"$keystorePass\"#" /root/apache-tomcat-7.0.75/conf/server.xml &&\
sleep 10 && \
/root/apache-tomcat-7.0.75/bin/startup.sh && \
tail -f /root/apache-tomcat-7.0.75/logs/catalina.out
ENTRYPOINT sed -ie "s/^message.broker.host=.*/message.broker.host=$RABBITMQ_HOST/" /root/apache-tomcat-7.0.75/webapps/drip-api/WEB-INF/classes/drip.properties && sed -ie "s/^db.host=.*/db.host=$MONOG_HOST/" /root/apache-tomcat-7.0.75/webapps/drip-api/WEB-INF/classes/drip.properties && /root/apache-tomcat-7.0.75/bin/shutdown.sh && sleep 20 && mongo -eval 'db.user.insert({"password":"$2a$10$QdysFgsH0sl6Y4BD84UhGO7yyNfoDPXjjEHkDJ3pX6cRfHDj2Q0BO","roles":["ADMIN"],"username":"admin","accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true})' $MONOG_HOST/drip && /root/apache-tomcat-7.0.75/bin/startup.sh && tail -f /root/apache-tomcat-7.0.75/logs/catalina.out
# ENTRYPOINT sed -ie "s/^message.broker.host=.*/message.broker.host=$RABBITMQ_HOST/" /root/apache-tomcat-7.0.75/webapps/drip-api/WEB-INF/classes/drip.properties && sed -ie "s/^db.host=.*/db.host=$MONOG_HOST/" /root/apache-tomcat-7.0.75/webapps/drip-api/WEB-INF/classes/drip.properties && /root/apache-tomcat-7.0.75/bin/shutdown.sh && sleep 20 && mongo -eval 'db.user.insert({"password":"$2a$10$QdysFgsH0sl6Y4BD84UhGO7yyNfoDPXjjEHkDJ3pX6cRfHDj2Q0BO","roles":["ADMIN"],"username":"admin","accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true})' $MONOG_HOST/drip && /root/apache-tomcat-7.0.75/bin/startup.sh && sleep 20 && tail -f /root/apache-tomcat-7.0.75/logs/catalina.out
# To build: docker build -t drip-manager .
# To run: docker run --name drip-manager-inst -p 127.0.0.1:8080:8080 -d drip-manager
# To build: docker build -t drip-manager --build-arg keystorePass=<password> .
# To run: docker run -p 8443:8443 -e MONOG_HOST=127.0.0.1 drip-manager -e RABBITMQ_HOST=127.0.0.1
# Pull base image
FROM ubuntu:latest
FROM ubuntu:16.04
MAINTAINER S. Koulouzis "S.Koulouzis@uva.nl"
ARG RELESE_VERSION=0.1
ARG RELESE_VERSION=0.2
ENV DEBIAN_FRONTEND=noninteractive
......@@ -32,4 +32,4 @@ RUN tar -xzvf drip-planner.tar.gz
ENTRYPOINT sleep 10 && python /root/drip-planner/rpc_server.py $RABBITMQ_HOST
# docker build -t drip-planner .
# docker run --name drip-planner-inst -d drip-planner
# docker run -e RABBITMQ_HOST=172.17.0.2 drip-planner
# Pull base image
FROM ubuntu:latest
FROM ubuntu:16.04
MAINTAINER Huan "h.zhou@uva.nl"
# ARG RABBITMQ_HOST=127.0.0.1
# ARG MONOG_HOST=127.0.0.1
ARG RELESE_VERSION=0.1
ARG RELESE_VERSION=0.2
ARG CERTS=/etc/grid-security/certificates
WORKDIR /root/
......@@ -15,7 +15,7 @@ WORKDIR /root/
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
RUN apt-get upgrade -y
RUN apt-get install -y openssh-server wget git inetutils-ping software-properties-common build-essential libssl-dev libffi-dev graphviz graphviz-dev python-pip
RUN apt-get install -y openssh-server wget git inetutils-ping software-properties-common
##install java
RUN apt-get install -y python-software-properties debconf-utils apt-utils
......@@ -35,13 +35,13 @@ RUN wget https://raw.githubusercontent.com/EGI-FCTF/fedcloud-userinterface/maste
RUN chmod +x fedcloud-ui.sh
RUN ./fedcloud-ui.sh
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/drip-provisioner-1.0-SNAPSHOT-jar-with-dependencies.jar
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/database.tar.gz
RUN tar -xzvf database.tar.gz
RUN wget https://github.com/QCAPI-DRIP/DRIP-integradation/releases/download/$RELESE_VERSION/etc.tar.gz
RUN tar -xzvf etc.tar.gz
RUN echo trusted.certificates.folder=$CERTS >> provisioner.properties
RUN echo domain.info.path=/root/drip-provisioner >> provisioner.properties
RUN cat provisioner.properties
ENTRYPOINT echo rabbitmq.host=$RABBITMQ_HOST >> /root/drip-provisioner/provisioner.propertie && sleep 10 & java -jar /root/drip-provisioner/drip-provisioner-1.0-SNAPSHOT-jar-with-dependencies.jar /root/drip-provisioner/provisioner.propertie
ENTRYPOINT echo rabbitmq.host=$RABBITMQ_HOST >> /root/drip-provisioner/provisioner.properties && sleep 10 & java -jar /root/drip-provisioner/drip-provisioner-1.0-SNAPSHOT-jar-with-dependencies.jar /root/drip-provisioner/provisioner.properties
#Build: docker build -t drip-pro .
# Run: docker run --name drip-pro-inst -d drip-pro
#Run: docker run -e RABBITMQ_HOST=172.17.0.2 drip-pro
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