Introduction
Code on Github: Elasticsearch Cluster + Docker Compose
We will setup Elasticsearch Cluster with 3 nodes with Docker Compose.
This video assumes you already know how to setup Elasticesearch Cluster and Kibana without using a Containerized system. If not then you can go here.
Requirements
- A new instance of Linux machine like Ubuntu 22.04 to act as the Server
- Docker and Docker-Compose Installed
Step 1 - Get the Code
Initialize a new git repository.
git init;
git remote add origin https://github.com/evermight/elastic-cluster-docker-compose;
git fetch -a;
git checkout master
You will likely need to set the vm.max_map_count
to avoid memory issues. Use this command:
sudo sysctl -w vm.max_map_count=262144
Build with the below docker compose command.
docker-compose up --build -d
Get the IP address of your server for it will be used as the url to the docker containers.
hostname -i
Visit Kibana page with http://<YOUR IP ADDRESS>:5601
.
Then login with the elastic username and password present at the .env
file
username: elastic
password: changeme