From: calvinosanch Date: Fri, 26 Jul 2019 10:46:00 +0000 (+0000) Subject: BUG 703 fix - Check if zookeeper is initialized before kafka X-Git-Tag: v6.0.2rc1~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=74ec0fa29974bffa20c307f8e74f53e184eda98a;p=osm%2Fdevops.git BUG 703 fix - Check if zookeeper is initialized before kafka Change-Id: I93810203efd9de329f1ecbdd9970ef3cf266c16b Signed-off-by: calvinosanch (cherry picked from commit fc9481155a63b4433184ae4f87f608af1dc76dd2) --- diff --git a/installers/docker/docker-compose.yaml b/installers/docker/docker-compose.yaml index 621664ac..c325776c 100644 --- a/installers/docker/docker-compose.yaml +++ b/installers/docker/docker-compose.yaml @@ -1,3 +1,21 @@ +## +# Copyright 2019 ETSI +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +## + +######################################################################## + version: '3' volumes: ro: @@ -39,6 +57,11 @@ services: KAFKA_LOG_RETENTION_HOURS: 24 volumes: - /var/run/docker.sock:/var/run/docker.sock + healthcheck: + test: zookeeper-shell.sh zookeeper:2181 ls /brokers/ids 2>&1 | grep "Node does not exist" && exit 1 || exit 0 + interval: 20s + timeout: 10s + retries: 5 #depends_on: # - zookeeper mongo: