$ docker run -d --name elastic-master blacktop/elasticsearch:2.4 master
$ docker run -d --name elastic-client -p 9200:9200 --link elastic-master blacktop/elasticsearch:kopf client
$ docker run -d --name elastic-data-1 --link elastic-master blacktop/elasticsearch:2.4 data
$ docker run -d --name elastic-data-2 --link elastic-master blacktop/elasticsearch:2.4 data
$ docker run -d --name elastic-data-3 --link elastic-master blacktop/elasticsearch:2.4 data
$ docker run -d --name kibana -p 5601:5601 --link elastic-client:elasticsearch:4.6 kibana
Or you can use docker-compose:
$ curl -sL https://raw.githubusercontent.com/blacktop/docker-elasticsearch-alpine/master/docker-compose.yml \
> docker-compose.yml
$ docker-compose up -d
$ docker-compose scale data=3
NOTE:
docker-compose.yml
assumes you have more than 4GB of RAM available.
Now you can:
- Navigate to: http://localhost:5601 for Kibana
- Navigate to: http://localhost:9200/_plugin/kopf for kopf
NOTE: Example usage assumes you are using Docker for Mac