Fix docker-compose files 73/41073/1
authorLusheng Ji <lji@research.att.com>
Wed, 4 Apr 2018 20:51:35 +0000 (16:51 -0400)
committerLusheng Ji <lji@research.att.com>
Wed, 4 Apr 2018 20:53:15 +0000 (16:53 -0400)
Alos breaking into two files so we can use shell script to
check for dependencies, as well as injecting KVs before
service components are up.

Issue-ID: DCAEGEN2-206
Change-Id: I8a14675ab96472f2eda86864b5e3248bd48dd00d
Signed-off-by: Lusheng Ji <lji@research.att.com>
heat/R2MVP/docker-compose-1.yaml [new file with mode: 0644]
heat/R2MVP/docker-compose-2.yaml [moved from heat/R2MVP/docker-compose.yaml with 64% similarity]

diff --git a/heat/R2MVP/docker-compose-1.yaml b/heat/R2MVP/docker-compose-1.yaml
new file mode 100644 (file)
index 0000000..6d5ed67
--- /dev/null
@@ -0,0 +1,33 @@
+version: '2.1'
+services:
+   db:
+      image: postgres:9.5
+      container_name: "db"
+      hostname: "db"
+      ports:
+       - "5432:5432"
+      environment:
+       - POSTGRES_USER=holmes
+       - POSTGRES_PASSWORD=holmespwd
+
+   consul:
+      image: consul:0.8.3
+      container_name: "consul"
+      hostname: "consul"
+      ports:
+       - "8400:8400"
+       - "8500:8500"
+       - "8600:8600"
+      command: "agent -server -bootstrap-expect 1 -client 0.0.0.0"
+
+   config_binding_service:
+      image: {{ nexus_docker_repo }}/onap/org.onap.dcaegen2.platform.configbinding:v1.2.0
+      container_name: "config_binding_service"
+      hostname: "config_binding_service"
+      environment:
+       - CONSUL_HOST="consul"
+      ports:
+       - "10000:10000"
+      depends_on:
+       - consul
+
similarity index 64%
rename from heat/R2MVP/docker-compose.yaml
rename to heat/R2MVP/docker-compose-2.yaml
index 5413a5d..c77cbf0 100644 (file)
@@ -1,34 +1,5 @@
-version: '2'
+version: '2.1'
 services:
-   db:
-      image: postgres:9.5
-      container_name: "db"
-      hostname: "db"
-      ports:
-       - "5432:5432"
-      environment:
-         POSTGRES_USER: "holmes"
-         POSTGRES_PASSWORD: "holmespwd"
-         
-   consul:
-      image: consul:0.8.3
-      container_name: "consul"
-      hostname: "consul"
-      ports:
-       - "8400:8400"
-       - "8500:8500"
-       - "8600:8600"
-      command: "-server -bootstrap-expect 1"
-
-   config_binding_service:
-      image: {{ nexus_docker_repo }}/onap/org.onap.dcaegen2.platform.configbinding:v1.2.0
-      container_name: "config_binding_service"
-      hostname: "config_binding_service"
-      environment:
-       - CONSUL_HOST: consul
-      expose:
-       - "10000:10000"
-
    ves:
       image: {{ nexus_docker_repo }}/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.2.0
       container_name: "ves"
@@ -40,7 +11,7 @@ services:
        - CONFIG_BINDING_SERVICE=config_binding_service
        - SERVICE_NAME=ves
        - HOSTNAME=ves
-      expose:
+      ports:
        - "8080:8080"
        - "8443:8443"
 
@@ -56,14 +27,14 @@ services:
        - CBS_PORT=10000
        - SERVICE_NAME=tca
        - CONFIG_BINDING_SERVICE=config_binding_service
-      expose:
+      ports:
        - "11011:11011"
        - "11015:11015"
 
    holmes-engine:
       image: {{ nexus_docker_repo }}/onap/holmes/engine-management:latest
-      conatiner_name: he
-      host_name: he
+      container_name: he
+      hostname: he
       environment:
        - URL_JDBC=db:5432
        - JDBC_USERNAME=holmes
@@ -72,13 +43,13 @@ services:
        - CONSUL_HOST=consul
        - CONSUL_PORT=8500
        - HOSTNAME=he
-      expose:
+      ports:
        - "9102:9102"
 
    holmes-rule:
       image: {{ nexus_docker_repo }}/onap/holmes/rule-management:latest
-      conatiner_name: hr
-      host_name: hr
+      container_name: hr
+      hostname: hr
       environment:
        - URL_JDBC=db:5432
        - JDBC_USERNAME=holmes
@@ -87,5 +58,5 @@ services:
        - CONSUL_HOST=consul
        - CONSUL_PORT=8500
        - HOSTNAME=hr
-      expose:
+      ports:
        - "9101:9101"