Last active
November 14, 2015 05:40
-
-
Save mmb/54296f0a21b22bf2c880 to your computer and use it in GitHub Desktop.
get instance hosts and ports for a Cloud Foundry app
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 -eu | |
APP_NAME=$1 | |
METADATA_URL=$( | |
cf curl /v2/apps?q=name:$APP_NAME | | |
jq -r .resources[0].metadata.url | |
) | |
cf curl $METADATA_URL/stats | \ | |
jq 'map([.stats.host, .stats.port])' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment