Created
July 19, 2020 08:17
-
-
Save Callonski/05b1a4def623ab3205379046cdb5acc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################### X-PAC SECURITY FEATURES ####################### | |
| gsutil cp "my-gcs-bucket-with-elastic-certificates" /etc/elasticsearch | |
| gsutil cp "${ca_bucket}http.p12" /etc/elasticsearch | |
| chmod 777 /etc/elasticsearch | |
| cat <<EOT >> /etc/elasticsearch/elasticsearch.yml | |
| xpack.security.http.ssl.enabled: true | |
| xpack.security.http.ssl.keystore.path: /etc/elasticsearch/http.p12 | |
| xpack.security.http.ssl.keystore.secure_password: '' | |
| xpack.security.enabled: true | |
| xpack.security.transport.ssl.enabled: true | |
| xpack.security.audit.enabled: true | |
| xpack.security.transport.ssl.verification_mode: certificate | |
| xpack.security.transport.ssl.keystore.path: /etc/elasticsearch/elastic-certificates.p12 | |
| xpack.security.transport.ssl.truststore.path: /etc/elasticsearch/elastic-certificates.p12 | |
| EOT | |
| echo "${elastic_pw}" | sudo ./bin/elasticsearch-keystore add -xf bootstrap.password | |
| systemctl restart elasticsearch.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment