Skip to content

Run elastic stack instances on docker. Setup elastic cluster with single docker-compose.yml file.

Notifications You must be signed in to change notification settings

t0kvgh/elastic-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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.

Prerequisite

Tested on the below configuration.

  • docker:Docker version 20.10.16, build aa7e414
  • docker-compose:Docker version 20.10.16, build aa7e414

Cluster

This setup will include

  • Elasticsearch
  • Kibana
  • Logstash
  • APM

Setup

Clone repo:

git clone https://github.com/ashishtiwari1993/elastic-docker.git
cd elastic-docker

Make changes in .env file.

Start the cluster

Start

docker-compose up -d

Just visit to localhost:5601. You should see a kibana login page.

Stop

docker-compose down

Stop with deleting network, containers and volumes

docker-compose down -v

Access stacks

Elasticsearch

Access via curl from host machine

Copy ca.crt file

docker cp elastic-docker_es01_1:/usr/share/elasticsearch/config/certs/ca/ca.crt /tmp/

Curl command

curl --cacert /tmp/ca.crt -u elastic:pass@123 https://localhost:9200

Logstash

  1. 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.

NOTE

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.

About

Run elastic stack instances on docker. Setup elastic cluster with single docker-compose.yml file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%