Hello !
i'm trying to build an Elastic Stack (alias ELK) with Docker and Docker-compose, but I'm blocking on issue with X-Pack, who's prebuild into Docker's images.
i'm using officials images:
docker/elk/elasticsearch/Dockerfile:
FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.4
docker/elk/kibana/Dockerfile:
FROM docker.elastic.co/kibana/kibana:5.6.4
docker/elk/logstash/Dockerfile:
FROM docker.elastic.co/logstash/logstash:5.6.3
docker/docker-compose.dev:
version: "3.3"
services:
elasticsearch:
image: elasticsearch
ports:
- "9200:9200"
- "9300:9300"
volumes:
- ./elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
networks:
elk_network:
ipv4_address: 172.10.10.101
kibana:
build:
context: ./elk/kibana
dockerfile: Dockerfile.dev
volumes:
- ./elk/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "5601:5601"
depends_on:
- elasticsearch
networks:
elk_network:
ipv4_address: 172.10.10.102
logstash:
build:
context: ./elk/logstash
dockerfile: Dockerfile.dev
volumes:
- ./elk/logstash/config/:/usr/share/logstash/config/
- ./elk/logstash/pipeline:/usr/share/logstash/pipeline
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "5000:5000"
depends_on:
- elasticsearch
networks:
elk_network:
ipv4_address: 172.10.10.103
# DEFINE NETWORKS
networks:
elk_network:
driver: bridge
ipam:
driver: default
config:
-
subnet: 172.10.10.0/16
You can see that I'm using configuration files:
docker/elk/elasticsearch/config/elasticsearch.yml:
## Default Elasticsearch configuration from elasticsearch-docker.
## from https://github.com/elastic/elasticsearch-docker/blob/master/build/elasticsearch/elasticsearch.yml
#
cluster.name: "docker-cluster"
network.host: 0.0.0.0
# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1
## Use single node discovery in order to disable production mode and avoid bootstrap checks
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
#
discovery.type: single-node
## Disable X-Pack
## see https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html
## https://www.elastic.co/guide/en/x-pack/current/installing-xpack.html#xpack-enabling
#
# xpack.security.enabled: false
docker/elk/kibana/config/kibana.yml:
## Default Kibana configuration from kibana-docker.
## from https://github.com/elastic/kibana-docker/blob/master/build/kibana/config/kibana.yml
#
server.name: kibana
server.host: "0"
elasticsearch.url: http://elasticsearch:9200
## Disable X-Pack
## see https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html
## https://www.elastic.co/guide/en/x-pack/current/installing-xpack.html#xpack-enabling
#
# xpack.security.enabled: false
# xpack.security.useDefaultEsCredentials: false
When I'm running Docker with this configuration, all services are running but I got an error on Kibana:
Login is currently disabled because the license could not be determined. Please check that Elasticsearch is running, then refresh this page.
So, I'm trying to update my X-Pack free licence with this CURL:
curl -XPUT -u elastic:changeme 'http://172.10.10.101:9200/_xpack/license&acknowledge=true' -H "Content-Type: application/json" -d @nowis-310bd8b6-c867-4e18-aec5-3f6197daec6d-v5.json
But I got this error:
No handler found for uri [/_xpack/license&acknowledge=true] and method [PUT]
And then, when I enable X-pack plugin in Elasticsearch configuration, Elastic crash with this error:
Suppressed: java.lang.IllegalArgumentException: unknown setting [xpack.watcher.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
Did I forgot to do something ?