Skip to content
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

Improvements in the upgrade documentation of v14 to v15 #277

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading