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.
This commit is contained in:
Antoine Cotten 2020-10-14 02:37:09 +02:00
parent b599285dac
commit 25e0a5471b
No known key found for this signature in database
GPG Key ID: 94637E68D4A79DD0
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ if { [string match "swarm" $MODE] } {
set cid [exec docker ps -q -f label=com.docker.compose.service=elasticsearch] 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 spawn {*}$cmd

View File

@ -3,7 +3,7 @@
## https://github.com/elastic/elasticsearch/blob/master/distribution/docker/src/docker/config/elasticsearch.yml ## https://github.com/elastic/elasticsearch/blob/master/distribution/docker/src/docker/config/elasticsearch.yml
# #
cluster.name: "docker-cluster" cluster.name: "docker-cluster"
network.host: _site_ network.host: 0.0.0.0
## X-Pack settings ## X-Pack settings
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-xpack.html ## see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-xpack.html