Giter VIP home page Giter VIP logo

docker-compose-elastic-kibana's Introduction

Dokcer Compose for Elasticsearch Multi nodes and Kibana with TLS enabled.

How to use

Running the Elastic Stack on Docker with TLS enabled

If security features are enabled, you must configure Transport Layer Security (TLS) encryption for the Elasticsearch transport layer. While it is possible to use a trial license without setting up TLS, we advise securing your stack from the start.

To get an Elasticsearch cluster and Kibana up and running in Docker with security enabled, you can use Docker Compose:

Generate certificates for Elasticsearch by bringing up the create-certs container:

mkdir certs elastic-master-data01 elastic-master-data02 elastic-data-data01 elastic-data-data02
chmod 777 certs elastic-master-data01 elastic-master-data02 elastic-data-data01 elastic-data-data02

docker-compose -f create-certs.yml run --rm create_certs

Bring up the three-node Elasticsearch cluster:

docker-compose -f elastic-docker-tls.yml up -d

NOTE: At this point, Kibana cannot connect to the Elasticsearch cluster. You must generate a password for the built-in kibana_system user, update the ELASTICSEARCH_PASSWORD in the compose file, and restart to enable Kibana to communicate with the secured cluster.

Run the elasticsearch-setup-passwords tool to generate passwords for all built-in users, including the kibana_system user. If you don’t use PowerShell on Windows, remove the trailing \characters and join the lines before running this command.

docker exec es01 /bin/bash -c "bin/elasticsearch-setup-passwords auto --batch --url https://elastic-master-01:9200"

NOTE: Make a note of the generated passwords. You must configure the kibana_system user password in the compose file to enable Kibana to connect to Elasticsearch, and you’ll need the password for the elastic superuser to log in to Kibana and submit requests to Elasticsearch.

Set ELASTICSEARCH_PASSWORD in the elastic-docker-tls.yml compose file to the password generated for the kibana_system user.

Use docker-compose to restart the cluster and Kibana:

docker-compose stop
docker-compose -f elastic-docker-tls.yml up -d

Open Kibana to load sample data and interact with the cluster: https://localhost:5601.

NOTE: Because SSL is also enabled for communications between Kibana and client browsers, you must access Kibana via the HTTPS protocol.


docker-compose-elastic-kibana's People

Contributors

nitinda avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.