summaryrefslogtreecommitdiffstats
path: root/ms/py-executor
diff options
context:
space:
mode:
Diffstat (limited to 'ms/py-executor')
-rwxr-xr-xms/py-executor/dc/docker-compose.yaml1
-rw-r--r--ms/py-executor/docker/Dockerfile20
-rwxr-xr-xms/py-executor/docker/distribution.xml6
-rw-r--r--ms/py-executor/pom.xml25
4 files changed, 21 insertions, 31 deletions
diff --git a/ms/py-executor/dc/docker-compose.yaml b/ms/py-executor/dc/docker-compose.yaml
index 63c5eeb4f..844f8b06c 100755
--- a/ms/py-executor/dc/docker-compose.yaml
+++ b/ms/py-executor/dc/docker-compose.yaml
@@ -9,6 +9,7 @@ services:
restart: always
volumes:
- blueprints-deploy:/opt/app/onap/blueprints/deploy
+ - ../certs:/opt/app/onap/python/certs
environment:
APPLICATIONNAME: PythonExecutor
BUNDLEVERSION: 1.0.0
diff --git a/ms/py-executor/docker/Dockerfile b/ms/py-executor/docker/Dockerfile
index eb43b7320..2fa699672 100644
--- a/ms/py-executor/docker/Dockerfile
+++ b/ms/py-executor/docker/Dockerfile
@@ -1,20 +1,26 @@
FROM python:3.7-slim
-RUN groupadd -r -g 1000 onap && useradd -u 1000 -r -g onap onap
-
+USER root
RUN mkdir -p /opt/app/onap/logs/ && touch /opt/app/onap/logs/application.log
+# add entrypoint
+COPY start.sh /opt/app/onap/py-executor/start.sh
+# add application
COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
+
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@
+ && rm -rf /tmp/@project.build.finalName@ \
+ && mkdir -p /opt/app/onap/blueprints/deploy \
+ && chmod 755 /opt/app/onap/py-executor/start.sh
+
+VOLUME /opt/app/onap/blueprints/deploy/
+RUN python -m pip install --upgrade pip setuptools
RUN pip install --no-cache-dir -r /opt/app/onap/python/requirements/docker.txt
-RUN mkdir -p /opt/app/onap/blueprints/deploy
+RUN groupadd -r -g 1000 onap && useradd -r -u 1000 -g onap onap
RUN chown onap:onap /opt -R
-
-VOLUME /opt/app/onap/blueprints/deploy/
USER onap
-ENTRYPOINT /opt/app/onap/python/start.sh
+ENTRYPOINT /opt/app/onap/py-executor/start.sh
diff --git a/ms/py-executor/docker/distribution.xml b/ms/py-executor/docker/distribution.xml
index 558ce2f17..a2739bdfa 100755
--- a/ms/py-executor/docker/distribution.xml
+++ b/ms/py-executor/docker/distribution.xml
@@ -68,12 +68,6 @@
<fileMode>0666</fileMode>
</fileSet>
<fileSet>
- <directory>${project.basedir}/certs</directory>
- <outputDirectory>opt/app/onap/python/certs</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- <fileMode>0666</fileMode>
- </fileSet>
- <fileSet>
<directory>${project.basedir}/docker</directory>
<outputDirectory>opt/app/onap/python</outputDirectory>
<includes>
diff --git a/ms/py-executor/pom.xml b/ms/py-executor/pom.xml
index e678ea9dc..abba69b8c 100644
--- a/ms/py-executor/pom.xml
+++ b/ms/py-executor/pom.xml
@@ -20,23 +20,18 @@
<parent>
<groupId>org.onap.ccsdk.cds</groupId>
- <artifactId>ms</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>cds-ms</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>py-executor</artifactId>
- <name>Python Script Executor</name>
+ <name>MS Python Script Executor</name>
<description>Micro-service providing python environment with gRPC binding for python script execution</description>
<properties>
<assembly.id>maven</assembly.id>
<image.name>onap/ccsdk-py-executor</image.name>
- <docker.push.phase>deploy</docker.push.phase>
- <docker.verbose>true</docker.verbose>
- <ccsdk.project.version>${project.version}</ccsdk.project.version>
- <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
- <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
<sonar.skip>true</sonar.skip>
</properties>
@@ -115,7 +110,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
- <version>0.26.1</version>
+ <version>0.34.0</version>
<inherited>false</inherited>
<configuration>
<images>
@@ -132,18 +127,12 @@
</build>
</image>
</images>
- <verbose>true</verbose>
+ <verbose>${docker.verbose}</verbose>
+ <skipPush>${docker.skip.push}</skipPush>
</configuration>
<executions>
<execution>
- <id>generate-images</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- <execution>
- <id>push-images</id>
+ <id>build-push-images</id>
<phase>${docker.push.phase}</phase>
<goals>
<goal>build</goal>