summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-03-13 18:06:43 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-03-14 16:59:02 +0000
commit5c3cbd96b2d69b77909c4817e7c73dd3060f7f81 (patch)
treee3efec38059e6004ab6c9cc068604e2f3fef0b7f
parentf0132ba6569ea66ae28c09dfa8b80238d45958cd (diff)
downloaddefinitions-5c3cbd96b2d69b77909c4817e7c73dd3060f7f81.tar.gz
Add example cluster morph for upgrading an existing devel system
Many users will have downloaded images from git.baserock.org and set them up manually, so do not have an existing cluster morphology to upgrade with. This gives them a hint on how to use the Baserock upgrade mechanism. You can only use this mechanism from Baserock 14 onwards.
-rw-r--r--upgrade-devel.morph45
1 files changed, 45 insertions, 0 deletions
diff --git a/upgrade-devel.morph b/upgrade-devel.morph
new file mode 100644
index 00000000..fc5f5b30
--- /dev/null
+++ b/upgrade-devel.morph
@@ -0,0 +1,45 @@
+name: upgrade-devel
+kind: cluster
+description: |
+ This is a cluster morphology that can be used to deploy systems to a
+ an existing Baserock devel system, as an upgrade of the running system.
+
+ This method is for users who deployed a system manually from one of the
+ images provided on http://download.baserock.org. IT IS ONLY POSSIBLE TO
+ UPGRADE BASEROCK 14 RELEASES OR NEWER.
+
+ If you deployed your system using `morph deploy` then you should reuse the
+ cluster morphology you did the initial deployment with, instead of this one,
+ so that the configuration is preserved in the new system.
+
+ Ensure that your root user has passwordless SSH access to localhost with
+ `ssh root@localhost whoami`. If not, run `ssh-copy-id root@localhost`.
+ Make sure the 'morph' field below matches the system you are upgrading.
+
+ To upgrade, fill in $HOSTNAME and $VERSION_LABEL below and run:
+
+ morph deploy --upgrade upgrade-devel.morph
+
+ Alternatively, you can delete those two configuration lines and run:
+
+ morph deploy --upgrade upgrade-devel.HOSTNAME=$HOSTNAME upgrade-devel.VERSION_LABEL=$YYYY-MM-DD
+
+ Your configuration in /etc should be propagated to the new system, but there
+ may be merge conflicts. Check /etc for files named '.rej' and '.orig' in the
+ new system, which will indicate that there are changes from the old system
+ that must be merged manually. You can get a nice diff from the old /etc as
+ follows:
+
+ mount /dev/sda /mnt
+ git diff --no-index /mnt/systems/factory/run/etc /mnt/systems/$VERSION_LABEL/run/etc
+
+ On a base system, use 'diff -r' instead of 'git diff --no-index'. It will
+ not be as colourful.
+systems:
+- morph: devel-system-x86_64-generic
+ deploy:
+ upgrade-devel:
+ type: ssh-rsync
+ location: root@localhost
+ HOSTNAME: $HOSTNAME
+ VERSION_LABEL: $YYYY-MM-DD