Skip to content

Commit

Permalink
Merge pull request #277 from projectsyn/howto-upgrade-v15-typo
Browse files Browse the repository at this point in the history
Improvements in the upgrade documentation of v14 to v15
  • Loading branch information
megian authored Apr 22, 2024
2 parents 008b8d1 + 0212e24 commit 5f3c433
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions docs/modules/ROOT/pages/how-tos/upgrade-14.x-to-15.x.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ kubectl -n "${NAMESPACE}" exec -ti keycloak-postgresql-0 -c postgresql -- sh -c
----
kubectl -n $NAMESPACE scale statefulset keycloak-postgresql --replicas=0
# Wait until statefulset has been scaled down
kubectl -n $NAMESPACE get statefulset keycloak-postgresql -w
# Check if the statefulset pod have been scaled down
kubectl -n $NAMESPACE get pod keycloak-postgresql-0
----

. Delete the Postgres database production database persistentvolumeclaim.
Expand All @@ -88,15 +88,15 @@ REALLY! DO NOT PROCEED HERE WITHOUT HAVING DONE A BACKUP AND ENSURED THE DUMP CO
----
kubectl -n $NAMESPACE delete persistentvolumeclaim data-keycloak-postgresql-0
# Wait until persistent volume claim has been deleted
kubectl -n $NAMESPACE get persistentvolumeclaim data-keycloak-postgresql-0 -w
# Check if the persistent volume claim has been deleted
kubectl -n $NAMESPACE get persistentvolumeclaim data-keycloak-postgresql-0
----

. Patch the Postgres statefulset to v15.
+
[source,bash]
----
kubectl n $NAMESPACE patch sts keycloak-postgresql -p '{"spec": {"template": {"spec": {"containers": [{"name": "postgresql", "image": "docker.io/bitnami/postgresql:15.6.0-debian-12-r5"}]}}}}'
kubectl -n $NAMESPACE patch sts keycloak-postgresql -p '{"spec": {"template": {"spec": {"containers": [{"name": "postgresql", "image": "docker.io/bitnami/postgresql:15.6.0-debian-12-r5"}]}}}}'
----

. Scale up the Postgres database.
Expand All @@ -113,7 +113,14 @@ kubectl -n $NAMESPACE get statefulset keycloak-postgresql -w
+
[source,bash]
----
kubectl -n syn-keycloak-test logs keycloak-postgresql-0 | grep "PostgreSQL 15.6"
kubectl -n $NAMESPACE logs keycloak-postgresql-0 | grep "PostgreSQL 15.6"
----
+
should look similar to
+
[source,bash]
----
2024-03-26 16:17:24.653 GMT [1] LOG: starting PostgreSQL 15.6 on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
----

. Import the SQL dump into the Postgres v15 database.
Expand All @@ -140,7 +147,7 @@ kubectl -n "${NAMESPACE}" exec -ti keycloak-postgresql-0 -c postgresql -- sh -c
+
[source,bash]
----
diff keycloak-postgresql-2024-02-23-13-04-21.sql keycloak-postgresql-2024-02-23-13-04-35.sql
diff <(sort keycloak-postgresql-2024-03-26-17-14-52.sql) <(sort keycloak-postgresql-2024-03-26-17-20-40.sql)
----
+
Should be similar to:
Expand Down Expand Up @@ -206,7 +213,7 @@ parameters:
+
[source,bash]
----
kubectl -n syn patch applications.argoproj.io root --type=json \
kubectl -n syn patch applications.argoproj.io root --type=json \
-p '[{
"op":"replace",
"path":"/spec/syncPolicy",
Expand Down

0 comments on commit 5f3c433

Please sign in to comment.