Fixing dockerFile 56/112756/14
authorSingal, Kapil (ks220y) <ks220y@att.com>
Wed, 16 Sep 2020 14:49:28 +0000 (10:49 -0400)
committerSingal, Kapil (ks220y) <ks220y@att.com>
Fri, 18 Sep 2020 18:20:00 +0000 (14:20 -0400)
Fixing dockerFile and related items
Refactoring pom properties

Issue-ID: CCSDK-2794
Change-Id: Ib9d3cc38c2db65778cef2590ab774035305a16fa
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
18 files changed:
cds-ui/application/pom.xml
cds-ui/client/pom.xml
cds-ui/designer-client/pom.xml
cds-ui/pom.xml
cds-ui/server/pom.xml
ms/blueprintsprocessor/application/pom.xml
ms/blueprintsprocessor/application/src/main/docker/Dockerfile
ms/blueprintsprocessor/application/src/test/resources/logback-test.xml
ms/blueprintsprocessor/pom.xml
ms/command-executor/pom.xml
ms/command-executor/src/main/docker/Dockerfile
ms/pom.xml
ms/py-executor/docker/Dockerfile
ms/py-executor/pom.xml
ms/sdclistener/distribution/pom.xml
ms/sdclistener/parent/pom.xml
ms/sdclistener/pom.xml
pom.xml

index 368cc9c..22d5cab 100644 (file)
@@ -37,9 +37,6 @@ limitations under the License.
 
     <properties>
         <image.name>onap/ccsdk-cds-ui</image.name>
-        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
-        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
-        <docker.verbose>true</docker.verbose>
     </properties>
 
     <build>
@@ -71,7 +68,7 @@ limitations under the License.
                     <plugin>
                         <groupId>io.fabric8</groupId>
                         <artifactId>docker-maven-plugin</artifactId>
-                        <version>0.28.0</version>
+                        <version>0.34.0</version>
                         <inherited>false</inherited>
                         <configuration>
                             <images>
@@ -87,19 +84,13 @@ limitations under the License.
                                     </build>
                                 </image>
                             </images>
+                            <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>
-                                <phase>deploy</phase>
+                                <id>build-push-images</id>
+                                <phase>${docker.push.phase}</phase>
                                 <goals>
                                     <goal>build</goal>
                                     <goal>push</goal>
index c4b7ea9..ec0326a 100644 (file)
@@ -35,12 +35,6 @@ limitations under the License.
 
     <name>UI Client</name>
 
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <npm.executable>npm</npm.executable>
-        <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
-    </properties>
-
     <build>
         <plugins>
             <plugin>
index 9a1ba26..34f56e1 100644 (file)
@@ -35,12 +35,6 @@ limitations under the License.
 
     <name>UI designer Client</name>
 
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <npm.executable>npm</npm.executable>
-        <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
-    </properties>
-
     <build>
         <plugins>
             <plugin>
index 1aa6813..6d54732 100644 (file)
@@ -45,10 +45,15 @@ limitations under the License.
     </modules>
 
     <properties>
+        <npm.executable>npm</npm.executable>
         <image.name>onap/ccsdk-cds-ui</image.name>
         <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+
+        <!-- docker related properties -->
         <docker.verbose>true</docker.verbose>
+        <docker.skip.push>false</docker.skip.push>
+        <docker.push.phase>deploy</docker.push.phase>
     </properties>
 </project>
index 86e9ccb..6444385 100644 (file)
@@ -36,11 +36,7 @@ limitations under the License.
     <name>UI Server</name>
 
     <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <npm.executable>npm</npm.executable>
-        <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
         <image.name>onap/ccsdk-cds-ui-server</image.name>
-        <docker.push.phase>deploy</docker.push.phase>
     </properties>
 
     <build>
@@ -148,7 +144,7 @@ limitations under the License.
                     <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>
@@ -165,18 +161,12 @@ limitations under the License.
                                     </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>
index fdfd7d1..08390bd 100755 (executable)
@@ -38,9 +38,6 @@
         <name.space>org.onap.ccsdk.cds</name.space>
         <serviceArtifactName>blueprintsprocessor</serviceArtifactName>
         <image.name>onap/ccsdk-blueprintsprocessor</image.name>
-        <docker.push.phase>deploy</docker.push.phase>
-        <docker.verbose>true</docker.verbose>
-        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
     </properties>
 
     <dependencies>
                     <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>
                                     </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>
index 6326bb8..c4da384 100755 (executable)
@@ -9,7 +9,7 @@ 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@ \
  && touch /velocity.log \
  && chown onap:onap /velocity.log \
  && chmod 755 /velocity.log \
index 90dfed3..ed1fb9d 100644 (file)
@@ -29,8 +29,8 @@
         </sift>
     </appender>
 
-    <logger name="org.springframework.web.HttpLogging" level="trace"/>
-    <logger name="org.springframework.web.reactive.function.client.ExchangeFunctions" level="trace"/>
+    <logger name="org.springframework.web.HttpLogging" level="debug"/>
+    <logger name="org.springframework.web.reactive.function.client.ExchangeFunctions" level="debug"/>
 
     <!-- Helpful to optimize Spring Context caching to speed-up tests
          and prevent resorting to @DirtiesContext as much as possible -->
@@ -39,7 +39,7 @@
     <!-- Please refer to https://thoughts-on-java.org/hibernate-logging-guide/
          for a lengthy discussion on good Hibernate logging practices -->
     <logger name="org.hibernate.SQL" level="debug"/>
-    <logger name="org.hibernate.type.descriptor.sql" level="trace"/>
+    <logger name="org.hibernate.type.descriptor.sql" level="debug"/>
 
     <logger name="org.apache.http" level="debug"/>
     <logger name="org.apache.http.wire" level="error"/>
index f87ff14..7db4c7d 100755 (executable)
 
     <properties>
         <service.name>BlueprintsProcessor</service.name>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
-        <build.number>${maven.build.timestamp}</build.number>
-        <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
     </properties>
 </project>
index eb53379..441a22a 100755 (executable)
     <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.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
-        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
     </properties>
 
     <build>
                     <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>
                                     </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>
index 5fc1181..8f2f1a7 100644 (file)
@@ -1,11 +1,6 @@
-FROM onap/integration-python:7.0.1
+FROM python:3.7-slim
 
 USER root
-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 mkdir -p /opt/app/onap/logs/ && touch /opt/app/onap/logs/application.log
 
 # add entrypoint
@@ -18,10 +13,15 @@ RUN tar -xzf /source.tar.gz -C /tmp \
  && rm -rf /source.tar.gz \
  && rm -rf /tmp/@project.build.finalName@ \
  && mkdir -p /opt/app/onap/blueprints/deploy \
- && chown onap:onap /opt -R \
  && 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/command-executor/start.sh
index 552750a..bc0131e 100644 (file)
@@ -35,8 +35,8 @@
     <modules>
         <module>error-catalog</module>
         <module>blueprintsprocessor</module>
-        <module>py-executor</module>
         <module>command-executor</module>
+        <module>py-executor</module>
         <module>sdclistener</module>
     </modules>
 
index cdf416d..2fa6996 100644 (file)
@@ -1,8 +1,6 @@
-FROM onap/integration-python:7.0.1
+FROM python:3.7-slim
 
 USER root
-RUN python -m pip install --upgrade pip
-RUN pip install --no-cache-dir -r /opt/app/onap/python/requirements/docker.txt
 RUN mkdir -p /opt/app/onap/logs/ && touch /opt/app/onap/logs/application.log
 
 # add entrypoint
@@ -15,10 +13,14 @@ RUN tar -xzf /source.tar.gz -C /tmp \
  && rm -rf /source.tar.gz \
  && rm -rf /tmp/@project.build.finalName@ \
  && mkdir -p /opt/app/onap/blueprints/deploy \
- && chown onap:onap /opt -R \
  && 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 groupadd -r -g 1000 onap && useradd -r -u 1000 -g onap onap
+RUN chown onap:onap /opt -R
 USER onap
 ENTRYPOINT /opt/app/onap/py-executor/start.sh
index 9839c71..747eeb7 100644 (file)
     <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.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>
 
                     <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>
                                     </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>
index ac24123..f8b0110 100755 (executable)
@@ -37,9 +37,6 @@
         <image.name>onap/ccsdk-sdclistener</image.name>
         <!--disabled for now to mirror #85964 https://gerrit.onap.org/r/#/c/85964/2/ms/command-executor/pom.xml-->
         <!--<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>-->
-        <docker.push.phase>deploy</docker.push.phase>
-        <docker.verbose>true</docker.verbose>
-        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
     </properties>
 
     <dependencies>
                     <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>
                                     </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>
index 93b694c..9b79b8c 100755 (executable)
@@ -43,7 +43,6 @@
         <sdc-distribution-client.version>1.4.0</sdc-distribution-client.version>
         <jmockit.version>1.49</jmockit.version>
         <reactorcore.version>3.2.6.RELEASE</reactorcore.version>
-        <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
     </properties>
 
     <dependencyManagement>
index b46a689..054f6a0 100644 (file)
 
     <properties>
         <service.name>sdclistener</service.name>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
-        <build.number>${maven.build.timestamp}</build.number>
-        <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
+
     </properties>
 </project>
diff --git a/pom.xml b/pom.xml
index 1c9e350..c1216b8 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -65,6 +65,13 @@ limitations under the License.
         <java.version>11</java.version>
         <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
         <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
+
+        <!-- docker related properties -->
+        <docker.verbose>true</docker.verbose>
+        <docker.skip.push>false</docker.skip.push>
+        <docker.push.phase>deploy</docker.push.phase>
+
+        <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
     </properties>
 
     <build>