You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/for-ops/disaster-recovery/overview.md
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,11 @@ This area covers some potential scenarios, when a complete or partial restore of
11
11
This guide has the following prerequisites and limitations that should be checked regularly:
12
12
13
13
1. The following items should be backed up regularly by the platform administrator:
14
-
- The Kubernetes secret ending in "-wildcard-cert" in namespace "istio-system" (if installed via the Linode cloud console, or using your own certificate).
15
-
- The Kubernetes secret "otomi-sops-secrets" in namespace "otomi-pipelines".
16
-
- A download of the complete values in Platform -> Maintenance. Depending on whether these are downloaded with or without secrets, some passwords might have to be reset after recovery.
17
-
- Optionally manual backups of databases, as covered in this guide for the CloudNative PostgreSQL Operator, should be taken.
14
+
15
+
- The Kubernetes secret ending in "-wildcard-cert" in namespace "istio-system" (if installed via the Linode cloud console, or using your own certificate).
16
+
- The Kubernetes secret "otomi-sops-secrets" in namespace "otomi-pipelines".
17
+
- A download of the complete values in Platform -> Maintenance. Depending on whether these are downloaded with or without secrets, some passwords might have to be reset after recovery.
18
+
- Optionally manual backups of databases, as covered in this guide for the CloudNative PostgreSQL Operator, should be taken.
18
19
19
20
2. Object storage needs to be set up for all backup types referred to. Credentials should be added to Platform Settings -> Object Storage.
20
21
@@ -30,6 +31,6 @@ This guide has the following prerequisites and limitations that should be checke
30
31
31
32
## Guides
32
33
33
-
*[Gitea](gitea.md): Restoring the platform's Gitea database and repositories from the application backup
34
-
*[Databases](platform-databases.md): Backup and restore of the CNPG databases
35
-
*[Reinstall](platform-reinstall.md): Restoring the complete platform, including settings and data
34
+
-[Gitea](gitea.md): Restoring the platform's Gitea database and repositories from the application backup
35
+
-[Databases](platform-databases.md): Backup and restore of the CNPG databases
36
+
-[Reinstall](platform-reinstall.md): Restoring the complete platform, including settings and data
Changes to the `values` repository can usually be made through the Gitea UI after signing in with the `platform-admin` user. As this requires Keycloak in addition to Gitea operating normally, the risk can be reduced by creating an application token and pulling/pushing local changes to the repository. In Gitea, go to the user settings, click on the `Applications` tab, enter a token name and select `repo` as the scope. After creating this token, you can include it in the repository URL, e.g.
In the event that platform-critical services Gitea and Keycloak are not able to start, required changes to the database configuration can be applied directly in the following Argo CD applications in the `argocd` namespace. This change persists and is synchronized into the cluster until the next following Tekton pipeline overwrites them:
30
+
In the event that platform-critical services Gitea and Keycloak are not able to start, required changes to the database configuration can be applied directly in the following Argo CD applications in the `argocd` namespace:
18
31
19
-
* Gitea database: `gitea-gitea-otomi-db`
20
-
* Keycloak database: `keycloak-keycloak-otomi-db`
32
+
- Gitea database: `gitea-gitea-otomi-db`
33
+
- Keycloak database: `keycloak-keycloak-otomi-db`
21
34
22
-
Where applicable, in these manifests the `initdb` section in `clusterSpec.bootstrap` can be replaced with `recovery` and `externalClusters` just as instructed below. Note that `recovery` and `externalClusters` do not need to be reflected in the values file later, since they are only considered when initializing the cluster; even when Tekton does revert these changes, after a successful recovery this no longer has an effect.
35
+
Where applicable, in these manifests the `initdb` section in `clusterSpec.bootstrap` can be replaced with `recovery` and `externalClusters` just as instructed below. Note that `recovery` and `externalClusters` do not need to be reflected in the values file later, since they are only considered when initializing the cluster.
23
36
24
37
## Regular recovery with backup in same cluster
25
38
@@ -47,6 +60,7 @@ Note that the time stamps of the backup names are universal time (UTC).
47
60
```sh
48
61
kubectl get backup -n <app>
49
62
```
63
+
50
64
where `<app>` is to be replaced with `gitea`, `harbor`, or `keycloak`.
51
65
52
66
### Adjustments to the backup configuration
@@ -60,12 +74,12 @@ Example:
60
74
```yaml
61
75
# ...
62
76
platformBackups:
63
-
database:
64
-
gitea:
65
-
enabled: false
66
-
retentionPolicy: 7d
67
-
schedule: 0 0 * * *
68
-
pathSuffix: gitea-1
77
+
database:
78
+
gitea:
79
+
enabled: false
80
+
retentionPolicy: 7d
81
+
schedule: 0 0 * * *
82
+
pathSuffix: gitea-1
69
83
# ...
70
84
```
71
85
@@ -76,6 +90,7 @@ The following change only has an effect on an initial database cluster. Therefor
76
90
In the file `env/databases/<app>.yaml`, update the structure of `databases.<app>.recovery` as follows, depending on the app, inserting the backup name as determined above:
77
91
78
92
For Gitea:
93
+
79
94
```yaml
80
95
databases:
81
96
gitea:
@@ -90,6 +105,7 @@ databases:
90
105
```
91
106
92
107
For Harbor:
108
+
93
109
```yaml
94
110
databases:
95
111
harbor:
@@ -102,6 +118,7 @@ databases:
102
118
```
103
119
104
120
For Keycloak:
121
+
105
122
```yaml
106
123
databases:
107
124
keycloak:
@@ -120,31 +137,34 @@ Note that ArgoCD may show a sync error, pointing out that there are multiple `bo
120
137
Check the Tekton pipelines to ensure that values changes have been deployed as expected. After this, during a backup or recovery of the database, the application should to be shut down for avoiding any write operations leading to inconsistencies.
@@ -220,6 +246,7 @@ The following instructions for example apply for Gitea in the last step of [rein
220
246
Adjust the object storage parameters below as needed, at least replacing the `<bucket-name>` and `<location>` placeholders. Typically `serverName` should remain unchanged. `linode-creds` are the account credentials set up by the platform and can be reused provided that they have access to the storage.
221
247
222
248
env/databases/gitea.yaml:
249
+
223
250
```yaml
224
251
databases:
225
252
gitea:
@@ -249,6 +276,7 @@ databases:
249
276
```
250
277
251
278
env/databases/harbor.yaml:
279
+
252
280
```yaml
253
281
databases:
254
282
harbor:
@@ -278,6 +306,7 @@ databases:
278
306
```
279
307
280
308
env/databases/keycloak.yaml:
309
+
281
310
```yaml
282
311
databases:
283
312
keycloak:
@@ -320,7 +349,7 @@ databases:
320
349
owner: gitea
321
350
recoveryTarget:
322
351
# Time base target for the recovery
323
-
targetTime: "2023-03-06 08:00:39+01"
352
+
targetTime: '2023-03-06 08:00:39+01'
324
353
externalClusters:
325
354
# ...
326
355
```
@@ -344,17 +373,20 @@ In the following steps, the `-n` suffix of each pod name (e.g. `gitea-db-n`) nee
0 commit comments