aboutsummaryrefslogtreecommitdiffstats
path: root/ms/command-executor
diff options
context:
space:
mode:
Diffstat (limited to 'ms/command-executor')
-rwxr-xr-xms/command-executor/pom.xml25
-rw-r--r--ms/command-executor/src/main/docker/Dockerfile33
2 files changed, 24 insertions, 34 deletions
diff --git a/ms/command-executor/pom.xml b/ms/command-executor/pom.xml
index ceb4147e0..7cd1a2b12 100755
--- a/ms/command-executor/pom.xml
+++ b/ms/command-executor/pom.xml
@@ -20,25 +20,20 @@
<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>
<relativePath>..</relativePath>
</parent>
<artifactId>command-executor</artifactId>
<packaging>pom</packaging>
- <name>Command Executor</name>
+ <name>MS Command Executor</name>
<description>Micro-service providing python environment with gRPC binding for command execution</description>
<properties>
<assembly.id>maven</assembly.id>
<image.name>onap/ccsdk-commandexecutor</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>
</properties>
<build>
@@ -116,7 +111,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>
@@ -133,18 +128,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>
diff --git a/ms/command-executor/src/main/docker/Dockerfile b/ms/command-executor/src/main/docker/Dockerfile
index 1e5d4cbb8..8f2f1a717 100644
--- a/ms/command-executor/src/main/docker/Dockerfile
+++ b/ms/command-executor/src/main/docker/Dockerfile
@@ -1,26 +1,27 @@
-FROM python:3.6-slim
-
-ENV GRPC_PYTHON_VERSION 1.20.0
-RUN python -m pip install --upgrade pip
-RUN pip install grpcio==${GRPC_PYTHON_VERSION} grpcio-tools==${GRPC_PYTHON_VERSION}
-RUN pip install virtualenv==16.7.9
-
-RUN groupadd -r -g 1000 onap && useradd -r -u 1000 -g onap onap
-
-COPY start.sh /opt/app/onap/start.sh
-RUN chmod u+x /opt/app/onap/start.sh
+FROM python:3.7-slim
+USER root
RUN mkdir -p /opt/app/onap/logs/ && touch /opt/app/onap/logs/application.log
+# add entrypoint
+COPY start.sh /opt/app/onap/command-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@
-
-RUN mkdir -p /opt/app/onap/blueprints/deploy
-RUN chown onap:onap /opt -R
+ && rm -rf /tmp/@project.build.finalName@ \
+ && mkdir -p /opt/app/onap/blueprints/deploy \
+ && chmod 755 /opt/app/onap/command-executor/start.sh
VOLUME /opt/app/onap/blueprints/deploy/
+
+RUN python -m pip install --upgrade pip setuptools
+RUN pip install grpcio==1.20.0 grpcio-tools==1.20.0
+RUN pip install virtualenv==16.7.9
+
+RUN groupadd -r -g 1000 onap && useradd -r -u 1000 -g onap onap
+RUN chown onap:onap /opt -R
USER onap
-ENTRYPOINT /opt/app/onap/start.sh
+ENTRYPOINT /opt/app/onap/command-executor/start.sh