Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit 97911cc

Browse files
committed
Better instructions on removing Security plugin on Docker
1 parent 41b27b0 commit 97911cc

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

docs/elasticsearch/snapshot-restore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ readonly | Whether the repository is read-only. Useful when migrating from one c
9898
sudo ./bin/elasticsearch-plugin install repository-s3
9999
```
100100

101-
If you're using the Docker installation, see [Run with custom plugins](../../install/docker/#run-with-custom-plugins). Your `Dockerfile` should look something like this:
101+
If you're using the Docker installation, see [Customize the Docker image](../../install/docker/#customize-the-docker-image). Your `Dockerfile` should look something like this:
102102

103103
```
104104
FROM amazon/opendistro-for-elasticsearch:1.3.0

docs/install/docker.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Then run `sudo sysctl -p` to reload.
215215
The `docker-compose.yml` file above also contains several key settings: `bootstrap.memory_lock=true`, `ES_JAVA_OPTS=-Xms512m -Xmx512m`, `nofile 65536` and `port 9600`. Respectively, these settings disable memory swapping (along with `memlock`), set the size of the Java heap (we recommend half of system RAM), set a limit of 65536 open files for the Elasticsearch user, and allow you to access Performance Analyzer on port 9600.
216216

217217

218-
## Run with custom plugins
218+
## Customize the Docker image
219219

220220
To run the image with a custom plugin, first create a [`Dockerfile`](https://docs.docker.com/engine/reference/builder/):
221221

@@ -240,3 +240,18 @@ COPY --chown=elasticsearch:elasticsearch my-key-file.pem /usr/share/elasticsearc
240240
COPY --chown=elasticsearch:elasticsearch my-certificate-chain.pem /usr/share/elasticsearch/config/
241241
COPY --chown=elasticsearch:elasticsearch my-root-cas.pem /usr/share/elasticsearch/config/
242242
```
243+
244+
Alternately, you might want to remove a plugin. This `Dockerfile` removes the Security plugin:
245+
246+
```
247+
FROM amazon/opendistro-for-elasticsearch:1.3.0
248+
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin remove opendistro_security
249+
COPY --chown=elasticsearch:elasticsearch elasticsearch.yml /usr/share/elasticsearch/config/
250+
```
251+
252+
In this case, `elasticsearch.yml` is a "vanilla" version of the file with no Open Distro for Elasticsearch entries. It might look like this:
253+
254+
```yml
255+
cluster.name: "docker-cluster"
256+
network.host: 0.0.0.0
257+
```

docs/security-configuration/disable.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ opendistro_security.disabled: true
1515
1616
A more permanent option is to remove the Security plugin entirely. Delete the `plugins/opendistro_security` folder on all nodes, and delete the `opendistro_security` configuration entries from `elasticsearch.yml`.
1717

18+
To perform these steps on the Docker image, see [Customize the Docker image](../../install/docker/#customize-the-docker-image).
19+
1820
Disabling or removing the plugin exposes the configuration index for the Security plugin. If the index contains sensitive information, be sure to protect it through some other means. If you no longer need the index, delete it.
1921
{: .warning }
2022

@@ -41,8 +43,19 @@ If you disable the Security plugin in `elasticsearch.yml` (or delete the plugin
4143
```
4244
FROM amazon/opendistro-for-elasticsearch-kibana:1.3.0
4345
RUN /usr/share/kibana/bin/kibana-plugin remove opendistro_security
46+
COPY --chown=kibana:kibana kibana.yml /usr/share/kibana/config/
47+
```
48+
49+
In this case, `kibana.yml` is a "vanilla" version of the file with no Open Distro for Elasticsearch entries. It might look like this:
50+
51+
```yml
52+
---
53+
server.name: kibana
54+
server.host: "0"
55+
elasticsearch.hosts: http://localhost:9200
4456
```
4557

58+
4659
1. To build the new Docker image, run the following command:
4760

4861
```bash
@@ -52,5 +65,4 @@ If you disable the Security plugin in `elasticsearch.yml` (or delete the plugin
5265
1. In `docker-compose.yml`, change `amazon/opendistro-for-elasticsearch-kibana:1.3.0` to `kibana-no-security`.
5366
1. Change `ELASTICSEARCH_URL` (`docker-compose.yml`) or `elasticsearch.url` (your custom `kibana.yml`) to `http://` rather than `https://`.
5467
1. Change `ELASTICSEARCH_HOSTS` or `elasticsearch.hosts` to `http://` rather than `https://`.
55-
1. Remove all `opendistro_security` lines from `kibana.yml`.
5668
1. Enter `docker-compose up`.

0 commit comments

Comments
 (0)