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.
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.
- Python project? Create a new virtual environment.
- Python + anything else? Docker-Compose is my workhorse.
In this Quick Hit, I will describe how to create a containerized installation Elasticsearch + Kibana.
docker-compose.ymlwith 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"