From 25e0a5471beb2c2ede4cb3a0d948721cbf05d8e3 Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Wed, 14 Oct 2020 02:37:09 +0200 Subject: [PATCH] Ensure CI initializes passwords over localhost Prevents the occasional connection timeout when the tool randomly picks the IP of the ingress interface (usually 10.0.0.x/24) instead of the elk interface (usually 10.0.1.x/24) in Swarm mode. --- .github/workflows/scripts/elasticsearch-setup-passwords.exp | 2 +- elasticsearch/config/elasticsearch.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/elasticsearch-setup-passwords.exp b/.github/workflows/scripts/elasticsearch-setup-passwords.exp index 48bafed..3061f92 100755 --- a/.github/workflows/scripts/elasticsearch-setup-passwords.exp +++ b/.github/workflows/scripts/elasticsearch-setup-passwords.exp @@ -12,7 +12,7 @@ if { [string match "swarm" $MODE] } { set cid [exec docker ps -q -f label=com.docker.compose.service=elasticsearch] } -set cmd "docker exec -it $cid bin/elasticsearch-setup-passwords interactive -s -b" +set cmd "docker exec -it $cid bin/elasticsearch-setup-passwords interactive -s -b -u http://localhost:9200" spawn {*}$cmd diff --git a/elasticsearch/config/elasticsearch.yml b/elasticsearch/config/elasticsearch.yml index 0410152..86822dd 100644 --- a/elasticsearch/config/elasticsearch.yml +++ b/elasticsearch/config/elasticsearch.yml @@ -3,7 +3,7 @@ ## https://github.com/elastic/elasticsearch/blob/master/distribution/docker/src/docker/config/elasticsearch.yml # cluster.name: "docker-cluster" -network.host: _site_ +network.host: 0.0.0.0 ## X-Pack settings ## see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-xpack.html