Before we start with the actual setup, let’s review what tools we are going to use and know them a little bit more. We are going to setup Elasticsearch, Kibana and Logstash all inside your local machine using Docker. Here is brief introduction to all the tools that we will be using with this setup.
What is Elasticsearch?
Elasticsearch is an open source and free tool in the Search as a Service category of a tech stack and solves problem of storing and search data in nearly real time. Its being used by many reputed companies and popular in developers due to its simplicity of implementation, easy to scale and its good documentation and support.
Kibana is an open source and free monitoring tool. Its browser-based analytics and search dashboard tool for Elasticsearch. Its used along with Elasticsearch because its free and comes with features like easy setup, good user interface, ability to setup dashboards and user-friendly way to do so many things out of Elasticsearch data.
Logstash is an open source tool for event and log management. You can use Logstash to store Elasticsearch logs and later view or analyse them with Kibana.
What is Docker?
Docker is another opensource and the most popular virtual machine and container platform which enables organizations to seamlessly build and share any application and run securely.
Okay, so now that you know a little bit about Elasticsearch, Kibana, Logstash and Docker. We will try to setup local instances of all three as Docker containers so that you can use it for your development purpose.
We will require Docker setup in your windows machine. If you are on Windows 10, install Docker Desktop for windows. For any previous version of windows desktop operating system try to use Virtualbox and Docker Toolbox. In this article we are assuming you are using Docker Desktop.
Once you have docker working locally, you can download docker-compose.yml that is shown below.
Start your powershell and switch to the folder where you have docker-compose.yml.
Enter this command to start:
This will download latest docker images of Elasticsearch, Kibana and Logstash and start containers that will be available at localhost.
Docker-compose command along with docker-compose.yml is the easiest way to setup Elasticsearch development environment with docker on windows. Now that you have all three are ready, start using them in your software development. Let us know how you go with it!