habajol675
(Gaylord Focker)
November 25, 2023, 9:59am
1
I want to just launch services in docker compos but without automatic configuration from the Kibana side. Can you please tell me if I can turn this off?
I see that initially it started correctly and waited for me to configure it, but then for some reason it automatically started the configuration knowing the correct password for the account. And then she started writing that she was not available.
I understand that I can make a setup and set the password that I need, but I just want to disable the automatic configuration. Can you please tell me what setting is responsible for this?
Wait configure from logs
Have problem with that
Error from logs where I have't actual password
Code from my docker compose file
stephenb
(Stephen Brown)
November 25, 2023, 3:01pm
2
The setting actually goes in the elasticsearch settings in the
environment:
- xpack.security.enrollment.enabled: false
1 Like
stephenb
(Stephen Brown)
November 25, 2023, 4:04pm
3
@habajol675
Actually you made me do it
Here is a compose with auth only no certs / SSL
I don't have a health service check on the setup but it seems to work.
It uses the .env
version: "3.8"
volumes:
esdata01:
driver: local
kibanadata:
driver: local
networks:
default:
name: elastic
external: false
services:
setup:
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
user: "0"
command: >
bash -c '
if [ x${ELASTIC_PASSWORD} == x ]; then
echo "Set the ELASTIC_PASSWORD environment variable in the .env file";
exit 1;
elif [ x${KIBANA_PASSWORD} == x ]; then
echo "Set the KIBANA_PASSWORD environment variable in the .env file";
exit 1;
fi;
until curl -s http://es01:9200 | grep -q "missing authentication credentials"; do sleep 30; done;
echo "Setting kibana_system password";
until curl -s -X POST -u "elastic:${ELASTIC_PASSWORD}" -H "Content-Type: application/json" http://es01:9200/_security/user/kibana_system/_password -d "{\"password\":\"${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done;
echo "All done!";
'
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
labels:
co.elastic.logs/module: elasticsearch
volumes:
- esdata01:/usr/share/elasticsearch/data
ports:
- ${ES_PORT}:9200
environment:
- node.name=es01
- cluster.name=${CLUSTER_NAME}
# Better for Single Node
- discovery.type=single-node
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- bootstrap.memory_lock=true
- xpack.security.enabled=true
- xpack.license.self_generated.type=${LICENSE}
mem_limit: ${ES_MEM_LIMIT}
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test:
[
"CMD-SHELL",
"curl -s http://localhost:9200 | grep -q 'missing authentication credentials'",
]
interval: 10s
timeout: 10s
retries: 120
kibana:
depends_on:
es01:
condition: service_healthy
image: docker.elastic.co/kibana/kibana:${STACK_VERSION}
labels:
co.elastic.logs/module: kibana
volumes:
- kibanadata:/usr/share/kibana/data
ports:
- ${KIBANA_PORT}:5601
environment:
- SERVERNAME=kibana
- ELASTICSEARCH_HOSTS=http://es01:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}
mem_limit: ${KB_MEM_LIMIT}
healthcheck:
test:
[
"CMD-SHELL",
"curl -s -I http://localhost:5601 | grep -q 'HTTP/1.1 302 Found'",
]
interval: 5s
timeout: 10s
retries: 10
1 Like
system
(system)
Closed
December 23, 2023, 4:05pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.