From c78f908e447c873324ef0c52ac49d3ba99eddd18 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 22 May 2014 17:46:05 +0000 Subject: Stop setting system hostname to TROVE_ID We have hostname.configure already for setting the hostname, and nothing in Trove (gitano, LC, etc) should care about the hostname. They might care about the external name (i.e., TROVE_HOSTNAME), but that's entirely orthogonal to the system hostname. And some systems shouldn't have their system hostname set to TROVE_ID. For example, git.baserock.org's TROVE_ID is baserock, but the system hostname shouldn't be that (it's currently firehose1). --- trove.configure | 3 --- 1 file changed, 3 deletions(-) diff --git a/trove.configure b/trove.configure index 1851e38c..4bbe50d5 100755 --- a/trove.configure +++ b/trove.configure @@ -46,9 +46,6 @@ ROOT="$1" # Configuration in /etc, which we need to do on all deployments. ########################################################################## -echo "Set hostname to $TROVE_ID" -echo "$TROVE_ID" > "$ROOT/etc/hostname" - ########################################################################## lua_escape() -- cgit v1.2.1 From b439ea061edc7bc15a4c0aa4d90e511dadf2d75c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 23 May 2014 12:27:21 +0000 Subject: Add set-hostname to trove-system's config extensions --- trove-system-x86_64.morph | 1 + 1 file changed, 1 insertion(+) diff --git a/trove-system-x86_64.morph b/trove-system-x86_64.morph index f0ae109b..d599d4b7 100644 --- a/trove-system-x86_64.morph +++ b/trove-system-x86_64.morph @@ -1,5 +1,6 @@ arch: x86_64 configuration-extensions: +- set-hostname - trove - nfsboot-server - trove-backup -- cgit v1.2.1 From 7336268759f8d210d2270d0182bceda2c81766be Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 23 May 2014 12:27:38 +0000 Subject: Allow TROVE_HOSTNAME to be set separately from TROVE_ID --- trove.configure | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/trove.configure b/trove.configure index 4bbe50d5..a4000e42 100755 --- a/trove.configure +++ b/trove.configure @@ -20,6 +20,7 @@ # from the environment (see MUSTARD for a description of them): # # * TROVE_ID +# * TROVE_HOSTNAME (optional, defaults to TROVE_ID) # * TROVE_COMPANY # * LORRY_SSH_KEY # * UPSTREAM_TROVE @@ -42,6 +43,11 @@ set -e ROOT="$1" +if [ -z "$TROVE_HOSTNAME" ] +then + export TROVE_HOSTNAME="$TROVE_ID" +fi + ########################################################################## # Configuration in /etc, which we need to do on all deployments. ########################################################################## @@ -56,7 +62,7 @@ lua_escape() echo "Creating /etc/trove-setup.sed" cat < "$ROOT"/etc/trove-setup.sed -s/##TROVE_HOSTNAME##/$TROVE_ID/g +s/##TROVE_HOSTNAME##/$TROVE_HOSTNAME/g s/##MASON_HOST##/$MASON_ID/g s/##MASON_PORT##/18755/g s/##TROVE_TITLE##/$TROVE_ID/g -- cgit v1.2.1 From f5d2a0da229d63f38b11bd4bff951ab28217575f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 29 May 2014 11:13:57 +0000 Subject: Add a cluster morph for upgrading git.baserock.org --- gbo-upgrade.morph | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gbo-upgrade.morph diff --git a/gbo-upgrade.morph b/gbo-upgrade.morph new file mode 100644 index 00000000..b335c9eb --- /dev/null +++ b/gbo-upgrade.morph @@ -0,0 +1,25 @@ +kind: cluster +name: gbo-cluster +description: | + This is a cluster morphology for deploying an UPGRADE to + git.baserock.org. It doesn't work for the initial deployment. The + deployer MUST have ssh access to root@git.baserock.org. To use: + + morph deploy --upgrade gbo-cluster gbo.VERSION_LABEL=2014-05-29 + + Replace the value of gbo.VERSION_LABEL above with the current date. + You can add letters if you need to upgrade multiple times in a day. +systems: +- morph: trove-system-x86_64 + deploy: + gbo: + type: ssh-rsync + location: root@192.168.122.117 + location: root@git.baserock.org + LORRY_CONTROLLER_MINIONS: 4 + HOSTNAME: firehose1 + VERSION_LABEL: FIXME + FSTAB_HOME: LABEL=homes /home auto defaults,noatime,rw 0 2 + TROVE_ID: baserock + TROVE_HOSTNAME: git.baserock.org + TROVE_COMPANY: Baserock -- cgit v1.2.1 From 6c73f6e365a2d95d92ea36b5907f1e62da27f9b1 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 29 May 2014 16:11:54 +0000 Subject: Fixes from review --- gbo-upgrade.morph | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gbo-upgrade.morph b/gbo-upgrade.morph index b335c9eb..1a23a97c 100644 --- a/gbo-upgrade.morph +++ b/gbo-upgrade.morph @@ -1,5 +1,5 @@ kind: cluster -name: gbo-cluster +name: gbo-upgrade description: | This is a cluster morphology for deploying an UPGRADE to git.baserock.org. It doesn't work for the initial deployment. The @@ -14,11 +14,9 @@ systems: deploy: gbo: type: ssh-rsync - location: root@192.168.122.117 location: root@git.baserock.org LORRY_CONTROLLER_MINIONS: 4 HOSTNAME: firehose1 - VERSION_LABEL: FIXME FSTAB_HOME: LABEL=homes /home auto defaults,noatime,rw 0 2 TROVE_ID: baserock TROVE_HOSTNAME: git.baserock.org -- cgit v1.2.1 From 0f6b6b47fa0f7e9b79fa6a54658fa6c7f59b3adf Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 29 May 2014 16:12:15 +0000 Subject: Rename to clearer name --- gbo-upgrade.morph | 23 ----------------------- trove.baserock.org-upgrade.morph | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 gbo-upgrade.morph create mode 100644 trove.baserock.org-upgrade.morph diff --git a/gbo-upgrade.morph b/gbo-upgrade.morph deleted file mode 100644 index 1a23a97c..00000000 --- a/gbo-upgrade.morph +++ /dev/null @@ -1,23 +0,0 @@ -kind: cluster -name: gbo-upgrade -description: | - This is a cluster morphology for deploying an UPGRADE to - git.baserock.org. It doesn't work for the initial deployment. The - deployer MUST have ssh access to root@git.baserock.org. To use: - - morph deploy --upgrade gbo-cluster gbo.VERSION_LABEL=2014-05-29 - - Replace the value of gbo.VERSION_LABEL above with the current date. - You can add letters if you need to upgrade multiple times in a day. -systems: -- morph: trove-system-x86_64 - deploy: - gbo: - type: ssh-rsync - location: root@git.baserock.org - LORRY_CONTROLLER_MINIONS: 4 - HOSTNAME: firehose1 - FSTAB_HOME: LABEL=homes /home auto defaults,noatime,rw 0 2 - TROVE_ID: baserock - TROVE_HOSTNAME: git.baserock.org - TROVE_COMPANY: Baserock diff --git a/trove.baserock.org-upgrade.morph b/trove.baserock.org-upgrade.morph new file mode 100644 index 00000000..1a23a97c --- /dev/null +++ b/trove.baserock.org-upgrade.morph @@ -0,0 +1,23 @@ +kind: cluster +name: gbo-upgrade +description: | + This is a cluster morphology for deploying an UPGRADE to + git.baserock.org. It doesn't work for the initial deployment. The + deployer MUST have ssh access to root@git.baserock.org. To use: + + morph deploy --upgrade gbo-cluster gbo.VERSION_LABEL=2014-05-29 + + Replace the value of gbo.VERSION_LABEL above with the current date. + You can add letters if you need to upgrade multiple times in a day. +systems: +- morph: trove-system-x86_64 + deploy: + gbo: + type: ssh-rsync + location: root@git.baserock.org + LORRY_CONTROLLER_MINIONS: 4 + HOSTNAME: firehose1 + FSTAB_HOME: LABEL=homes /home auto defaults,noatime,rw 0 2 + TROVE_ID: baserock + TROVE_HOSTNAME: git.baserock.org + TROVE_COMPANY: Baserock -- cgit v1.2.1