From 9166f769d9336a818990c588dde793da3109709b Mon Sep 17 00:00:00 2001 From: Maarten de Waard <maarten@greenhost.nl> Date: Thu, 11 Nov 2021 15:36:51 +0100 Subject: [PATCH] improve upgrade instructions more --- docs/upgrading.rst | 10 ++++++++++ .../to-0.8.0/rename-to-stackspin.sh | 20 ++++--------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/docs/upgrading.rst b/docs/upgrading.rst index ba810f1ef..2a51bdd28 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -21,6 +21,16 @@ you get started!** wget https://open.greenhost.net/stackspin/stackspin/-/raw/main/upgrade-scripts/to-0.8.0/rename-to-stackspin.sh chmod +x rename-to-stackspin.sh +First of all, if you have any ``-override`` configmaps or secrets, you'll want +to move them from the ``oas`` namespace to the ``stackspin`` namespace, and from +``oas-apps`` to ``stackspin-apps`` (you also need to make these namespaces +first). You also need to rename them from ``oas-X`` to ``stackspin-X``. You can +use a command like this to rename the cm and move it to the right namespace. + +.. code:: bash + + kubectl get cm -n oas-apps oas-$APP-override -o json | jq '.metadata.name="stackspin-$APP-override"' | jq '.metadata.namespace="stackspin-apps"' | kubectl apply -f - + **This script will cause serious down time and it will not do everything for you**. Rather, it will prepare your cluster for the upgrade. diff --git a/upgrade-scripts/to-0.8.0/rename-to-stackspin.sh b/upgrade-scripts/to-0.8.0/rename-to-stackspin.sh index 0ef85a755..35f177b6d 100644 --- a/upgrade-scripts/to-0.8.0/rename-to-stackspin.sh +++ b/upgrade-scripts/to-0.8.0/rename-to-stackspin.sh @@ -69,7 +69,7 @@ for pvc in $oas_pvcs; do done # Move all PVCs to stackspin-apps namespace -oas_apps_pvcs="nextcloud-postgresql nextcloud-mariadb nextcloud-onlyoffice-data nextcloud-files wekan datadir-rocketchat-mongodb-0 rocketchat-rocketchat wordpress-files wordpress-mariadb" +oas_apps_pvcs="nextcloud-postgresql nextcloud-mariadb nextcloud-onlyoffice-data nextcloud-files wekan wordpress-files wordpress-mariadb" for pvc in $oas_apps_pvcs; do backup_pvc "$pvc" oas-apps stackspin-apps done @@ -93,18 +93,6 @@ flux delete --silent source git openappstack kubectl delete ns oas kubectl delete ns oas-apps -# Add the new source and kustomization -flux create source git stackspin \ - --url=https://open.greenhost.net/stackspin/stackspin \ - --branch="main" \ - --interval=1h - -flux create kustomization stackspin \ - --source=GitRepository/stackspin \ - --path="./flux2/cluster/base" \ - --prune=true \ - --interval=1h - -echo "All upgrades have been prepared, but Flux will have to do some work now. Check the progress of your flux kustomizations with 'flux get ks'. You can speed up the process by manually triggering flux reconciles". -echo "Once everything seems to work, re-add your app kustomizations by re-running the install/install-\$app script" -echo "Refer to the upgrade guide for app specific upgrades" +echo "Now check if all the Flux kustomizations and HelmReleases have disappeared. If they haven't, wait until they have. Then you can re-run the install-stackspin.sh script and after that, re-run install-apps.sh <app> for each app you want to (re)install." + +echo "Refer to the upgrade guide <https://docs.stackspin.net/en/latest/upgrading.html> for app specific upgrades." -- GitLab