-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOCS] Fix keystore creation instructions for Docker #77155
Changes from 1 commit
273e038
5035b08
d32eefd
fe5f967
26d80cc
21708a4
00517f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -404,15 +404,41 @@ file is obfuscated but not encrypted. If you want to encrypt your | |
bind-mount it to the container as | ||
`/usr/share/elasticsearch/config/elasticsearch.keystore`. In order to provide | ||
the Docker container with the password at startup, set the Docker environment | ||
value `KEYSTORE_PASSWORD` to the value of your password. For example, a `docker | ||
run` command might have the following options: | ||
value `KEYSTORE_PASSWORD` to the value of your password. For example, a `docker run` | ||
command might have the following options: | ||
|
||
[source, sh] | ||
-------------------------------------------- | ||
-v full_path_to/elasticsearch.keystore:/usr/share/elasticsearch/config/elasticsearch.keystore | ||
-v full_path_to/config:/usr/share/elasticsearch/config | ||
-E KEYSTORE_PASSWORD=mypassword | ||
-------------------------------------------- | ||
|
||
If the keystore is mounted incorrectly, it will induce example Docker errors from attempting to | ||
|
||
- add keystore to running container without full reference | ||
|
||
[source,sh] | ||
-------------------------------------------- | ||
Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/config/elasticsearch.keystore.tmp -> /usr/share/elasticsearch/config/elasticsearch.keystore: Device or resource busy | ||
-------------------------------------------- | ||
|
||
- mount direct file rather than parent directory | ||
|
||
[source,sh] | ||
-------------------------------------------- | ||
Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Is a directory: SimpleFSIndexInput(path="/usr/share/elasticsearch/config/elasticsearch.keystore") | ||
Likely root cause: java.io.IOException: Is a directory | ||
-------------------------------------------- | ||
|
||
Versus a working example keystore mounting with update example would be | ||
|
||
|
||
[source,sh] | ||
-------------------------------------------- | ||
docker run -it --rm -v /amex/elasticsearch/config:/usr/share/elasticsearch/config dockerproxy.aexp.com/elasticsearch:6.8.3 bin/elasticsearch-keystore create | ||
docker run -it --rm -v /amex/elasticsearch/config:/usr/share/elasticsearch/config dockerproxy.aexp.com/elasticsearch:6.8.3 bin/elasticsearch-keystore add xpack.ssl.key_passphrase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we want references to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Man, I'm so not cool. I'd thought I'd removed those. Let me update. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, should be resolved, thanks for catching ❤️ |
||
-------------------------------------------- | ||
|
||
[[_c_customized_image]] | ||
===== Using custom Docker images | ||
In some environments, it might make more sense to prepare a custom image that contains | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrodewig I'm not sure about this sentence, can you take a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the ping @pugnascotia! I'll take a look and push some changes with edits.
Thanks for putting this together @stefnestor.