Upgrading the production Mender Server installations can be a complex task. It is supported, and encouraged, but there is a number of items to take into account:
The present section describes the general steps required and recommended for any case of Mender upgrade.
In the following chapters the backup will be always the first item on the agenda. It is the first step in the upgrade preparation. Ideally, you should have a backup that you are sure is valid, that is: you have means to restore it to some environment and verify your setup works.
Be sure you have an up-to-date, working, and complete backup of your Mender MongoDB server
in a format identical to the one generated by mongodump
command.
Be sure you either enable versioning on your S3 buckets or otherwise backup the artifact storage. During the upgrade procedure it is highly unlikely that something can go wrong with the blob storage, however we recommend being extra careful, and especially so during the restore to staging (see the next section).
We recommend to spin up a staging environment, and deploy the backup you created in the previous section to it. After you make sure it works, you should perform the upgrade on staging. It serves two purposes:
Be prepared that in some complicated upgrades there may be a period when the Mender Server is not available, or otherwise presents lack of proper service, or incomplete data to the clients. Exercising our imagination we can come up with a scenario when during a certain upgrade a flood of request will lead to data inconsistencies. To mitigate that risk it is better to prepare a maintenance window to complete the upgrade in its due time and place.
Once the new version is up and running give a UI a full refresh without cache, and enjoy your upgraded Mender installation.
© 2024 Northern.tech AS