This project provides you with an elasticsearch cluster consisting of three elasticsearch instances, using the basic license. I've created it during and after the Elastic Engineer training to help me with a ready-to-go environment where I can play with the training labs.
Disclaimer: this setup is not meant for production usage!
- A machine with enough RAM (at least 8 gb allocated for the docker environment)
- Docker. (Docker Desktop will suffice for Mac or Windows, but another provider like Rancher Desktop should also work).
Some example indices are created at startup:
Docker container es-writer
writes data continuously to index test-index
and reads it using container es-reader
, all using python scripts and the official low-level elasticsearch python client library. View the data.
Example taken from the Elastic Engineer I training containing an excerpt from their online blogs. The index is created (once) from a csv file using the logstash-ingest
docker container.
View the data. This is a Static Dataset.
Example taken from the Elastic Engineer I training as well, containing an excerpt from websserver access logs for the elastic blogs website. View the data. This is a Time Series Dataset. It can take a while to import this entirely.
Make sure you provide docker with enough memory (the default 2gb of memory is not enough, consult your Docker Desktop configuration to change this), before you run it with:
docker compose up -d
OR
./run.sh
# Stop the services
./down.sh
# Stop the services and clean the volumes. This is useful for starting with a clean slate.
./clean.sh
Confirm that elasticsearch is healthy (after a little while) by visiting one of the following links from your browser or a tool like curl or httpie:
Elastic search nodes:
- cluster health
- cluster nodes
- elasticsearch1 node health
- elasticsearch2 node health
- elasticsearch3 node health
Other services:
By default, the Elasticsearch security features are disabled when you have a basic or trial license. To enable security features, use the xpack.security.enabled setting..
Starting with Elastic Stack 6.8 and 7.1, security features like TLS encrypted communication, role-based access control (RBAC), and more are available for free within the default distribution. In this blog post, we’re going to cover how to get started with using these features to secure your Elasticsearch clusters.
A folder has been bind-mounted to all elasticsearch nodes already with the purpose of sharing snapshots with the docker host. This folder is relative from this directory: ./shared_folder
.
When registering a (fs-type) snapshot repository inside elasticsearch, you should make it point to /shared_folder
from inside the container.