Define simple health check 45/59845/7
authorJakub Dudycz <jakub.dudycz@nokia.com>
Mon, 3 Sep 2018 12:15:55 +0000 (14:15 +0200)
committerGary Wu <gary.i.wu@huawei.com>
Tue, 4 Sep 2018 15:57:47 +0000 (15:57 +0000)
Change-Id: Ideac561fb0d30e48ecf0362e73145a93b0c30367
Issue-ID: DCAEGEN2-659
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
test/csit/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml

index 28cded8..66cbde2 100644 (file)
@@ -42,11 +42,17 @@ services:
     command: ["-server", "-bootstrap"]
 
   ves-hv-collector:
-    image: $DOCKER_REGISTRY/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main
+    image: $DOCKER_REGISTRY/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:latest
     ports:
+      - "6060:6060"
       - "6061:6061/tcp"
     entrypoint: ["java", "-Dio.netty.leakDetection.level=paranoid", "-cp", "*:", "org.onap.dcae.collectors.veshv.main.MainKt"]
     command: ["--listen-port", "6061","--config-url", "http://consul:8500/v1/kv/veshv-config"]
+    healthcheck:
+      interval: 10s
+      timeout: 5s
+      retries: 2
+      test: "curl --request GET --fail --silent --show-error localhost:6060/health/ready && nc -vz localhost 6061"
     depends_on:
       - kafka
     volumes:
@@ -55,7 +61,7 @@ services:
       - ves-hv-default
 
   dcae-app-simulator:
-    image: $DOCKER_REGISTRY/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-dcae-app-simulator
+    image: $DOCKER_REGISTRY/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-dcae-app-simulator:latest
     ports:
       - "6063:6063/tcp"
     command: ["--listen-port", "6063", "--kafka-bootstrap-servers", "kafka:9092", "--kafka-topics", "ves_hvRanMeas"]
@@ -63,7 +69,7 @@ services:
       interval: 10s
       timeout: 5s
       retries: 2
-      test: ["CMD", "curl", "--request", "GET", "--fail", "--silent", "--show-error", "localhost:6063/healthcheck"]
+      test: "curl --request GET --fail --silent --show-error localhost:6063/healthcheck"
     depends_on:
       - kafka
     networks: