Last active
March 9, 2018 22:09
-
-
Save portante/929c983e0aa77cb57c7e451b621dc954 to your computer and use it in GitHub Desktop.
Enable/disable shard allocation in an OpenShift Elasticsearch cluster.
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
| #!/bin/bash | |
| ES_URL='https://localhost:9200' | |
| curl_put='curl -s -X PUT --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key' | |
| date | |
| $curl_put $ES_URL/_cluster/settings?pretty -d "{ \"transient\" : { \"cluster.routing.allocation.enable\" : \"$1\" } }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment