Skip to content

fxdgear/es_docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker related Elasticsearch goodness

Setup

In the elasticsearch directory is a Dockerfile and Dockerfile.xpack file for building an Elasticsearch image and Elasticsearch with X-Pack.

Build

To build your ES images you need to run

export ELASTIC_VERSION=5.5.0 && make build-elasticsearch

To build the ES image with Xpack, first build the base image (above) and then run

export ELASTIC_VERSION=5.5.0 && make build-elasticsearch-xpack

Swarm Mode

To run elastic search in swarm mode first you need to init your swarm.

docker swarm init

Once your swarm is created you can deploy elastic search by running

docker stack deploy --compose-file docker-compose.yml elasticsearch

This will deploy one node. If you want more nodes just run

docker service scale elasticsearch_elasticsearch=X  # X = number of nodes

Normal Mode

To run elasticsearch in normal mode just run

docker-compose up -d

How To Use

Lets make sure that ES is healthy.

$ docker ps

CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                     PORTS                                                    NAMES
62ffbb76f7cf        fxdgear/kibana:5.3          "/docker-entrypoin..."   8 minutes ago       Up 8 minutes (healthy)     5601/tcp                                                 elasticsearch53_kibana_1
b47276e4a976        nginx:1                     "/bin/bash -c 'ech..."   8 minutes ago       Up 8 minutes               0.0.0.0:5601->5601/tcp, 80/tcp, 0.0.0.0:9200->9200/tcp   elasticsearch53_nginx_1
e6204accab1d        fxdgear/elasticsearch:5.3   "/docker-entrypoin..."   8 minutes ago       Up 8 minutes (healthy)     9200/tcp, 9300/tcp                                       elasticsearch53_elasticsearch_1

You should see a (healthy) in the STATUS column.

You can now access http://localhost:9200 and see that the ES cluster is responding. You can now access http://localhost:5601 and see that the Kibana is responding.

About

Docker related Elasticsearch goodness

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages