In this gist, we will quickly try to spin Elastic stacks with Docker containers. We are going to use docker-compose. You can learn more about Docker & Docker Compose, Which will help you to understand the flow.
Tested on the below configuration.
- docker:
Docker version 20.10.16, build aa7e414
- docker-compose:
Docker version 20.10.16, build aa7e414
This setup will include
- Elasticsearch
- Kibana
- Logstash
- APM
Clone repo:
git clone https://github.com/ashishtiwari1993/elastic-docker.git
cd elastic-docker
Make changes in .env
file.
docker-compose up -d
Just visit to localhost:5601
. You should see a kibana login page.
docker-compose down
docker-compose down -v
docker cp elastic-docker_es01_1:/usr/share/elasticsearch/config/certs/ca/ca.crt /tmp/
curl --cacert /tmp/ca.crt -u elastic:pass@123 https://localhost:9200
- You need to have pipeline configuration files on
LOGSTASH_PIPELINE_PATH
location. If there will be no file, Logstash will throw an error and get exit.
You can simply comment other stacks which is not needed. For example if you want to just run Elasticsearch & Kibana, Just comment the APM or other stack specification.