|
1 | 1 | # What is Elasticsearch?
|
2 | 2 |
|
3 |
| -Elasticsearch is a search server based on Lucene. It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents. |
4 |
| - |
5 |
| -Elasticsearch is a registered trademark of Elasticsearch BV. |
| 3 | +Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected. |
6 | 4 |
|
7 | 5 | > [wikipedia.org/wiki/Elasticsearch](https://en.wikipedia.org/wiki/Elasticsearch)
|
8 | 6 |
|
9 | 7 | %%LOGO%%
|
10 | 8 |
|
11 |
| -# How to use this image |
12 |
| - |
13 |
| -## Cluster |
14 |
| - |
15 |
| -**Note:** since 5.0, Elasticsearch only listens on `localhost` by default on both http and transport, so this image sets `http.host` to `0.0.0.0` (given that `localhost` is not terribly useful in the Docker context). |
16 |
| - |
17 |
| -As a result, this image does not support clustering out of the box and extra configuration must be set in order to support it. |
18 |
| - |
19 |
| -Supporting clustering implies having Elasticsearch in a production mode which is more strict about the bootstrap checks that it performs, especially when checking the value of `vm.max_map_count` which is not namespaced and thus must be set to an acceptable value on the host (as opposed to simply using `--sysctl` on `docker run`). |
20 |
| - |
21 |
| -One example of adding clustering support is to pass the configuration on the `docker run`: |
22 |
| - |
23 |
| -```console |
24 |
| -$ docker run -d --name elas elasticsearch -Etransport.host=0.0.0.0 -Ediscovery.zen.minimum_master_nodes=1 |
25 |
| -``` |
26 |
| - |
27 |
| -See the following sections of the upstream documentation for more information: |
| 9 | +# About This Image |
28 | 10 |
|
29 |
| -- [Setup Elasticsearch » Important System Configuration » Virtual memory](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/vm-max-map-count.html) |
30 |
| -- [Setup Elasticsearch » Bootstrap Checks » Maximum map count check](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/_maximum_map_count_check.html) |
| 11 | +This default distribution is governed by the Elastic License, and includes the [full set of free features](https://www.elastic.co/subscriptions). |
31 | 12 |
|
32 |
| -This [comment in elastic/elasticsearch#4978](https://github.com/elastic/elasticsearch/issues/4978#issuecomment-258676104) shows why this change was added in upstream. |
| 13 | +View the detailed release notes [here](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/release-notes-6.4.1.html). |
33 | 14 |
|
34 |
| -> Elasticsearch will not start in production mode if `vm.max_map_count` is not high enough. [...] If the value on your system is NOT high enough, then your cluster is going to crash and burn at some stage and you will lose data. |
| 15 | +Not the version you're looking for? View all supported [past releases](https://www.docker.elastic.co). |
35 | 16 |
|
36 |
| -## Running Containers |
| 17 | +# How to use this image |
37 | 18 |
|
38 |
| -You can run the default `elasticsearch` command simply: |
| 19 | +**Note:** Pulling an images requires using a specific version number tag. The `latest` tag is not supported. |
39 | 20 |
|
40 |
| -```console |
41 |
| -$ docker run -d elasticsearch |
42 |
| -``` |
| 21 | +For Elasticsearch versions prior to 6.4.0 a full list of images, tags, and documentation can be found at [docker.elastic.co](https://www.docker.elastic.co/). |
43 | 22 |
|
44 |
| -You can also pass in additional flags to `elasticsearch`: |
| 23 | +For full Elasticsearch documentation see [here](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/index.html). |
45 | 24 |
|
46 |
| -```console |
47 |
| -$ docker run -d elasticsearch -Des.node.name="TestNode" |
48 |
| -``` |
| 25 | +**The commands below are intended for deploying in a development context only. For production installation and configuration, see [Install Elasticsearch with Docker](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docker.html).** |
49 | 26 |
|
50 |
| -This image comes with a default set of configuration files for `elasticsearch`, but if you want to provide your own set of configuration files, you can do so via a volume mounted at `/usr/share/elasticsearch/config`: |
| 27 | +## Running in Development Mode |
51 | 28 |
|
52 | 29 | ```console
|
53 |
| -$ docker run -d -v "$PWD/config":/usr/share/elasticsearch/config elasticsearch |
| 30 | +$ docker pull elasticsearch:tag |
54 | 31 | ```
|
55 | 32 |
|
56 |
| -This image is configured with a volume at `/usr/share/elasticsearch/data` to hold the persisted index data. Use that path if you would like to keep the data in a mounted volume: |
57 |
| - |
58 | 33 | ```console
|
59 |
| -$ docker run -d -v "$PWD/esdata":/usr/share/elasticsearch/data elasticsearch |
| 34 | +$ docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:tag |
60 | 35 | ```
|
| 36 | +## Running in Production Mode |
61 | 37 |
|
62 |
| -This image includes `EXPOSE 9200 9300` ([default `http.port`](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-http.html)), so standard container linking will make it automatically available to the linked containers. |
63 |
| - |
64 |
| -## %%STACK%% |
| 38 | +See [Install Elasticsearch with Docker](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/docker.html) |
65 | 39 |
|
66 |
| -Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:5601`, `http://localhost:5601`, or `http://host-ip:5601` (as appropriate). |
0 commit comments