Last active
February 16, 2016 10:49
-
-
Save enxebre/59e732507104bbcc14d6 to your computer and use it in GitHub Desktop.
Easy and quick debugging a Mesos/Marathon/Consul Cluster. Load the file by ". mesos-cluster.sh". Use it
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 | |
| # Just because I'm tired of copy/paste from evernote. | |
| export MARATHON_URL=${MARATHON_URL:-'127.0.0.1:8080'} | |
| export CONSUL_URL=${CONSUL_URL:-'127.0.0.1:8500'} | |
| export MESOS_URL=${MESOS_URL:-'127.0.0.1:5050'} | |
| function mesosHealth() { | |
| curl -v -x '' "${MESOS_URL}"/master/health | |
| } | |
| function mesosVersion() { | |
| curl -v -x '' "${MESOS_URL}"/version | |
| } | |
| function marathonDeploy() { | |
| curl -v -XPOST -x '' "${MARATHON_URL}"/v2/"${1}" -d@"${2}" -H "Content-type: application/json" | |
| } | |
| function marathonDelete() { | |
| curl -v -XDELETE -x '' "${MARATHON_URL}"/v2/"${1}"/"${2}" | |
| } | |
| function marathonApps() { | |
| curl -v -x '' "${MARATHON_URL}"/v2/apps | |
| } | |
| function marathonEventSubscriptions() { | |
| curl -v -x '' "${MARATHON_URL}"/v2/eventSubscriptions | |
| } | |
| function marathonPing() { | |
| curl -v -x '' "${MARATHON_URL}"/ping | |
| } | |
| function marathonLogging() { | |
| curl -v -x '' "${MARATHON_URL}"/Logging | |
| } | |
| function marathonMetrics() { | |
| curl -v -x '' "${MARATHON_URL}"/metrics | |
| } | |
| function consulServices() { | |
| curl -v -x '' "${CONSUL_URL}"/v1/catalog/services | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment