From 65581a8e39b671abe1872ea0195cc3ee900eb7b5 Mon Sep 17 00:00:00 2001 From: Aleksander Borowski Date: Mon, 13 May 2024 18:48:34 +0200 Subject: [PATCH 1/4] doc: Add a note about database migrations for AKS --- .../host/kubernetes/azure/upgrading/_index.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md diff --git a/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md b/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md new file mode 100644 index 0000000000..a0b3fe0734 --- /dev/null +++ b/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md @@ -0,0 +1,33 @@ +--- +title: "Upgrading" +description: "" +weight: 4 +--- + +This page describes the steps for upgrading {{% tts %}} on Azure Kubernetes Service. + + + +## Database Migration + +The Things Stack database entries are managed between minor versions using database migrations. + +{{< note >}} +User are informed of required migrations for each version via the [Release Notes](https://www.thethingsindustries.com/docs/whats-new/). It’s mandatory to run required database migrations for The Things Stack to function properly. +{{}} + +To migrate the database during an upgrade set the respectable Terraform variables to `true`. + +| Service | Variable | +| ------- | ---------------- | +| IS | `is-db-migrate` | +| NOC | `noc-db-migrate` | + +{{< note >}} +For example to migrate Identity Server and Network Operations Center databases run the following command. + +```bash +$ terraform apply -var='is-db-migrate=true' -var='noc-db-migrate=true' +``` + +{{}} From cf0726e8baaf0aba1204e46ad828687850cf8b55 Mon Sep 17 00:00:00 2001 From: Aleksander Borowski Date: Mon, 13 May 2024 19:19:50 +0200 Subject: [PATCH 2/4] doc: Add a note about db migration to General k8s docs --- .../generic/database-migrations/_index.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/content/the-things-stack/host/kubernetes/generic/database-migrations/_index.md b/doc/content/the-things-stack/host/kubernetes/generic/database-migrations/_index.md index 3f863a5e92..ce031c7bed 100644 --- a/doc/content/the-things-stack/host/kubernetes/generic/database-migrations/_index.md +++ b/doc/content/the-things-stack/host/kubernetes/generic/database-migrations/_index.md @@ -14,6 +14,28 @@ This page describes the steps for performing database operations on a {{% tts %} ## General Procedure +Set the respectable Helm chart values to `true` to perform database migrations during Helm chart upgrade. + +| Service | Variable | +| ------- | ---------------------------- | +| IS | `is.database.migrate` | +| NOC | `noc.store.database.migrate` | + +{{< note >}} +For example to migrate Identity Server use the following config. + +```yaml +is: + database: + migrate: true +``` + +{{}} + +Remember to unset the value after the upgrade is done. + +## Manual Procedure + 1. Delete current Jobs (if any). ```bash From 1e84da41de71cb459a753cf5921d9f7789535af3 Mon Sep 17 00:00:00 2001 From: Aleksander Borowski Date: Mon, 13 May 2024 19:26:47 +0200 Subject: [PATCH 3/4] doc: Add a note about k8s version upgrades for AKS --- .../host/kubernetes/azure/upgrading/_index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md b/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md index a0b3fe0734..6ef1947912 100644 --- a/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md +++ b/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md @@ -31,3 +31,7 @@ $ terraform apply -var='is-db-migrate=true' -var='noc-db-migrate=true' ``` {{}} + +## Kubernetes version upgrade + +AKS Kubernetes version upgrades have to be performed sequentially for each minor version. For example to upgrade from `1.25` to `1.27` it's necessary to upgrade to version `1.26` first as an intermediate step. For more information refer to the [official documentation](https://learn.microsoft.com/en-us/azure/aks/supported-kubernetes-versions). From 9809144db525c20427188285a10f985d140ef10d Mon Sep 17 00:00:00 2001 From: Aleksander Borowski Date: Tue, 14 May 2024 11:21:03 +0200 Subject: [PATCH 4/4] doc: Fix spelling --- .../host/kubernetes/azure/upgrading/_index.md | 6 +++--- .../host/kubernetes/generic/database-migrations/_index.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md b/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md index 6ef1947912..4442bba771 100644 --- a/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md +++ b/doc/content/the-things-stack/host/kubernetes/azure/upgrading/_index.md @@ -10,13 +10,13 @@ This page describes the steps for upgrading {{% tts %}} on Azure Kubernetes Serv ## Database Migration -The Things Stack database entries are managed between minor versions using database migrations. +{{% tts %}} database schema is managed between minor versions using database migrations. {{< note >}} -User are informed of required migrations for each version via the [Release Notes](https://www.thethingsindustries.com/docs/whats-new/). It’s mandatory to run required database migrations for The Things Stack to function properly. +User are informed of required migrations for each version via the [Release Notes](https://www.thethingsindustries.com/docs/whats-new/). It’s mandatory to run required database migrations for {{% tts %}} to function properly. {{}} -To migrate the database during an upgrade set the respectable Terraform variables to `true`. +To migrate the database during an upgrade set the respective Terraform variables to `true`. | Service | Variable | | ------- | ---------------- | diff --git a/doc/content/the-things-stack/host/kubernetes/generic/database-migrations/_index.md b/doc/content/the-things-stack/host/kubernetes/generic/database-migrations/_index.md index ce031c7bed..6a8973e422 100644 --- a/doc/content/the-things-stack/host/kubernetes/generic/database-migrations/_index.md +++ b/doc/content/the-things-stack/host/kubernetes/generic/database-migrations/_index.md @@ -4,7 +4,7 @@ description: "" weight: 7 --- -{{% tts %}} database entries are managed between minor versions using database migrations. +{{% tts %}} database schema is managed between minor versions using database migrations. User are informed of required migrations for each version via the [Release Notes](https://www.thethingsindustries.com/docs/whats-new/). It's mandatory to run required database migrations for {{% tts %}} to function properly. @@ -14,7 +14,7 @@ This page describes the steps for performing database operations on a {{% tts %} ## General Procedure -Set the respectable Helm chart values to `true` to perform database migrations during Helm chart upgrade. +Set the respective Helm chart values to `true` to perform database migrations during Helm chart upgrade. | Service | Variable | | ------- | ---------------------------- |