Recipe Upgrade
Update the recipes about 3-4 weeks before planning the production upgrade
If you made changes to the recipe itself, please see Recipe Development for common caveats
First check if the recipe is already up-to-date with the upstream docker image. If so, you can skip to →Test the Upgrade-Process.
Preparation
Move to the folder of the recipe you want to update
Run
git pullRun
alakazam install
Upgrade image labels
Set env for current recipe (optional - personal taste):
RECIPE=<recipe_name>Upgrade the image Labels:
abra recipe upgrade $RECIPEConsider skipping db upgrades (images db, postgres)
You can consider Migrating to
pgautoupgrade- see this Issueconsider the postgres version from the docker compose file, if there is a docker compose from the app itself
Check which postgres version we used? Alpine or Debian
keep the same for pgautoupgrade: -alpine or -bookworm (for debian)
Type
yto confirm that you want to commit the changes
Check the Release Notes for Apps for breaking changes
If necessary: adapt the recipe
f you made other changes to the recipe, commit again
Optionally: add changelog to file
release/nextDon’t forget to update the
abra.shconfig versions if you changed something in the listed files in the abra.sh file.
Test the Upgrade-Process
On Dev
Set the Dev-App and Version envs (optional, personal taste)
Deploy chaos version to dev instance
APP_DOMAIN=<app>.dev.local-it.cloud abra app deploy -C $APP_DOMAINObserve the logs for any error messages while upgrading
abra app logs $APP_DOMAINespecially the upgrade process is tested by that
FOR LOCAL-IT only: On Staging
Set the version hash to the
alaka-versions.ymlof the staging instance for the recipe you upgradeRedeploy staging
Click around and check if everything works
Checklist what could break
All Apps
SSO Login
Authentik
Blueprints
In case of issues
Check here if issues for specific services/recipes are known: Troubleshooting
tune the recipe using chaos deployments
sometimes it might be that on dev there is already a chaos version deployed, than you also need to use the chaos flag to deploy, but no need to update the recipe, see Version “xxxxxxx” is unknown
abra app deploy -C $INSTANCE
If the Test the upgrade step above didn’t work on the first try or the dev version was not equal to the current stable version, you need to test the upgrade process from the stable version.
Downgrade to the stable version
abra app undeploy $APP_DOMAIN abra app volume rm $APP_DOMAIN abra app deploy $APP_DOMAIN $OLD_VERSIONTest the upgrade process again
abra app upgrade $APP_DOMAIN $NEW_VERSION
Publish the Release
Upgrade the recipe version: Create a new release (it will be directly commited and the tags pushed):
Für Breaking Changes oder Major Image Upgrades:
abra recipe release $RECIPE --majorODER für Minor Image Upgrades
abra recipe release $RECIPE --minorODER für kleinere Änderungen ausschließlich am Recipe
abra recipe release $RECIPE --patch
FOR BREAKING CHANGES: Test a new Deployment
If you changed critical parts of the recipe, you should test if a new deployment still works. Otherwise testing the upgrade process for dev is enough.
Remove the app
abra app undeploy $APP_DOMAIN abra app rm $APP_DOMAINRedeploy with alakazam:
set
<new_version>inlit-alaka/alaka-testing-versions.yamlalakazam <dev-server>.yml config -r $RECIPE alakazam <dev-server>.yml secrets -r $RECIPE alakazam <dev-server>.yml deploy -r $RECIPE alakazam <dev-server>.yml cmd --upgrade -r $RECIPE
✨Done! Next Step → Upgrade Kollektivhosting
Troubleshooting
Version “xxxxxxx” is unknown
Issue: You cannot deploy the upgraded recipe on dev to test the upgrade process
Root Cause: A version with chaos flag has been deployed (probably on dev instance) before
Solution:
Deploy again with chaos flag ON DEV
If you succeed deploy on other instances for kollektivhosting with alakazam → exclude dev instance there