summaryrefslogtreecommitdiff
path: root/mason/mason-generator.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mason/mason-generator.sh')
-rwxr-xr-xmason/mason-generator.sh72
1 files changed, 37 insertions, 35 deletions
diff --git a/mason/mason-generator.sh b/mason/mason-generator.sh
index 652929f2..911d879f 100755
--- a/mason/mason-generator.sh
+++ b/mason/mason-generator.sh
@@ -3,45 +3,47 @@
set -e
if [ "$1" == "-h" -o "$1" == "--help" ]; then
- echo "Usage:"
- echo " `basename $0` HOST_PREFIX UPSTREAM_TROVE_HOSTNAME VM_USER VM_HOST VM_PATH [HOST_POSTFIX]"
- echo ""
- echo "Where:"
- echo " HOST_PREFIX -- Name of your Mason instance"
- echo " e.g. \"my-mason\" to produce hostnames:"
- echo " my-mason-trove and my-mason-controller"
- echo " UPSTREAM_TROVE_HOSTNAME -- Upstream trove's hostname"
- echo " VM_USER -- User on VM host for VM deployment"
- echo " VM_HOST -- VM host for VM deployment"
- echo " VM_PATH -- Path to store VM images in on VM host"
- echo " HOST_POSTFIX -- e.g. \".example.com\" to get"
- echo " my-mason-trove.example.com"
- echo ""
- echo "This script makes deploying a Mason system simpler by automating"
- echo "the generation of keys for the systems to use, building of the"
- echo "systems, filling out the mason deployment cluster morphology"
- echo "template with useful values, and finally deploying the systems."
- echo ""
- echo "To ensure that the deployed system can deploy test systems, you"
- echo "must supply an ssh key to the VM host. Do so with the following"
- echo "command:"
- echo " ssh-copy-id -i ssh_keys-HOST_PREFIX/worker.key.pub VM_USER@VM_HOST"
- echo ""
- echo "To ensure that the mason can upload artifacts to the upstream trove,"
- echo "you must supply an ssh key to the upstream trove. Do so with the"
- echo "following command:"
- echo " ssh-copy-id -i ssh_keys-HOST_PREFIX/id_rsa.key.pub root@UPSTREAM_TROVE_HOSTNAME"
- echo ""
+ cat <<EOF
+Usage:
+ `basename $0` HOST_PREFIX UPSTREAM_TROVE_HOSTNAME VM_USER VM_HOST VM_PATH [HOST_POSTFIX]
+
+Where:
+ HOST_PREFIX -- Name of your Mason instance
+ e.g. "my-mason" to produce hostnames:
+ my-mason-trove and my-mason-controller
+ UPSTREAM_TROVE_HOSTNAME -- Upstream trove's hostname
+ VM_USER -- User on VM host for VM deployment
+ VM_HOST -- VM host for VM deployment
+ VM_PATH -- Path to store VM images in on VM host
+ HOST_POSTFIX -- e.g. ".example.com" to get
+ my-mason-trove.example.com
+
+This script makes deploying a Mason system simpler by automating
+the generation of keys for the systems to use, building of the
+systems, filling out the mason deployment cluster morphology
+template with useful values, and finally deploying the systems.
+
+To ensure that the deployed system can deploy test systems, you
+must supply an ssh key to the VM host. Do so with the following
+command:
+ ssh-copy-id -i ssh_keys-HOST_PREFIX/worker.key.pub VM_USER@VM_HOST
+
+To ensure that the mason can upload artifacts to the upstream trove,
+you must supply an ssh key to the upstream trove. Do so with the
+following command:
+ ssh-copy-id -i ssh_keys-HOST_PREFIX/id_rsa.key.pub root@UPSTREAM_TROVE_HOSTNAME
+
+EOF
exit 0
fi
-HOST_PREFIX=$1
-UPSTREAM_TROVE=$2
-VM_USER=$3
-VM_HOST=$4
-VM_PATH=$5
-HOST_POSTFIX=$6
+HOST_PREFIX="$1"
+UPSTREAM_TROVE="$2"
+VM_USER="$3"
+VM_HOST="$4"
+VM_PATH="$5"
+HOST_POSTFIX="$6"
sedescape() {
# Escape all non-alphanumeric characters