Short reminder on how to start up quick and dirty elastic cluster using docker and docker-compose. It will start master, one node and kibana. Once it's up and running we can install hq plugin and more.

Disclaimer:
This should not be used in production, it's simple set up for quick prototyping that involves elastic.

Getting started

Requirements:

  1. Recent version of docker (tested with docker beta on OSX)
  2. Docker compose (recent version)

Up and running:

Create docker-compose.yml as shown bellow:

version: '2'  
services:  
  master:
    image: elasticsearch:2
    ports:
      - "9200:9200"
    restart: always
    container_name: es_master
    links:
        - kibana:kibana
    depends_on:
      - kibana

  es-node:
    image: elasticsearch:2
    command: elasticsearch --discovery.zen.ping.unicast.hosts=es_master
    restart: always
    container_name: es-node
    environment:
      - "affinity:container!=*master*"
      - "affinity:container!=*es-node*"
    depends_on:
      - master
      - kibana
    links:
        - master:es_master
        - kibana:kibana

  kibana:
      image: kibana:4
      environment:
          - ELASTICSEARCH_URL=http://es_master:9200
      ports:
          - "5601:5601/tcp"
      container_name: kibana

In the same directory run:

## To run in foreground run:
docker-compose up  
## or to run in background:
docker-compose up -d  

Once containers are up and running, we can install elastic HQ with the following command:

docker exec es_master plugin install royrusso/elasticsearch-HQ  

This will require Internet connectivity from docker containers, as it will fetch plugin from github, and will take a while depending on your connection speed.
Once download is done and plugin is installed, open browser and go to Elastic HQ, it should look something like this:

To access Kibana and verify it's up and running point your browser to: Kibana Frontend, and behold:

Quick, dirty and very easy, but very useful for quick proof of concept or test.

Happy hacking.