summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2014-08-21 15:27:31 (GMT)
committerRichard Maw <richard.maw@codethink.co.uk>2014-08-28 09:52:46 (GMT)
commit69af63a4824726cceaf176e6878bc87ca67f76e5 (patch)
tree3bce596dc7865b8a6cb7b8bf60faea89d9156707
parent864cb7fe28e99f9bfec955e929e29dbd4d1045dd (diff)
downloaddefinitions-69af63a4824726cceaf176e6878bc87ca67f76e5.tar.gz
Tidy mason deploy
-rw-r--r--clusters/mason.morph2
-rwxr-xr-xmason/mason-generator.sh16
2 files changed, 9 insertions, 9 deletions
diff --git a/clusters/mason.morph b/clusters/mason.morph
index 1aa2dad..9bac0bb 100644
--- a/clusters/mason.morph
+++ b/clusters/mason.morph
@@ -49,7 +49,7 @@ systems:
DISK_SIZE: 60G
DISTBUILD_CONTROLLER: true
HOSTNAME: red-box-v1-controller
- MASON_CLUSTER_MORPHOLOGY: ci.morph
+ MASON_CLUSTER_MORPHOLOGY: clusters/ci.morph
MASON_DEFINITIONS_REF: master
MASON_DISTBUILD_ARCH: x86_64
MASON_TEST_HOST: vm-user@vm-host:/vm-path/
diff --git a/mason/mason-generator.sh b/mason/mason-generator.sh
index c1ffeb2..652929f 100755
--- a/mason/mason-generator.sh
+++ b/mason/mason-generator.sh
@@ -53,12 +53,12 @@ sedescape() {
# Key generation
##############################################################################
-mkdir "ssh_keys-${HOST_PREFIX}"
+mkdir -p "ssh_keys-${HOST_PREFIX}"
cd "ssh_keys-${HOST_PREFIX}"
-ssh-keygen -t rsa -b 2048 -f mason.key -C mason@TROVE_HOST -N ''
-ssh-keygen -t rsa -b 2048 -f lorry.key -C lorry@TROVE_HOST -N ''
-ssh-keygen -t rsa -b 2048 -f worker.key -C worker@TROVE_HOST -N ''
-ssh-keygen -t rsa -b 2048 -f id_rsa -C trove-admin@TROVE_HOST -N ''
+test -e mason.key || ssh-keygen -t rsa -b 2048 -f mason.key -C mason@TROVE_HOST -N ''
+test -e lorry.key || ssh-keygen -t rsa -b 2048 -f lorry.key -C lorry@TROVE_HOST -N ''
+test -e worker.key || ssh-keygen -t rsa -b 2048 -f worker.key -C worker@TROVE_HOST -N ''
+test -e id_rsa || ssh-keygen -t rsa -b 2048 -f id_rsa -C trove-admin@TROVE_HOST -N ''
cd ../
@@ -66,7 +66,7 @@ cd ../
# Mason setup
##############################################################################
-cp mason.morph mason-${HOST_PREFIX}.morph
+cp clusters/mason.morph mason-${HOST_PREFIX}.morph
sed -i "s/red-box-v1/$(sedescape "$HOST_PREFIX")/g" "mason-$HOST_PREFIX.morph"
sed -i "s/ssh_keys/ssh_keys-$(sedescape "$HOST_PREFIX")/g" "mason-$HOST_PREFIX.morph"
@@ -81,8 +81,8 @@ sed -i "s/\.example\.com/$(sedescape "$HOST_POSTFIX")/g" "mason-$HOST_PREFIX.mor
# System building
##############################################################################
-morph build trove-system-x86_64
-morph build distbuild-system-x86_64
+morph build systems/trove-system-x86_64.morph
+morph build systems/distbuild-system-x86_64.morph
##############################################################################