Skip to content

Instantly share code, notes, and snippets.

@cdimascio
Created November 27, 2019 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdimascio/900606ede06b0a173d9cceb57716f60f to your computer and use it in GitHub Desktop.
Save cdimascio/900606ede06b0a173d9cceb57716f60f to your computer and use it in GitHub Desktop.
Install S3 credentials into Elasticsearch keystore
#!/bin/bash
./bin/elasticsearch-keystore create
echo 'XXX' | ./bin/elasticsearch-keystore add --stdin s3.client.default.access_key
echo 'XXX' | ./bin/elasticsearch-keystore add --stdin s3.client.default.secret_key
@jillesvangurp
Copy link

Thanks for this. Here's a variation that doesn't prompt when the store or keys already exist that you can blindly run at startup.

#!/usr/bin/env bash
yes | ./elasticsearch-keystore create
echo 'XXX' | /usr/share/elasticsearch/bin/elasticsearch-keystore add -f --stdin s3.client.default.access_key
echo 'XXX' | /usr/share/elasticsearch/bin/elasticsearch-keystore add -f --stdin s3.client.default.secret_key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment