Created
February 4, 2015 16:20
-
-
Save nottrobin/7b1ced13a0fccfeea44d to your computer and use it in GitHub Desktop.
Get the instance ID for the first machine used by a juju service
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
| #!/usr/bin/env bash | |
| # Get the instance ID for a juju machine, by machine number | |
| # Requires: | |
| # - `jq` (http://stedolan.github.io/jq/) | |
| # - `juju-first-machine-number.sh` (https://gist.github.com/nottrobin/9e7ff961cc6c00a65c61) | |
| # - `juju-instance-id.sh` (https://gist.github.com/nottrobin/f918f98a8e1e20803b5f) | |
| # Usage: | |
| # $ juju-first-instance-id.sh my-awesome-service | |
| # 92e3ef6a-ba3d-4eb4-adbc-8be78f2c8abe | |
| service_name=${1} | |
| juju-instance-id $(juju-first-machine-number ${service_name}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment