deviantony / deviantony/docker-elk
Persist elasticsearch.keystore or add data before the first container starts?
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 18.4k
- Forks
- 6.9k
- Avg merge
- 7m
- Merged PRs (30d)
- 6
Description
Hi, ist there anyway to persist the elasticsearch.keystore or add things to the keystore before the container starts elasticsearch?
My problem is, i need to add a client.secret before the container starts the first time and also want to persist this data after a docker-compose stop.
- I tried:
docker-compose run elasticsearch bin/elasticsearch-keystore add xpack.security.authc.realms.oidc.oidc1.rp.client_secret
But data is gone on the next startup.
- I tried to add the following to the
docker-compose.yml
elasticsearch:
...
volumes:
...
- type: bind
source: ./elasticsearch/config/elasticsearch.keystore
target: /usr/share/elasticsearch/config/elasticsearch.keystore
Also does not work, because keystore must exist before the startup. Creating an empty file before does not help, because its the wrong format.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the docker-compose.yml Elasticsearch service and the bin/elasticsearch-keystore command described in the issue. Determine how the elasticsearch.keystore can be created before Elasticsearch starts and retained across docker-compose stop. Done means the client.secret is available on first startup and persists after stopping and restarting the container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, elasticsearch
- Domain
- devops, infrastructure, search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100