Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add snap upgrades how-to #934

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HomayoonAlimohammadi
Copy link
Contributor

Overview

This PR adds a how-to guide on snap upgrades.

@HomayoonAlimohammadi HomayoonAlimohammadi requested a review from a team as a code owner January 8, 2025 14:28
@HomayoonAlimohammadi HomayoonAlimohammadi force-pushed the KU-2420/snap-upgrades-how-to branch from b1095aa to 4929fd7 Compare January 8, 2025 14:30
@HomayoonAlimohammadi HomayoonAlimohammadi force-pushed the KU-2420/snap-upgrades-how-to branch from 4929fd7 to c369bb0 Compare January 8, 2025 14:39
Copy link
Contributor

@nhennigan nhennigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Few small changes suggested 😸

upgrading is not supported. For more details, please visit [Version Skew Policy][2].
- Before performing an upgrade, it's important to back up the cluster data.
This can be done by following the steps outlined in the [backup guide][3].
- For more info about managing snap updates, please refer to the [snap documentation][4].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put this one last

- Before performing an upgrade, it's important to back up the cluster data.
This can be done by following the steps outlined in the [backup guide][3].
- For more info about managing snap updates, please refer to the [snap documentation][4].
- Managing upgrades in a multi node cluster is a complex operation, and it's
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is misleading as someone may have deployed via snap and then think they can go to juju to upgrade their cluster. Maybe add a line about if have already deployed with snap only continue with this guide?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 let's remove this line


## Patch Upgrade

Patch upgrades apply bug fixes and are generally safe without API changes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Patch upgrades apply bug fixes, are generally safe and without API changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion 2: Patch upgrades address bug fixes and are typically safe, introducing no breaking changes.


2. **Change the snap channel:**
The {{product}} snap channel can be changed either by using the `snap refresh` command or by using the `snap switch` command.
The main difference between these two methods is that `snap refresh` will update the snap to the latest revision in the new channel, while `snap switch` switches to the new channel without doing a refresh.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused on the difference. Does this mean the snap switch will go to the oldest version of the new channel automatically?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snap switch will not actually update/refresh the snap but only change the track it follows.

Think of it like changing the origin of a git repository (without actually fetching).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should just explain one way of doing this (snap refresh) as snap switch is more of an edge case?

snap info k8s
k8s status --wait-ready
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a line on how you need to do this for every snap node in the cluster

@@ -26,6 +26,7 @@ two-node-ha
Set up Enhanced Platform Awareness <epa>
contribute
Get support <support>
Managing Upgrades <upgrades>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit : Managing upgrades

@@ -26,6 +26,7 @@ two-node-ha
Set up Enhanced Platform Awareness <epa>
contribute
Get support <support>
Managing Upgrades <upgrades>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also move this higher in the order. Maybe above epa

Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work Hue! Left you some minor comments.

## Important Considerations Before Upgrading

- According to the [upstream Kubernetes][1], skipping **minor** versions while
upgrading is not supported. For more details, please visit [Version Skew Policy][2].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
upgrading is not supported. For more details, please visit [Version Skew Policy][2].
upgrading is not supported. For more details, please visit the [Version Skew Policy][2].

upgrading is not supported. For more details, please visit [Version Skew Policy][2].
- Before performing an upgrade, it's important to back up the cluster data.
This can be done by following the steps outlined in the [backup guide][3].
- For more info about managing snap updates, please refer to the [snap documentation][4].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- For more info about managing snap updates, please refer to the [snap documentation][4].
- For more information on managing snap updates, please refer to the [snap documentation][4].

- Before performing an upgrade, it's important to back up the cluster data.
This can be done by following the steps outlined in the [backup guide][3].
- For more info about managing snap updates, please refer to the [snap documentation][4].
- Managing upgrades in a multi node cluster is a complex operation, and it's
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 let's remove this line

Comment on lines +19 to +21
## What you will need

- A running {{product}} cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this, it's a given.

Comment on lines +25 to +30
Patch upgrades apply bug fixes and are generally safe without API changes.
Snaps update automatically, and by default, the snapd daemon checks for updates 4 times a day.
{{product}} is installed using a specific track, which consists of a major and minor version.
As an example, if {{product}} is installed using the `1.32` track,
the snap updates automatically to the latest revision of `1.32` during daily checks.
Patch upgrades can also be triggered manually by following the steps below.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please condense this information to about half?

confirming that the cluster is ready:
```
snap info k8s
k8s status --wait-ready
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need sudo?

```
snap refresh k8s --hold
```
Or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Or
Or specify a time window:

Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, minor comments
Great work @HomayoonAlimohammadi


## Patch Upgrade

Patch upgrades apply bug fixes and are generally safe without API changes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion 2: Patch upgrades address bug fixes and are typically safe, introducing no breaking changes.

## Patch Upgrade

Patch upgrades apply bug fixes and are generally safe without API changes.
Snaps update automatically, and by default, the snapd daemon checks for updates 4 times a day.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like an implemenatation detail of the Snap ecosystem.

Maybe:

Snaps automatically check for updates several times a day and apply them when available.


2. **Change the snap channel:**
The {{product}} snap channel can be changed either by using the `snap refresh` command or by using the `snap switch` command.
The main difference between these two methods is that `snap refresh` will update the snap to the latest revision in the new channel, while `snap switch` switches to the new channel without doing a refresh.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snap switch will not actually update/refresh the snap but only change the track it follows.

Think of it like changing the origin of a git repository (without actually fetching).


2. **Change the snap channel:**
The {{product}} snap channel can be changed either by using the `snap refresh` command or by using the `snap switch` command.
The main difference between these two methods is that `snap refresh` will update the snap to the latest revision in the new channel, while `snap switch` switches to the new channel without doing a refresh.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should just explain one way of doing this (snap refresh) as snap switch is more of an edge case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants