Add simulator to docker-compose.yml 41/73241/3
authorkurczews <krzysztof.kurczewski@nokia.com>
Wed, 14 Nov 2018 07:14:58 +0000 (08:14 +0100)
committerkurczews <krzysztof.kurczewski@nokia.com>
Tue, 4 Dec 2018 14:21:06 +0000 (15:21 +0100)
Issue-ID: VID-354
Change-Id: If531a133c6d6267e5b956cbb9852fc15e24642d5
Signed-off-by: kurczews <krzysztof.kurczewski@nokia.com>
deliveries/.gitignore [new file with mode: 0644]
deliveries/src/main/docker/docker-files/docker-compose.yml
vid-ext-services-simulator/Dockerfile [new file with mode: 0644]
vid-ext-services-simulator/pom.xml

diff --git a/deliveries/.gitignore b/deliveries/.gitignore
new file mode 100644 (file)
index 0000000..54a4f4f
--- /dev/null
@@ -0,0 +1,2 @@
+# provide developers possibility to add or override custom properties in compose without polluting code base
+docker-compose.override.yml
\ No newline at end of file
index 6445901..eedf732 100755 (executable)
@@ -1,15 +1,21 @@
-version: '3.1'\r
+version: '3.2'\r
+\r
+# Please note this configuration is provided for local development. Do not use it on production.\r
 \r
 services:\r
     vid-server:\r
-        image: nexus3.onap.org:10001/onap/vid\r
+        image: onap/vid:latest\r
         ports:\r
             - "8080:8080"\r
-        links:\r
-            - vid-mariadb:vid-mariadb-docker-instance\r
         environment:\r
             VID_MYSQL_DBNAME: vid_openecomp_epsdk\r
             VID_MYSQL_PASS: YOUR_PASSWORD\r
+            VID_MYSQL_HOST: vid-mariadb\r
+            ASDC_CLIENT_REST_PROTOCOL: http\r
+            ASDC_CLIENT_REST_HOST: vid-simulator\r
+            ASDC_CLIENT_REST_PORT: 1080\r
+            VID_AAI_URL: http://vid-simulator:1080\r
+            VID_MSO_SERVER_URL: http://vid-simulator:1080\r
 \r
     vid-mariadb:\r
         image: mariadb:10\r
@@ -22,4 +28,7 @@ services:
             MYSQL_DATABASE: vid_openecomp_epsdk\r
             MYSQL_USER: vidadmin\r
             MYSQL_PASSWORD: YOUR_PASSWORD\r
-            MYSQL_ROOT_PASSWORD: ROOT_PASSWORD
\ No newline at end of file
+            MYSQL_ROOT_PASSWORD: ROOT_PASSWORD\r
+\r
+    vid-simulator:\r
+        image: onap/vid-simulator:latest
\ No newline at end of file
diff --git a/vid-ext-services-simulator/Dockerfile b/vid-ext-services-simulator/Dockerfile
new file mode 100644 (file)
index 0000000..6cf2d9d
--- /dev/null
@@ -0,0 +1,5 @@
+FROM tomcat:jre8-alpine
+
+RUN apk add --no-cache vim net-tools bash
+
+ADD target/vidSimulator.war ./webapps
\ No newline at end of file
index e8e827b..ed6a13c 100644 (file)
                 <coberturaBuildPhase>package</coberturaBuildPhase>
             </properties>
         </profile>
+
+        <profile>
+            <id>docker-proxy</id>
+            <!-- activate profile if environment variable `http_proxy` is set -->
+            <activation>
+                <property>
+                    <name>env.http_proxy</name>
+                </property>
+            </activation>
+            <properties>
+                <docker.buildArg.http_proxy>${env.http_proxy}</docker.buildArg.http_proxy>
+            </properties>
+        </profile>
+
     </profiles>
 
     <dependencies>
                     <target>1.8</target>
                 </configuration>
             </plugin>
+
+            <plugin>
+                <groupId>io.fabric8</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>0.27.2</version>
+
+                <configuration>
+                    <images>
+                        <image>
+                            <name>onap/vid-simulator</name>
+                            <build>
+                                <cleanup>remove</cleanup>
+                                <dockerFileDir>${project.basedir}</dockerFileDir>
+                                <tags>
+                                    <tag>${project.version}</tag>
+                                    <tag>latest</tag>
+                                </tags>
+                            </build>
+                        </image>
+                    </images>
+                </configuration>
+
+                <executions>
+                    <execution>
+                        <id>generate-image</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+
+                    <execution>
+                        <id>push-image</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>build</goal>
+                            <goal>push</goal>
+                        </goals>
+                    </execution>
+                </executions>
+
+            </plugin>
+
         </plugins>
     </build>