-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds MicroCloud upgrade tests from `1/stable` to `latest/edge` as well as for the MicroCeph, MicroOVN and LXD dependencies. As there might be MicroClouds running on 22.04, the test suite is modified to allow specifying a `BASE_OS` that will be used when setting up the testbed. This allows running the new `upgrade` test suite for both 22.04 and 24.04. To verify the upgrade we check the cluster status of MicroCloud and its dependencies after the upgrade. In addition some workload is deployed before the upgrade whose boot ID and network connectivity is checked afterwards. Furthermore dedicated docs are now added for update and upgrade procedures.
- Loading branch information
Showing
12 changed files
with
468 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
(howto-recover)= | ||
# How to recover a MicroCloud cluster | ||
|
||
```{note} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
(howto-update-upgrade)= | ||
# How to update and upgrade | ||
|
||
MicroCloud is made of several snaps that are closely coupled with each other. | ||
The cluster members that are part of the MicroCloud deployment must always run the same version of the snaps. | ||
This means that when the snaps on one of the cluster members are refreshed, they must also be refreshed on all other cluster members before MicroCloud is operational again. | ||
See {ref}`howto-update-upgrade-deps` for the recommended order. | ||
|
||
Before performing an update or upgrade make sure to backup your data to prevent any data loss in case of failure. | ||
See the following backup guides for each of the snaps: | ||
|
||
* {doc}`How to backup MicroCeph <microceph:explanation/taking-snapshots>` | ||
* {ref}`How to backup LXD <lxd:backups>` | ||
|
||
In case of error see {ref}`howto-recover` for troubleshooting details. | ||
|
||
(howto-update-upgrade-update)= | ||
## Update MicroCloud | ||
|
||
Updating MicroCloud allows getting the latest set of features and fixes in the tracked channels for the various snaps. | ||
Performing an update requires going through the list of snaps one after another and update each of the individual cluster members. | ||
|
||
```{note} | ||
Depending on which snap gets updated, some services of this snap (e.g. API endpoints) might not be available whilst performing the update. | ||
Check the respective services documentation on updates for more information. | ||
``` | ||
|
||
During an update the snaps channel won't be modified so the snaps get updated to the last available version inside of the current channel. | ||
This does not introduce breaking changes and can be used on a regular basis to update the MicroCloud. | ||
|
||
As MicroCloud consumes the services offered by the dependant snaps (MicroCeph, MicroOVN and LXD), the update procedure starts by updating | ||
the list of dependencies first. | ||
|
||
(howto-update-upgrade-deps)= | ||
### Update dependency snaps | ||
|
||
Updating the dependencies can be done by running `snap refresh` against the respective snap. | ||
For MicroCloud automatic snap refreshes are put on hold. See {ref}`howto-snap-control-updates` for more information. | ||
|
||
To start the update procedure, enter the following command on the first machine: | ||
|
||
sudo snap refresh microceph --cohort="+" | ||
|
||
If the command has succeeded, run the same command on the next machine and so on. | ||
|
||
```{note} | ||
Make sure to validate the health of the recently updated dependency before continuing with the next one. | ||
``` | ||
|
||
After successfully updating MicroCeph continue with MicroOVN. | ||
Again enter the following command on the first machine: | ||
|
||
sudo snap refresh microovn --cohort="+" | ||
|
||
As before run the command on all the other machines one after another if you don't observe any errors. | ||
Next we can continue to update LXD. | ||
|
||
The refresh will block until each of the LXD cluster members is updated so make sure to perform the following | ||
command on all machines in parallel: | ||
|
||
sudo snap refresh lxd --cohort="+" | ||
|
||
### Update MicroCloud snap | ||
|
||
Last but not least we can update MicroCloud. | ||
As before enter the following command on the first machine: | ||
|
||
sudo snap refresh microcloud --cohort="+" | ||
|
||
Continue running the command on the rest of the machines to finish the update. | ||
You can confirm a healthy state of the MicroCloud after the update by running the following command: | ||
|
||
sudo microcloud status | ||
|
||
```{note} | ||
The status command was introduced in MicroCloud version 2. | ||
See {ref}`howto-update-upgrade-upgrade` on how to upgrade to another track. | ||
``` | ||
|
||
(howto-update-upgrade-upgrade)= | ||
## Upgrade MicroCloud | ||
|
||
Upgrading MicroCloud allows switching to another track with major improvements and enhanced functionality. | ||
Performing an upgrade requires going through the list of snaps one after another and upgrade each of the individual cluster members. | ||
|
||
```{note} | ||
Depending on which snap gets upgraded, some services of this snap (e.g. API endpoints) might not be available whilst performing the upgrade. | ||
Check the respective services documentation on upgrades for more information. | ||
``` | ||
|
||
During an upgrade the snaps channel will be switched to another track. | ||
This might introduce breaking changes for MicroCloud and its dependencies and should be done with care. | ||
See {ref}`howto-update-upgrade-update` for regular non-breaking updates. | ||
|
||
As MicroCloud consumes the services offered by the dependant snaps (MicroCeph, MicroOVN and LXD), the update procedure starts by updating | ||
the list of dependencies first. | ||
|
||
### Upgrade dependency snaps | ||
|
||
Upgrading the dependencies can be done by running `snap refresh --channel <new track/stable>` against the respective snap. | ||
|
||
Make sure to consult the dedicated upgrade guides of each dependency before you perform the actual upgrade: | ||
|
||
* {doc}`How to upgrade MicroCeph <microceph:how-to/reef-upgrade>` | ||
* {doc}`How to upgrade MicroOVN <microovn:how-to/major-upgrades>` | ||
* {doc}`How to upgrade LXD <lxd:howto/cluster_manage>` | ||
|
||
To start the upgrade procedure, enter the following command on the first machine: | ||
|
||
sudo snap refresh microceph --channel "squid/stable" --cohort="+" | ||
|
||
If the command has succeeded, run the same command on the next machine and so on. | ||
|
||
```{note} | ||
Make sure to validate the health of the recently upgraded dependency before continuing with the next one. | ||
``` | ||
|
||
After successfully upgrading MicroCeph continue with MicroOVN. | ||
Again enter the following command on the first machine: | ||
|
||
sudo snap refresh microovn --channel "24.03/stable" --cohort="+" | ||
|
||
As before run the command on all the other machines one after another if you don't observe any errors. | ||
Next we can continue to upgrade LXD. | ||
|
||
The installer will block until each of the LXD cluster members is upgraded so make sure to perform the following | ||
command on all machines in parallel: | ||
|
||
sudo snap refresh lxd --channel "5.21/stable" --cohort="+" | ||
|
||
### Upgrade MicroCloud snap | ||
|
||
Last but not least we can upgrade MicroCloud. | ||
As before enter the following command on the first machine: | ||
|
||
sudo snap refresh microcloud --channel "2/stable" --cohort="+" | ||
|
||
Continue running the command on the rest of the machines to finish the upgrade. | ||
You can confirm a healthy state of the MicroCloud after the upgrade by running the following command: | ||
|
||
sudo microcloud status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.