Skip to content

Commit

Permalink
All scripts print their purpose when run with no arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
pmogren committed Jul 10, 2015
1 parent a8593ae commit 2d53168
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions forward-local-ports
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# and http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-connect-master-no$

printUsage() {
echo "Forwards local ports to a cluster master over an SSH tunnel."
echo ""
echo "Usage: $0 <cluster-id> <private-key-file> [<ssh arg>*]"
echo ""
echo "Please provide first the cluster-id printed by the 'launch-cluster' command."
Expand Down
9 changes: 7 additions & 2 deletions launch-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@
# limitations under the License.


# Establishes an SSH session with local port forwarding per http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide$
# For alternative access methods, see http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-connect-master-no$
# Establishes an SSH session with local port forwarding per
# http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-ssh-tunnel-local.html
#
# For alternative methods of connecting, see
# http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-connect-master-node.html

LAUNCHER_HOME=${PWD}
CONFIGFILE=$1
if [ -z "${CONFIGFILE}" ]; then
echo "Lauches a cluster and prints the cluster-id on stdout."
echo ""
echo "Usage: $0 <configFile>"
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions ssh-to-master
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# limitations under the License.


# Assists with establishing an SSH session to an EMR cluster master.

printUsage() {
echo "Assists with establishing an SSH session to an EMR cluster master."
echo ""
echo "Usage: $0 <cluster-id> <private-key-file> [<ssh arg>*]"
echo ""
echo "Please provide first the cluster-id printed by the 'launch-cluster' command."
Expand Down
2 changes: 2 additions & 0 deletions upload-resources
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
LAUNCHER_HOME=${PWD}
CONFIGFILE=$1
if [ -z "${CONFIGFILE}" ]; then
echo "Uploads resources required for cluster launch into an S3 bucket."
echo ""
echo "Usage: $0 <configFile>"
exit 1
fi
Expand Down
4 changes: 3 additions & 1 deletion wait-until-ready
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# Waits for a cluster to be ready for use.

printUsage() {
echo "Waits for a cluster to be ready to use."
echo ""
echo "Usage: $0 <cluster-id>"
echo ""
echo "Please provide the cluster-id printed by the 'launch-cluster' command."
Expand All @@ -31,5 +33,5 @@ if [ -z "${CLUSTER_ID}" ]; then
exit 1
fi

echo "Waiting... This can take 10 minutes or more."
echo "Waiting... This can take 10 minutes or more if the cluster was launched recently."
time aws --profile ${AWS_PROFILE:-"default"} emr wait cluster-running --cluster-id ${CLUSTER_ID}

0 comments on commit 2d53168

Please sign in to comment.