Repository navigation
Document GCS, Azure, IBM, and Oracle patch storage backends #9
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3c06220
Document GCS, Azure, IBM, and Oracle patch storage backends
kunalmohan-work 2ca1af0
update docs
kunalmohan-work 7635021
update docs
kunalmohan-work 9045d95
Use full patch-storage.* key names in cross-references; exclude Postg…
kunalmohan-work e4795ad
fix broken link
kunalmohan-work 5efacda
exclude generated build files from lint-md
kunalmohan-work dd3462d
Remove IBM HMAC-based auth references from public docs
kunalmohan-work 366b29f
Update description for IBM Cloud Object Storage patch storage
kunalmohan-work 673bbca
Revise COS bucket creation instructions
kunalmohan-work 523318a
Add redirect for supported kernels (#11)
danieltoader-canonical 549f625
address review comments
kunalmohan-work 7b49a47
Merge branch 'main' into public-cloud-storage-docs
kunalmohan-work e37e50f
address broken links and review comments
kunalmohan-work 2f04fe8
address review comments
kunalmohan-work File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
42 changes: 42 additions & 0 deletions
42
docs/server/reference/patch-storage/migrating-patch-storage.md
This file contains hidden or 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,42 @@ | ||
| --- | ||
| myst: | ||
| html_meta: | ||
| description: "Migrate patches between storage backends - learn about this topic in Livepatch on-prem." | ||
| --- | ||
|
|
||
| (server-reference-migrating-patch-storage)= | ||
|
|
||
| # Migrating patches between storage backends | ||
|
|
||
| This guide covers migrating between the file-based patch storage backends (filesystem, S3, GCS, Azure, IBM, Oracle, Swift). Each of these stores patches as a flat set of files, each keyed by its filename, so the same set of patch files works unmodified on any of them: migrating between backends is simply a matter of copying the patch files across, then updating [`patch-storage.type`](/server/reference/platform/configuration.md) and its associated options to point at the new backend. | ||
|
|
||
| The Postgres backend (`patch-storage.postgres-connection-string`) is not covered here, since it stores patches as rows in a database rather than as files, and cannot be migrated with `rsync` in the same way. | ||
|
|
||
| The recommended tool for copying patches is `rsync`. If you need checksum-based verification, add `--checksum` (note that this can be slower). Disable patch synchronisation in the config first (so no new patches arrive, and avoid running any manual syncs), then run `rsync` once to copy the existing patches across. | ||
|
|
||
| ## Filesystem to filesystem | ||
|
|
||
| If either the source or destination (or both) is the filesystem backend, `rsync` can be used directly, locally or over SSH: | ||
|
|
||
| ```bash | ||
| rsync -avz --progress /var/snap/canonical-livepatch-server/common/patches/ user@remote-host:/path/to/new/patches/ | ||
| ``` | ||
|
|
||
| ## Migrating to or from object storage | ||
|
|
||
| For the object storage backends (S3, GCS, Azure, IBM, Oracle, Swift), mount the bucket or container as a local directory with [rclone](https://rclone.org/), which supports all of these backends (including any S3-compatible endpoint, such as IBM COS or MinIO), then `rsync` into or out of the mount as if it were a normal directory. | ||
|
|
||
| 1. Disable [`patch-sync`](/server/reference/patch-management/patch-sync-filters.md) in the config so no new patches are synced to the on-prem server, and avoid running any manual syncs, while the migration is in progress. | ||
| 2. Install rclone and configure a remote for the bucket/container, following [rclone's documentation](https://rclone.org/docs/) for the relevant backend (`s3`, `google cloud storage`, `azureblob`, `swift`, or `oracle-object-storage`). | ||
| 3. Mount the remote: | ||
| ```bash | ||
| mkdir -p /mnt/livepatch-patches | ||
| rclone mount <remote-name>:<bucket-or-container> /mnt/livepatch-patches --daemon | ||
| ``` | ||
| 4. Run `rsync` to copy the existing patches across: | ||
| ```bash | ||
| rsync -avz --progress /var/snap/canonical-livepatch-server/common/patches/ /mnt/livepatch-patches/ | ||
| ``` | ||
| 5. Verify the file counts match between source and destination, then update the [patch storage config](/server/reference/platform/configuration.md) to the new backend and re-enable patch-sync. | ||
|
|
||
| The same approach applies in reverse (object storage to filesystem, or between two object storage backends) by mounting both sides and running `rsync` between the two mount points. |
19 changes: 19 additions & 0 deletions
19
docs/server/reference/patch-storage/use-azure-for-patch-storage.md
This file contains hidden or 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,19 @@ | ||
| --- | ||
| myst: | ||
| html_meta: | ||
| description: "Use Azure for patch storage - learn about this topic in Livepatch on-prem." | ||
| --- | ||
|
|
||
| (server-reference-livepatch-on-prem-with-azure-patch-storage)= | ||
|
|
||
| # Livepatch on-prem with Azure Blob Storage patch storage | ||
|
|
||
| To configure this, follow these steps: | ||
|
|
||
| - Create a Blob Storage container in the preferred region (best if the region is the same as the deployment's). Care needs to be taken to make the container not publicly writable, as this would pose a significant security risk. | ||
| - Choose an authentication method: a storage account name/key pair, a connection string, an Entra ID (Azure AD) service principal, or a managed identity bound to the VM. | ||
| - Configure the relevant Azure [config options](/server/reference/platform/configuration.md). | ||
|
|
||
| Once this is configured, Livepatch will store and retrieve patch files from the Azure Blob Storage container. | ||
|
|
||
| `patch-storage.azure-account-name` is not required when `patch-storage.azure-connection-string` is set, since the connection string already carries the account name and key. When account key, connection string, and service principal credentials are all omitted, a managed identity bound to the VM is used instead (the system-assigned identity by default, or a user-assigned identity selected via `patch-storage.azure-managed-identity-client-id`). |
19 changes: 19 additions & 0 deletions
19
docs/server/reference/patch-storage/use-gcs-for-patch-storage.md
This file contains hidden or 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,19 @@ | ||
| --- | ||
| myst: | ||
| html_meta: | ||
| description: "Use GCS for patch storage - learn about this topic in Livepatch on-prem." | ||
| --- | ||
|
|
||
| (server-reference-livepatch-on-prem-with-gcs-patch-storage)= | ||
|
|
||
| # Livepatch on-prem with Google Cloud Storage patch storage | ||
|
|
||
| To configure this, follow these steps: | ||
|
|
||
| - Create a GCS bucket in the preferred region (best if the region is the same as the deployment's). Care needs to be taken to make the bucket not publicly writable, as this would pose a significant security risk. | ||
| - Create a service account with permissions to read and write objects in that bucket, or rely on the credentials already bound to the VM (e.g. the GCE metadata service, or workload identity) if it is granted the required permissions. | ||
| - Configure the relevant GCS [config options](/server/reference/platform/configuration.md). | ||
|
|
||
| Once this is configured, Livepatch will store and retrieve patch files from the GCS bucket. | ||
|
|
||
| `patch-storage.gcs-credentials-file` and `patch-storage.gcs-credentials-json` are both optional; when both are omitted, Application Default Credentials are used instead. `patch-storage.gcs-impersonate-service-account` is also optional; when set, the resolved credentials are used to impersonate that service account instead of being used directly. |
19 changes: 19 additions & 0 deletions
19
docs/server/reference/patch-storage/use-ibm-for-patch-storage.md
This file contains hidden or 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,19 @@ | ||
| --- | ||
| myst: | ||
| html_meta: | ||
| description: "Use IBM Cloud Object Storage for patch storage - learn about this topic in Livepatch on-prem." | ||
| --- | ||
|
|
||
| (server-reference-livepatch-on-prem-with-ibm-patch-storage)= | ||
|
|
||
| # Livepatch on-prem with IBM Cloud Object Storage patch storage | ||
|
|
||
| To configure this, follow these steps: | ||
|
|
||
| - Create an IBM Cloud Object Storage (COS) bucket in the preferred region (best if the region is the same as the deployment's). Care needs to be taken to make the bucket not publicly writable, as this would pose a significant security risk. | ||
| - Choose an authentication method: an IAM API key with a service instance ID, or the ambient VPC Instance Metadata Service if the VM is granted the required trusted profile. | ||
| - Configure the relevant IBM [config options](/server/reference/platform/configuration.md). | ||
|
|
||
| Once this is configured, Livepatch will store and retrieve patch files from the COS bucket. | ||
|
|
||
| Credentials are resolved in the following order of preference: an IAM API key (`patch-storage.ibm-api-key`/`patch-storage.ibm-service-instance-id`), then, if not configured, the ambient VPC Instance Metadata Service (optionally selecting a trusted profile via `patch-storage.ibm-trusted-profile-id`). |
19 changes: 19 additions & 0 deletions
19
docs/server/reference/patch-storage/use-oracle-for-patch-storage.md
This file contains hidden or 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,19 @@ | ||
| --- | ||
| myst: | ||
| html_meta: | ||
| description: "Use OCI Object Storage for patch storage - learn about this topic in Livepatch on-prem." | ||
| --- | ||
|
|
||
| (server-reference-livepatch-on-prem-with-oracle-patch-storage)= | ||
|
|
||
| # Livepatch on-prem with Oracle Cloud Infrastructure Object Storage patch storage | ||
|
|
||
| To configure this, follow these steps: | ||
|
|
||
| - Create an Object Storage bucket in the preferred region (best if the region is the same as the deployment's). Care needs to be taken to make the bucket not publicly writable, as this would pose a significant security risk. | ||
| - Choose an authentication method: an OCI config file/profile, or instance principal authentication if the compute instance is granted the required IAM policies. | ||
| - Configure the relevant OCI [config options](/server/reference/platform/configuration.md). | ||
|
|
||
| Once this is configured, Livepatch will store and retrieve patch files from the OCI Object Storage bucket. | ||
|
|
||
| `patch-storage.oracle-config-file` (and `patch-storage.oracle-profile`) are optional; when omitted, instance principal authentication is used instead, bound to the OCI compute instance the server runs on. |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.