Skip to content

Commit 71e71b1

Browse files
authored
Merge pull request #347 from georchestra/fix-elastic-health
Add elastic environment file
2 parents 8a8c907 + 620c0fe commit 71e71b1

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

.envs-elastic

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ES_USERNAME=elastic
2+
ES_PASSWORD=changeme
3+
4+
# Only needed for the built-in elasticsearch
5+
ELASTIC_PASSWORD=${ES_PASSWORD}
6+
7+
# Disable SSL for Elasticsearch
8+
xpack.security.transport.ssl.enabled: false
9+
xpack.security.http.ssl.enabled: false
10+
11+
#In order to use Kibana, you need to set the password for the kibana_system user.
12+
#docker exec -it es01 bin/elasticsearch-reset-password -u kibana_system
13+
#KIBANA_PASSWORD=<your_kibana_password>

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ For [geoserver_privileged_user_passwd.txt](secrets/geoserver_privileged_user_pas
164164

165165
Most changes will require a service restart, except maybe updating viewer contexts & addons (`F5` will do).
166166

167+
### Kibana
168+
169+
In order to have Kibana up and running, you will need to:
170+
1. After Elasticsearch up and healthy, launch the command `docker compose exec -it elasticsearch bin/elasticsearch-reset-password -u kibana_system`. It will ask to fill a password for the `kibana_system` user.
171+
2. Uncomment and fill this password into the `.envs-elastic` file.
172+
3. Enable kibana server with `scale: 1` in `docker-compose.yml`.
173+
4. Start Kibana with `docker compose up -d kibana`.
174+
167175
## Building
168176

169177
Images used in the current composition are pulled from docker hub, which means they've been compiled by [github actions](https://github.com/georchestra/georchestra/actions).

docker-compose.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.1"
2-
31
include:
42
- docker-compose.data-api.yml
53

@@ -208,8 +206,6 @@ services:
208206
condition: service_healthy
209207
database:
210208
condition: service_healthy
211-
kibana:
212-
condition: service_healthy
213209
elasticsearch:
214210
condition: service_healthy
215211
volumes:
@@ -222,6 +218,7 @@ services:
222218
env_file:
223219
- .envs-hosts
224220
- .envs-database-georchestra
221+
- .envs-elastic
225222
restart: always
226223

227224
datahub:
@@ -352,21 +349,22 @@ services:
352349
volumes:
353350
- esdata:/usr/share/elasticsearch/data
354351
healthcheck:
355-
test: ["CMD-SHELL", "curl -s -f http://localhost:9200/_cat/health >/dev/null || exit 1"]
352+
test: ["CMD-SHELL", "curl -u elastic:$$ELASTIC_PASSWORD -s -f http://localhost:9200/_cat/health >/dev/null || exit 1"]
356353
interval: 30s
357354
timeout: 10s
358355
retries: 10
359356
depends_on:
360357
envsubst:
361358
condition: service_completed_successfully
359+
env_file:
360+
- .envs-elastic
362361
environment:
363362
discovery.type: single-node
364363
ES_JAVA_OPTS: -Xms512m -Xmx512m
365-
# ES_USERNAME is elastic by default
366-
ES_PASSWORD: changeme
367364
restart: always
368365

369366
kibana:
367+
scale: 0
370368
image: docker.elastic.co/kibana/kibana:8.14.3
371369
depends_on:
372370
elasticsearch:
@@ -378,6 +376,7 @@ services:
378376
retries: 10
379377
env_file:
380378
- .envs-hosts
379+
- .envs-elastic
381380
volumes:
382381
- ./resources/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml
383382
restart: always

0 commit comments

Comments
 (0)