diff --git a/config/docker/Dockerfile-Wilma b/config/docker/Dockerfile-Wilma new file mode 100644 index 00000000..6b562898 --- /dev/null +++ b/config/docker/Dockerfile-Wilma @@ -0,0 +1,32 @@ +FROM debian + +MAINTAINER Tamas Kohegyi + +RUN \ + mkdir /data && \ + cd /data && \ + apt-get update && \ + apt-get upgrade && \ + apt-get install -y apt-utils && \ + apt-get install -y unzip && \ + apt-get install -y openjdk-7-jre && \ + apt-get install -y wget && \ + rm -rf /var/lib/apt/lists/* && \ + wget https://github.com/epam/Wilma/releases/download/V1.1.73/wilma-application-1.1.73.zip && \ + unzip wilma-application-1.1.73.zip && \ + rm -f wilma-application-1.1.73.zip + +COPY start_wilma.sh /data/ +RUN \ + cd /data && \ + chmod 777 *.sh + +WORKDIR /data + +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 + +# you may start wilma with default settings by /data/start_wilma.sh +CMD ["bash"] + +# expose UI port, proxy port and jmx port +EXPOSE 1234 9092 9011 \ No newline at end of file diff --git a/config/docker/Dockerfile-Wilma_and_Wilma_Message_Search b/config/docker/Dockerfile-Wilma_and_Wilma_Message_Search new file mode 100644 index 00000000..794430cf --- /dev/null +++ b/config/docker/Dockerfile-Wilma_and_Wilma_Message_Search @@ -0,0 +1,28 @@ +# this starts from wilma base, so just adds the message search related things +FROM epam/wilma + +MAINTAINER Tamas Kohegyi + +RUN \ + apt-get update && \ + apt-get upgrade && \ + apt-get install -y openjdk-7-jdk && \ + rm -rf /var/libs/apt/lists/* && \ + wget https://github.com/epam/Wilma/releases/download/V1.1.73/wilma-message-search-1.1.73.zip && \ + unzip -o wilma-message-search-1.1.73.zip && \ + rm -f wilma-message-search-application-1.1.73.zip + +COPY start_wilma_and_message_search.sh /data/ +RUN \ + cd /data && \ + chmod 777 *.sh + +WORKDIR /data + +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 + +# you may start wilma and message search with default setting by /data/start_wilma_and_message_search.sh +CMD ["bash"] + +# expose UI port and jmx port of message search +EXPOSE 9093 9010 \ No newline at end of file diff --git a/config/docker/start_wilma.sh b/config/docker/start_wilma.sh new file mode 100644 index 00000000..85d6a27f --- /dev/null +++ b/config/docker/start_wilma.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +WILMA_BUILD=wilma-1.1.73.jar +WILMA_PID_FILE=/tmp/wilma.pid +WILMA_MX_SIZE= +WILMA_KEPYSTORE= +#WILMA_KESYTORE=-Djavax.net.ssl.keyStore=certificate/your.jks +WILMA_KEYSTORE_PASSWORD= +#WILMA_KEYSTORE_PASSWORD=-Djavax.net.ssl.keyStorePassword=password_for_your_jks +WILMA_START_CMD="nohup java -Dcom.sun.management.jmxremote.port=9011 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false $WILMA_MX_SIZE $WILMA_KEYSTORE $WILMA_KEYSTORE_PASSWORD -jar $WILMA_BUILD wilma.conf.properties & echo \$! > $WILMA_PID_FILE &" + +echo +echo "Welcome to dockerized Wilma!" + +echo +echo "[INFO] Docker image IP information:" +cat /etc/hosts + +echo "[INFO] Starting Wilma Application..." +eval ${WILMA_START_CMD} +echo "[INFO] Wilma Application was started, process id is $(cat ${WILMA_PID_FILE})" + diff --git a/config/docker/start_wilma_and_message_search.sh b/config/docker/start_wilma_and_message_search.sh new file mode 100644 index 00000000..dd89d4a8 --- /dev/null +++ b/config/docker/start_wilma_and_message_search.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +WILMA_BUILD=wilma-1.1.73.jar +WILMA_PID_FILE=/tmp/wilma.pid +WILMA_MX_SIZE= +WILMA_KEPYSTORE= +#WILMA_KESYTORE=-Djavax.net.ssl.keyStore=certificate/your.jks +WILMA_KEYSTORE_PASSWORD= +#WILMA_KEYSTORE_PASSWORD=-Djavax.net.ssl.keyStorePassword=password_for_your_jks +WILMA_START_CMD="nohup java -Dcom.sun.management.jmxremote.port=9011 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false $WILMA_MX_SIZE $WILMA_KEYSTORE $WILMA_KEYSTORE_PASSWORD -jar $WILMA_BUILD wilma.conf.properties & echo \$! > $WILMA_PID_FILE &" + +WILMA_MS_BUILD=wilma-message-search-1.1.73.jar +WILMA_MS_PID_FILE=/tmp/wilma-search.pid +WILMA_MS_MX_SIZE= +WILMA_MS_START_CMD="nohup java -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar $WILMA_MS_BUILD message.search.conf.properties & echo \$! > $WILMA_MS_PID_FILE &" +WILMA_MS_START_TIME=10 + +echo +echo "Welcome to dockerized Wilma & Wilma Message Search!" + +echo +echo "[INFO] Docker image IP information:" +cat /etc/hosts + +echo +echo "[INFO] Cleaning up lucene indexes..." +rm -f ./index/* +echo "[INFO] Starting Wilma Message Search Application..." +eval ${WILMA_MS_START_CMD} +echo "[INFO] Wilma Message Search Application was started, process id is $(cat ${WILMA_MS_PID_FILE})" + +echo "[INFO] Waiting $WILMA_MS_START_TIME seconds..." +sleep $WILMA_MS_START_TIME + +echo "[INFO] Starting Wilma Application..." +eval ${WILMA_START_CMD} +echo "[INFO] Wilma Application was started, process id is $(cat ${WILMA_PID_FILE})" +