From 35183d37d07ac76de3c0f9f6446392c59c809733 Mon Sep 17 00:00:00 2001 From: Aarno Aukia Date: Wed, 3 Sep 2025 09:47:36 +0200 Subject: [PATCH 1/2] add postgresql service links --- .../how-to/install-postgres-db-helm.adoc | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/docs/modules/ROOT/pages/how-to/install-postgres-db-helm.adoc b/docs/modules/ROOT/pages/how-to/install-postgres-db-helm.adoc index f43fb51..508964f 100644 --- a/docs/modules/ROOT/pages/how-to/install-postgres-db-helm.adoc +++ b/docs/modules/ROOT/pages/how-to/install-postgres-db-helm.adoc @@ -1,29 +1,27 @@ -= How to install a PostgreSQL via Helm += How to install PostgreSQL on {product} -[INFO] -==== -PostgreSQL is https://docs.appcat.ch/vshn-managed/postgresql/create.html[available] on cloudscale.ch through VSHN AppCat. -Batteries and backups included. -==== +== Managed PostgreSQL by VSHN -This page explains how to install a current PostgreSQL database via the Helm tool on the {product} platform. +Do you want a managed PostgreSQL that includes Backups, Monitoring, Updates, and optionally a 99.99% SLA and 24x7 Support? Check out the https://products.vshn.ch/appcat/postgresql.html[PostgreSQL by VSHN product description^] and https://docs.appcat.ch/vshn-managed/postgresql/create.html[technical documentation including how to instantiate^]. -This guide is based on the older guide documented here: https://docs.appuio.ch/en/latest/app/helmcharts.html +== Self-managed PostgreSQL -== Step 1: Install helm +This page explains how to install a self-managed PostgreSQL database via Helm on the {product} platform. + +=== Step 1: Install Helm You need first to install the `helm` CLI tool: https://helm.sh/docs/intro/quickstart/ -Make sure you add the Bitnami Helm Chart Repository, because we will use later the PostgreSQL Helm chart provided by Bitnami: +Make sure you add the Bitnami Helm Chart Repository, because we will use the PostgreSQL Helm chart provided by Bitnami: [source,shell] ---- helm repo add bitnami https://charts.bitnami.com/bitnami ---- -== Step 2: Create an adapted YAML file +=== Step 2: Create an adapted YAML file -We use the Bitnami provided PostgreSQL helm chart documented here: https://github.com/bitnami/charts/tree/master/bitnami/postgresql +We use the Bitnami-provided PostgreSQL helm chart documented here: https://github.com/bitnami/charts/tree/master/bitnami/postgresql To ensure that PostgreSQL works on {product} we need to adjust some chart parameters, for example the `securityContext` parameter and the resource limits. @@ -72,12 +70,12 @@ containerSecurityContext: <1> Set your database user name <2> Set a valid PostgreSQL image tag -By default the `storageClass` is empty and the {product} platform uses `ssd` as the default storage class. +By default, the `storageClass` is empty, and the {product} platform uses `ssd` as the default storage class. See the xref:explanation/storage-classes.adoc[documentation of available storage classes] on {product} for more details. -== Step 3: Install the Helm chart with the custom YAML file +=== Step 3: Install the Helm chart with the custom YAML file Install the PostgreSQL Helm chart with the following command: @@ -88,12 +86,12 @@ helm install -f postgresql-values.yaml --set global.postgresql.postgresqlPasswor Replace the `` with your database user password. -Replace `` with a descriptive name for your Helm installation, for example `service-xy-db`. +Replace `` with a descriptive name for your Helm installation, for example, `service-xy-db`. The `-f postgresql-values.yaml` points to your custom YAML file, overriding the required Chart parameters. -== Step 4: Check your installation +=== Step 4: Check your installation You can check your installation with the following command: @@ -103,7 +101,7 @@ helm list ---- -== Related Links +=== Related Links Check also for more details here: From e34e11c61f9190cc4570d4481fda8793a966b987 Mon Sep 17 00:00:00 2001 From: Aarno Aukia Date: Mon, 8 Sep 2025 10:23:39 +0200 Subject: [PATCH 2/2] remove outdated bitnami self-managed reference --- .../how-to/install-postgres-db-helm.adoc | 108 +----------------- 1 file changed, 1 insertion(+), 107 deletions(-) diff --git a/docs/modules/ROOT/pages/how-to/install-postgres-db-helm.adoc b/docs/modules/ROOT/pages/how-to/install-postgres-db-helm.adoc index 508964f..8380658 100644 --- a/docs/modules/ROOT/pages/how-to/install-postgres-db-helm.adoc +++ b/docs/modules/ROOT/pages/how-to/install-postgres-db-helm.adoc @@ -2,110 +2,4 @@ == Managed PostgreSQL by VSHN -Do you want a managed PostgreSQL that includes Backups, Monitoring, Updates, and optionally a 99.99% SLA and 24x7 Support? Check out the https://products.vshn.ch/appcat/postgresql.html[PostgreSQL by VSHN product description^] and https://docs.appcat.ch/vshn-managed/postgresql/create.html[technical documentation including how to instantiate^]. - -== Self-managed PostgreSQL - -This page explains how to install a self-managed PostgreSQL database via Helm on the {product} platform. - -=== Step 1: Install Helm - -You need first to install the `helm` CLI tool: https://helm.sh/docs/intro/quickstart/ - -Make sure you add the Bitnami Helm Chart Repository, because we will use the PostgreSQL Helm chart provided by Bitnami: - -[source,shell] ----- -helm repo add bitnami https://charts.bitnami.com/bitnami ----- - -=== Step 2: Create an adapted YAML file - -We use the Bitnami-provided PostgreSQL helm chart documented here: https://github.com/bitnami/charts/tree/master/bitnami/postgresql - -To ensure that PostgreSQL works on {product} we need to adjust some chart parameters, for example the `securityContext` parameter and the resource limits. - -If users don't explicitly configure limits, the {product} platform injects limits of `cpu: 200m` and `memory: 200Mi`. -See the reference docs of {product} for more details on xref:references/default-quota.adoc#_resource_limits_and_defaults[default resource limits]. - -See also the https://github.com/bitnami/charts/blob/master/bitnami/postgresql/values.yaml[YAML file of the PostgreSQL Helm chart] for more details on configurable values. - -Create a custom `postgresql-values.yaml` (filename doesn't matter) file to override the needed chart parameters. - -Below is a full working example for deploying the Bitnami PostgreSQL chart on {product}. - -.postgresql-values.yaml -[source,yaml] ----- -global: - postgresql: - postgresqlUsername: YOUR_USERNAME <1> - -image: - tag: SOME_IMAGE_TAG <2> - -resources: - limits: - cpu: 250m - memory: 256Mi - -persistence: - size: 1Gi - -volumePermissions: - enabled: false - securityContext: - runAsUser: "auto" - -securityContext: - enabled: false - -shmVolume: - chmod: - enabled: false - -containerSecurityContext: - enabled: false ----- -<1> Set your database user name -<2> Set a valid PostgreSQL image tag - -By default, the `storageClass` is empty, and the {product} platform uses `ssd` as the default storage class. - -See the xref:explanation/storage-classes.adoc[documentation of available storage classes] on {product} for more details. - - -=== Step 3: Install the Helm chart with the custom YAML file - -Install the PostgreSQL Helm chart with the following command: - -[source,shell] ----- -helm install -f postgresql-values.yaml --set global.postgresql.postgresqlPassword= --version 10 bitnami/postgresql ----- - -Replace the `` with your database user password. - -Replace `` with a descriptive name for your Helm installation, for example, `service-xy-db`. - -The `-f postgresql-values.yaml` points to your custom YAML file, overriding the required Chart parameters. - - -=== Step 4: Check your installation - -You can check your installation with the following command: - -[source,shell] ----- -helm list ----- - - -=== Related Links - -Check also for more details here: - -* https://github.com/appuio/appuio-cloud-community/discussions/27 -* https://dev.to/tylerauerbeck/deploying-bitnami-s-postgres-helm-chart-on-openshift-1mcl -* https://github.com/bitnami/charts/issues/1336 -* https://github.com/bitnami/bitnami-docker-postgresql/issues/103 +Do you want a managed PostgreSQL that includes Backups, Monitoring, Updates, and optionally 24x7 Support? Check out the https://products.vshn.ch/appcat/postgresql.html[PostgreSQL by VSHN product description^] and https://docs.appcat.ch/vshn-managed/postgresql/create.html[technical documentation including how to instantiate^].