Skip to content

Commit

Permalink
Update Kubernetes deployments docs (#1339)
Browse files Browse the repository at this point in the history
* doc: Add a note about database migrations for AKS

* doc: Add a note about db migration to General k8s docs

* doc: Add a note about k8s version upgrades for AKS

* doc: Fix spelling
  • Loading branch information
happyRip authored May 29, 2024
1 parent bfbb655 commit 113c45f
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "Upgrading"
description: ""
weight: 4
---

This page describes the steps for upgrading {{% tts %}} on Azure Kubernetes Service.

<!--more-->

## Database Migration

{{% 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 {{% tts %}} to function properly.
{{</ note >}}

To migrate the database during an upgrade set the respective 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'
```

{{</ note >}}

## 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).
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -14,6 +14,28 @@ This page describes the steps for performing database operations on a {{% tts %}

## General Procedure

Set the respective 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
```
{{</ note >}}
Remember to unset the value after the upgrade is done.
## Manual Procedure
1. Delete current Jobs (if any).
```bash
Expand Down

0 comments on commit 113c45f

Please sign in to comment.