Giter VIP home page Giter VIP logo

docker-elasticsearch's Introduction

docker-elasticsearch

Ready to use, lean and highly configurable Elasticsearch container image.

Docker Repository on Quay.io

Current software

  • OpenJDK JRE 8u151
  • Elasticsearch 6.1.3

Run

Attention

Ready to use node for cluster elasticsearch-default:

docker run --name elasticsearch \
	--detach \
	--privileged \
	--volume /path/to/data_folder:/data \
        quay.io/pires/docker-elasticsearch:6.1.3

Ready to use node for cluster myclustername:

docker run --name elasticsearch \
	--detach \
	--privileged \
	--volume /path/to/data_folder:/data \
	-e CLUSTER_NAME=myclustername \
        quay.io/pires/docker-elasticsearch:6.1.3

Ready to use node for cluster elasticsearch-default, with 8GB heap allocated to Elasticsearch:

docker run --name elasticsearch \
	--detach \
	--privileged \
	--volume /path/to/data_folder:/data \
	-e ES_JAVA_OPTS="-Xms8g -Xmx8g" \
        quay.io/pires/docker-elasticsearch:6.1.3

Ready to use node with plugins (x-pack and repository-gcs) pre installed. Already installed plugins are ignored:

docker run --name elasticsearch \
	--detach \
	--privileged \
	--volume /path/to/data_folder:/data \
	-e ES_JAVA_OPTS="-Xms8g -Xmx8g" \
	-e ES_PLUGINS_INSTALL="repository-gcs,x-pack" \
        quay.io/pires/docker-elasticsearch:6.1.3

Master-only node for cluster elasticsearch-default:

docker run --name elasticsearch \
	--detach \
	--privileged \
	--volume /path/to/data_folder:/data \
	-e NODE_DATA=false \
	-e HTTP_ENABLE=false \
        quay.io/pires/docker-elasticsearch:6.1.3

Data-only node for cluster elasticsearch-default:

docker run --name elasticsearch \
	--detach --volume /path/to/data_folder:/data \
	--privileged \
	-e NODE_MASTER=false \
	-e HTTP_ENABLE=false \
        quay.io/pires/docker-elasticsearch:6.1.3

Data-only node for cluster elasticsearch-default with shard allocation awareness:

docker run --name elasticsearch \
	--detach --volume /path/to/data_folder:/data \
        --volume /etc/hostname:/dockerhost \
	--privileged \
	-e NODE_MASTER=false \
	-e HTTP_ENABLE=false \
    -e SHARD_ALLOCATION_AWARENESS=dockerhostname \
    -e SHARD_ALLOCATION_AWARENESS_ATTR="/dockerhost" \
        quay.io/pires/docker-elasticsearch:6.1.3

Client-only node for cluster elasticsearch-default:

docker run --name elasticsearch \
	--detach \
	--privileged \
	--volume /path/to/data_folder:/data \
	-e NODE_MASTER=false \
	-e NODE_DATA=false \
        quay.io/pires/docker-elasticsearch:6.1.3

I also make available special images and instructions for AWS EC2 and Kubernetes.

Environment variables

This image can be configured by means of environment variables, that one can set on a Deployment.

Backup

Mount a shared folder (for example via NFS) to /backup and make sure the elasticsearch user has write access. Then, set the REPO_LOCATIONS environment variable to ["/backup"] and create a backup repository:

backup_repository.json:

{
  "type": "fs",
  "settings": {
    "location": "/backup",
    "compress": true
  }
}
curl -XPOST http://<container_ip>:9200/_snapshot/nas_repository -d @backup_repository.json`

Now, you can take snapshots using:

curl -f -XPUT "http://<container_ip>:9200/_snapshot/nas_repository/snapshot_`date --utc +%Y_%m_%dt%H_%M`?wait_for_completion=true"

docker-elasticsearch's People

Contributors

artushin avatar deimosfr avatar devth avatar diwakar-s-maurya avatar errm avatar fabito avatar hikhvar avatar jaohaohsuan avatar jjungnickel avatar mindw avatar patricktoelle avatar pires avatar vganapathy1 avatar vspike avatar yukiman76 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.