summaryrefslogtreecommitdiffstats
path: root/controlloop/packages/docker-controlloop/src/main
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-03-07 00:23:50 -0600
committerJorge Hernandez <jorge.hernandez-herrero@att.com>2019-03-07 00:23:50 -0600
commit4ea31d702c4ae516b34f2e1f2a0e8ee468b9f73b (patch)
tree8660f38e2d478163220c0e29fafc8fe2e86c1d4a /controlloop/packages/docker-controlloop/src/main
parent2025e2d5a7d648bafc84572346fde38266b65763 (diff)
Place most of the binaries in the pdpd-cl image
This is work in progress although most of the software will be loaded with these changes. pdpd-cl is not automatically started just yet. It will be done in another review. Change-Id: I2ae527e8e8978e817963de74a1682b84137bd4b4 Issue-ID: POLICY-1560 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'controlloop/packages/docker-controlloop/src/main')
-rw-r--r--controlloop/packages/docker-controlloop/src/main/docker/Dockerfile32
1 files changed, 29 insertions, 3 deletions
diff --git a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile
index f718b1601..28631c7e6 100644
--- a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile
+++ b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile
@@ -1,7 +1,33 @@
-FROM onap/policy-drools
+FROM onap/policy-drools:1.4-SNAPSHOT-latest
ARG BUILD_VERSION_APP_CL=${BUILD_VERSION_APP_CL}
ENV BUILD_VERSION_APP_CL=${BUILD_VERSION_APP_CL}
-ADD apps-controlloop.zip ./
-RUN unzip apps-controlloop.zip
+SHELL ["/bin/bash", "-l", "-c"]
+
+COPY apps-controlloop.zip ./
+RUN unzip apps-controlloop.zip && \
+ mkdir -p ${POLICY_HOME}/logs ${POLICY_HOME}/config ${HOME}/.m2 && \
+ tar -C ${POLICY_HOME} -xvf base-${BUILD_VERSION}.tar.gz --no-same-owner && \
+ tar -C ${POLICY_HOME} -xvf basex-controlloop-${BUILD_VERSION_APP_CL}.tar.gz --no-same-owner && \
+ unzip policy-management-${BUILD_VERSION}.zip -d ${POLICY_HOME} && \
+ echo "source ${POLICY_HOME}/etc/profile.d/env.sh" >> "${HOME}/.bashrc" && \
+ sed -i -e 's!${{POLICY_HOME}}!'"${POLICY_HOME}!g" ${POLICY_HOME}/etc/profile.d/env.sh && \
+ chmod 700 ${POLICY_HOME}/bin/* && \
+ chmod 600 ${POLICY_HOME}/config/* && \
+ rm -f ${POLICY_INSTALL}/*.conf
+
+RUN source ${POLICY_HOME}/etc/profile.d/env.sh && \
+ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get \
+ --settings=${POLICY_HOME}/etc/m2/standalone-settings.xml \
+ -DartifactId=feature-controlloop-management \
+ -DgroupId=org.onap.policy.drools-applications.controlloop.common -Dversion=${BUILD_VERSION_APP_CL} && \
+ ${POLICY_HOME}/bin/features install healthcheck distributed-locking && \
+ ${POLICY_HOME}/bin/features install controlloop-utils controlloop-trans controlloop-management && \
+ ${POLICY_HOME}/bin/features install controlloop-amsterdam controlloop-casablanca && \
+ ${POLICY_HOME}/bin/features enable healthcheck distributed-locking && \
+ ${POLICY_HOME}/bin/features enable controlloop-utils controlloop-trans controlloop-management && \
+ ${POLICY_HOME}/bin/features enable controlloop-amsterdam controlloop-casablanca && \
+ rm ${POLICY_INSTALL}/*.zip ${POLICY_INSTALL}/*.gz 2> /dev/null
+
+CMD bash -l