aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/distribution/src/main
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-02-09 18:33:55 -0500
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-02-12 13:02:59 -0500
commit91162610de8efaa9c0bfd73ff99fcabe0ef23e8a (patch)
tree9300ec6ecba33b570812a856ca2b6955d8d268af /ms/blueprintsprocessor/distribution/src/main
parent702a59b0ac36cfdd9eed43e539f953f5277877eb (diff)
Multiple fixes & enhancement
- Rework docker image build - Fix compress function - Fix node type name for source-primary-db Change-Id: Ide38e17036e76047d9f850b714ba0da4add5cd9d Issue-ID: CCSDK-414 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'ms/blueprintsprocessor/distribution/src/main')
-rwxr-xr-xms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml3
-rwxr-xr-xms/blueprintsprocessor/distribution/src/main/docker/Dockerfile17
-rwxr-xr-xms/blueprintsprocessor/distribution/src/main/docker/distribution.xml30
-rwxr-xr-xms/blueprintsprocessor/distribution/src/main/docker/run.source12
-rw-r--r--ms/blueprintsprocessor/distribution/src/main/docker/startService.sh1
5 files changed, 22 insertions, 41 deletions
diff --git a/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml b/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml
index c0eade50..1e197442 100755
--- a/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml
+++ b/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml
@@ -22,9 +22,6 @@ services:
ports:
- "8000:8080"
restart: always
- volumes:
- - ~/share/vm_ms/blueprintsprocessor/config:/opt/app/onap/config
- - ~/share/vm_ms/blueprintsprocessor/logs:/logs
environment:
APPLICATIONNAME: BlueprintsProcessor
BUNDLEVERSION: 1.0.0
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile b/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile
index bd6bcb3f..d3e10b76 100755
--- a/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile
+++ b/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile
@@ -3,19 +3,16 @@ FROM anapsix/alpine-java:8_jdk
ENV HTTP_PROXY ${HTTP_PROXY}
ENV HTTPS_PROXY ${HTTPS_PROXY}
-RUN apk add --no-cache curl
-
+# add entrypoint
+COPY run.source /etc/run.source
COPY startService.sh /startService.sh
RUN chmod 777 /startService.sh && dos2unix /startService.sh
+# add application
COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
-
-RUN (mkdir -p /source /opt/app/onap) && (tar -xzf /source.tar.gz -C /source) \
-&& (mv /source/@project.build.finalName@ /source/app) \
-&& (cp -rf /source/app/opt/app/onap/lib /opt/app/onap/) \
-&& (cp -rf /source/app/etc /) \
-&& (cp -rf /source/app/config /) \
-&& (cp -rf /source/app/scripts /opt/app/onap/) \
-&& (rm -rf /source)
+RUN tar -xzf /source.tar.gz -C /tmp \
+ && cp -rf /tmp/@project.build.finalName@/opt / \
+ && rm -rf /source.tar.gz \
+ && rm -rf /tmp/@project.build.finalName@
ENTRYPOINT /startService.sh \ No newline at end of file
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml b/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml
index f84ed2dc..3137eb49 100755
--- a/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml
+++ b/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml
@@ -38,36 +38,12 @@
<include>application.properties</include>
<include>logback.xml</include>
</includes>
- <outputDirectory>./</outputDirectory>
+ <outputDirectory>/opt/app/onap/config</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
<fileSet>
- <directory>${project.basedir}/src/main/docker</directory>
- <includes>
- <include>Dockerfile</include>
- <include>startService.sh</include>
- </includes>
- <outputDirectory>./</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/src/main/resources</directory>
- <outputDirectory>src/main/resources</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/opt/app/onap/config</directory>
- <outputDirectory>./config</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../../../components/scripts/python/ccsdk_blueprints</directory>
- <outputDirectory>./scripts/jython</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../application/etc</directory>
- <outputDirectory>./etc</outputDirectory>
+ <directory>${project.basedir}/../../../components/scripts/python</directory>
+ <outputDirectory>/opt/app/onap/scripts/jython</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/run.source b/ms/blueprintsprocessor/distribution/src/main/docker/run.source
new file mode 100755
index 00000000..7557ab12
--- /dev/null
+++ b/ms/blueprintsprocessor/distribution/src/main/docker/run.source
@@ -0,0 +1,12 @@
+java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \
+-DappName=${APPLICATIONNAME} -DappVersion=${BUNDLEVERSION} \
+-DrouteOffer=${ROUTEOFFER} \
+-DVERSION_ROUTEOFFER_ENVCONTEXT=${BUNDLEVERSION}/${STICKYSELECTORKEY}/${ENVCONTEXT} \
+-DSecurityFilePath=/etc \
+-DREST_NAME_NORMALIZER_PATTERN_FILE=/etc/PatternInputs.txt \
+-Dms_name=org.onap.ccsdk.apps.blueprintsprocessor \
+-Dlogging.config=${APP_CONFIG_HOME}/logback.xml \
+-Djava.security.egd=file:/dev/./urandom \
+-DAPPNAME=${APP_NAME} -DAPPENV=${APP_ENV} -DAPPVERSION=${APP_VERSION} -DNAMESPACE=${NAMESPACE} \
+-Dspring.config.location=${APP_CONFIG_HOME}/ \
+org.onap.ccsdk.apps.blueprintsprocessor.BlueprintProcessorApplication
diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh b/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh
index 5f75de8a..88497156 100644
--- a/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh
+++ b/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh
@@ -5,5 +5,4 @@ nodeName=BlueprintsProcessor_1.0.0_$(cat /proc/self/cgroup | grep docker | sed s
echo "APP Config HOME : ${APP_CONFIG_HOME}"
export APP_HOME=/opt/app/onap
-mv -rf /config /opt/app/onap/
source /etc/run.source