From f8a391aa4f3ff25ee582738fc9576c2a31c855f6 Mon Sep 17 00:00:00 2001 From: quicksilver Date: Mon, 21 Jun 2021 16:52:05 +0800 Subject: [PATCH] [skip ci] Add etcd health check for docker compose deployments (#5930) Signed-off-by: quicksilver --- deployments/docker/cluster/docker-compose.yml | 7 ++++++- deployments/docker/standalone/docker-compose.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/deployments/docker/cluster/docker-compose.yml b/deployments/docker/cluster/docker-compose.yml index 58d095e5ba..6489087ee7 100644 --- a/deployments/docker/cluster/docker-compose.yml +++ b/deployments/docker/cluster/docker-compose.yml @@ -4,7 +4,12 @@ services: etcd: container_name: milvus-etcd image: quay.io/coreos/etcd:latest - command: etcd -listen-peer-urls=http://127.0.0.1:2380 -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 -initial-advertise-peer-urls=http://127.0.0.1:2380 --initial-cluster default=http://127.0.0.1:2380 + command: etcd -listen-peer-urls=http://127.0.0.1:2380 -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 -initial-advertise-peer-urls=http://127.0.0.1:2380 --listen-metrics-urls=http://127.0.0.1:2381 --initial-cluster default=http://127.0.0.1:2380 + healthcheck: + test: ["CMD", "wget", "-q", "--tries=1", "--spider", "http://localhost:2381/health"] + interval: 30s + timeout: 20s + retries: 3 networks: - milvus diff --git a/deployments/docker/standalone/docker-compose.yml b/deployments/docker/standalone/docker-compose.yml index 88c5cf0997..a99b1d112f 100644 --- a/deployments/docker/standalone/docker-compose.yml +++ b/deployments/docker/standalone/docker-compose.yml @@ -4,7 +4,12 @@ services: etcd: container_name: milvus-etcd image: quay.io/coreos/etcd:latest - command: etcd -listen-peer-urls=http://127.0.0.1:2380 -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 -initial-advertise-peer-urls=http://127.0.0.1:2380 --initial-cluster default=http://127.0.0.1:2380 + command: etcd -listen-peer-urls=http://127.0.0.1:2380 -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 -initial-advertise-peer-urls=http://127.0.0.1:2380 --listen-metrics-urls=http://127.0.0.1:2381 --initial-cluster default=http://127.0.0.1:2380 + healthcheck: + test: ["CMD", "wget", "-q", "--tries=1", "--spider", "http://localhost:2381/health"] + interval: 30s + timeout: 20s + retries: 3 networks: - milvus