Last active
July 31, 2019 13:54
-
-
Save franekrichardson/136f6341c5031b1eef96cca06f41ba81 to your computer and use it in GitHub Desktop.
fix-metricscluster-uri
This file contains 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 | |
set -e | |
################################## | |
# | |
# BUILD THE SCRIPT FILES | |
cat <<EOF > fix-metricscluster-uri.fssh | |
import com.fasterxml.jackson.databind.node.TextNode | |
val res = zk"/services/adminconsole/settings".update { json => | |
json.getNodePath("found.adminconsole.regions.ece-region.metrics-cluster").getOptional("server_url").foreach { _ => | |
json.setPath("found.adminconsole.regions.ece-region.metrics-cluster.server_url", TextNode.valueOf("http://containerhost:9244")) | |
} | |
json | |
}.result() | |
println(res) | |
EOF | |
docker run --env SHELL_JAVA_OPTIONS='-Dfound.shell.exec=/hostpwd/fix-metricscluster-uri.fssh' \ | |
-v $(pwd):/hostpwd -v ~/.found-shell:/elastic_cloud_apps/shell/.found-shell \ | |
--env SHELL_ZK_AUTH=$(docker exec -it frc-directors-director bash -c 'echo -n $FOUND_ZK_READWRITE') $(docker inspect -f '{{ range .HostConfig.ExtraHosts }} --add-host {{.}} {{ end }}' frc-directors-director) --rm -it $(docker inspect -f '{{ .Config.Image }}' frc-directors-director) \ | |
/elastic_cloud_apps/shell/run-shell.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment