Siv Scripts

Solving Problems Using Code

Tue 07 August 2018

Elasticsearch + Kibana using Docker Compose

Posted by Aly Sivji in Quick Hits   

Earlier this week, I went through the fantastic PyCon 2018 tutorial, Building a Search Engine with Python + Elasticsearch. This required me to have a local installation of Elasticsearch and Kibana.

Local installation? Time to spin up Docker, more specifically, Docker Compose.

Oprah meme: YOU GET A CONTAINERIZED DEVELOPMENT ENVIRONMENT! EVERYONE GETS A CONTAINERIZED DEVELOPMENT ENVIRONMENT!

Docker-Compose is a tool that allows us to define and run multi-container Docker applications. Over the past year, I've used Docker-Compose everytime I need to add another process to my development workflow.

In this Quick Hit, I will describe how to create a containerized installation Elasticsearch + Kibana.

[Note: I gave a detailed introduction to the Docker ecosystem at a Chicago Python meetup back in October 2017].


Instructions

  • Populate docker-compose.yml with the following configuration:
# ./docker-compose.yml

version: '3'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - "9200:9200"
  kibana:
    image: docker.elastic.co/kibana/kibana:6.3.2
    ports:
      - "5601:5601"

 
    
 
 

Comments