From eab1c08c5011d53bcb5bc30c8ff687c180dbcef8 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Tue, 4 Jun 2024 16:57:38 +0200 Subject: [PATCH 01/18] Explain PostgreSQL limitations --- guides/databases-postgres.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 62775bd18..5fa033a24 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -54,6 +54,8 @@ In order to use the CDS tooling with PostgreSQL, you also need to install the mo npm add @cap-js/postgres ``` +To use the +
After that, you can use the `cds deploy` command to [deploy](#using-cds-deploy) to a PostgreSQL database or to [create a DDL script](#deployment-using-liquibase) for PostgreSQL. @@ -84,10 +86,24 @@ Output: ## Provisioning a DB Instance -To connect to a PostgreSQL offering from the cloud provider in Production, leverage the [PostgreSQL on SAP BTP, hyperscaler option](https://discovery-center.cloud.sap/serviceCatalog/postgresql-hyperscaler-option). +To connect to a PostgreSQL offering from the cloud provider in Production, leverage the [PostgreSQL on SAP BTP, hyperscaler option](https://discovery-center.cloud.sap/serviceCatalog/postgresql-hyperscaler-option). For local development and testing convenience, you can run PostgreSQL in a [docker container](#using-docker). +::: warning +Only the Java buildpack `java_buildpack` provided by the Cloudfoundry community supports PostgreSQL. To use this buildpack, configure it in the service module section of your mta.yaml: +```yaml +modules: +# --------------------- SERVER MODULE ------------------------ + - name: bookshop-pg-srv +# ------------------------------------------------------------ + type: java + path: srv + parameters: + buildpack: java_buildpack +``` +::: + ### Using Docker You can use Docker to run a PostgreSQL database locally as follows: From 67b5e4c126bf23df0b4789aeaf586b4582e38403 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Tue, 4 Jun 2024 17:11:09 +0200 Subject: [PATCH 02/18] Update databases-postgres.md --- guides/databases-postgres.md | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 5fa033a24..6653e800e 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -90,19 +90,40 @@ To connect to a PostgreSQL offering from the cloud provider in Production, lever For local development and testing convenience, you can run PostgreSQL in a [docker container](#using-docker). -::: warning -Only the Java buildpack `java_buildpack` provided by the Cloudfoundry community supports PostgreSQL. To use this buildpack, configure it in the service module section of your mta.yaml: +
+ +There are some limitations on the BTP to consume a PostgreSQL instance: +- Only the Java buildpack `java_buildpack` provided by the Cloudfoundry community supports PostgreSQL. To use this buildpack, configure it in the service module section of your mta.yaml: + ```yaml modules: -# --------------------- SERVER MODULE ------------------------ - name: bookshop-pg-srv -# ------------------------------------------------------------ type: java path: srv parameters: buildpack: java_buildpack ``` -::: + +- By default the Java buildack initializes the PostgreSQL datasource with the CF Env Java library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false`. The variable `` needs to be replaced with the real service instance name of your PostgreSQL database. + +Here an example showing both configuration settings applied to mta.yaml: +```yaml +modules: + - name: bookshop-pg-srv + type: java + path: srv + parameters: + buildpack: java_buildpack + properties: + SPRING_PROFILES_ACTIVE: cloud + JBP_CONFIG_COMPONENTS: '{jres: ["JavaBuildpack::Jre::SapMachineJRE"]}' + JBP_CONFIG_SAP_MACHINE_JRE: '{ jre: { version: "17.+" } }' + # We do not want cfenv to configure the DataSource for us + # cfenv uses names of the services, so this variable must be adapted if needed + # as CFENV_SERVICE_[service-name]_ENABLED + # See https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html + CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false +``` ### Using Docker From 1ed42e4df87d8bda6918ca0eb1c803770aaef363 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Tue, 4 Jun 2024 17:16:14 +0200 Subject: [PATCH 03/18] Update databases-postgres.md --- guides/databases-postgres.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 6653e800e..75467e6c0 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -92,21 +92,14 @@ For local development and testing convenience, you can run PostgreSQL in a [dock
-There are some limitations on the BTP to consume a PostgreSQL instance: -- Only the Java buildpack `java_buildpack` provided by the Cloudfoundry community supports PostgreSQL. To use this buildpack, configure it in the service module section of your mta.yaml: +There are some limitations on the BTP to consume a PostgreSQL instance from a CAP Java application: -```yaml -modules: - - name: bookshop-pg-srv - type: java - path: srv - parameters: - buildpack: java_buildpack -``` +- Only the Java buildpack `java_buildpack` provided by the Cloudfoundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml -- By default the Java buildack initializes the PostgreSQL datasource with the CF Env Java library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false`. The variable `` needs to be replaced with the real service instance name of your PostgreSQL database. +- By default the `java_buildpack` initializes the PostgreSQL datasource with the CF Env Java library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false`. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. Here an example showing both configuration settings applied to mta.yaml: + ```yaml modules: - name: bookshop-pg-srv From 92521c173b938a4f258288d19c39cfe7882ba40d Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Tue, 4 Jun 2024 17:33:27 +0200 Subject: [PATCH 04/18] Update databases-postgres.md --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 75467e6c0..282670f85 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -98,7 +98,7 @@ There are some limitations on the BTP to consume a PostgreSQL instance from a CA - By default the `java_buildpack` initializes the PostgreSQL datasource with the CF Env Java library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false`. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. -Here an example showing both configuration settings applied to mta.yaml: +The following example shows both configuration settings applied to an mta.yaml: ```yaml modules: From aec361f494577b16ea326c368b869b4676889786 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Tue, 4 Jun 2024 17:34:03 +0200 Subject: [PATCH 05/18] Update databases-postgres.md --- guides/databases-postgres.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 282670f85..63d82d249 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -118,6 +118,8 @@ modules: CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false ``` +
+ ### Using Docker You can use Docker to run a PostgreSQL database locally as follows: From 08c33222df6f624b165c9f66c38e413b3e8dbed8 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Tue, 4 Jun 2024 17:37:09 +0200 Subject: [PATCH 06/18] Update databases-postgres.md --- guides/databases-postgres.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 63d82d249..2e795203b 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -54,8 +54,6 @@ In order to use the CDS tooling with PostgreSQL, you also need to install the mo npm add @cap-js/postgres ``` -To use the -
After that, you can use the `cds deploy` command to [deploy](#using-cds-deploy) to a PostgreSQL database or to [create a DDL script](#deployment-using-liquibase) for PostgreSQL. @@ -88,15 +86,13 @@ Output: To connect to a PostgreSQL offering from the cloud provider in Production, leverage the [PostgreSQL on SAP BTP, hyperscaler option](https://discovery-center.cloud.sap/serviceCatalog/postgresql-hyperscaler-option). -For local development and testing convenience, you can run PostgreSQL in a [docker container](#using-docker). -
There are some limitations on the BTP to consume a PostgreSQL instance from a CAP Java application: - Only the Java buildpack `java_buildpack` provided by the Cloudfoundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml -- By default the `java_buildpack` initializes the PostgreSQL datasource with the CF Env Java library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false`. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. +- By default the `java_buildpack` initializes the PostgreSQL datasource with the CF Env Java library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. The following example shows both configuration settings applied to an mta.yaml: @@ -120,6 +116,8 @@ modules:
+For local development and testing convenience, you can run PostgreSQL in a [docker container](#using-docker). + ### Using Docker You can use Docker to run a PostgreSQL database locally as follows: From 8d9bb9db9dda5a1d5b5167dd4aa2f4975cf6dd92 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Tue, 4 Jun 2024 17:37:59 +0200 Subject: [PATCH 07/18] Update databases-postgres.md --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 2e795203b..3402714f8 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -94,7 +94,7 @@ There are some limitations on the BTP to consume a PostgreSQL instance from a CA - By default the `java_buildpack` initializes the PostgreSQL datasource with the CF Env Java library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. -The following example shows both configuration settings applied to an mta.yaml: +The following example shows both configuration settings applied to a CAP Java service module in an mta.yaml: ```yaml modules: From 404910abb1b644bbe65ebd5d6536073c6f283c31 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Tue, 4 Jun 2024 17:54:30 +0200 Subject: [PATCH 08/18] Update databases-postgres.md --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 3402714f8..d7bde9c50 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -92,7 +92,7 @@ There are some limitations on the BTP to consume a PostgreSQL instance from a CA - Only the Java buildpack `java_buildpack` provided by the Cloudfoundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml -- By default the `java_buildpack` initializes the PostgreSQL datasource with the CF Env Java library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. +- By default, the `java_buildpack` initializes the PostgreSQL datasource with the Java CFEnv library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. The following example shows both configuration settings applied to a CAP Java service module in an mta.yaml: From 6ba95f4757cbd0bdca99b6aadac00227dfecf483 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Wed, 5 Jun 2024 08:30:49 +0200 Subject: [PATCH 09/18] Update guides/databases-postgres.md Co-authored-by: Stefan Henke --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index d7bde9c50..efa5d1c64 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -90,7 +90,7 @@ To connect to a PostgreSQL offering from the cloud provider in Production, lever There are some limitations on the BTP to consume a PostgreSQL instance from a CAP Java application: -- Only the Java buildpack `java_buildpack` provided by the Cloudfoundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml +- Only the Java buildpack `java_buildpack` provided by the Cloud Foundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml - By default, the `java_buildpack` initializes the PostgreSQL datasource with the Java CFEnv library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. From 19cf840290f3678f3035165f972b0bf07e2b9d87 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Wed, 5 Jun 2024 08:31:42 +0200 Subject: [PATCH 10/18] Update guides/databases-postgres.md Co-authored-by: Stefan Henke --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index efa5d1c64..14819a586 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -92,7 +92,7 @@ There are some limitations on the BTP to consume a PostgreSQL instance from a CA - Only the Java buildpack `java_buildpack` provided by the Cloud Foundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml -- By default, the `java_buildpack` initializes the PostgreSQL datasource with the Java CFEnv library, but it's required to let the CAP Java runtime to initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. +- By default, the `java_buildpack` initializes the PostgreSQL datasource with the Java CFEnv library, but it's required to let the CAP Java runtime initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. The following example shows both configuration settings applied to a CAP Java service module in an mta.yaml: From 39d3d7a65b3979c9bbf7a2dbc63b42ebd01f7c99 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Wed, 5 Jun 2024 09:58:40 +0200 Subject: [PATCH 11/18] Update guides/databases-postgres.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adrian Görler --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 14819a586..fd3f21dfc 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -92,7 +92,7 @@ There are some limitations on the BTP to consume a PostgreSQL instance from a CA - Only the Java buildpack `java_buildpack` provided by the Cloud Foundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml -- By default, the `java_buildpack` initializes the PostgreSQL datasource with the Java CFEnv library, but it's required to let the CAP Java runtime initialize the PostgreSQL datasource. This can be achieved by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. +- By default, the `java_buildpack` initializes a PostgreSQL datasource with the Java CFEnv library. However, to work properly with CAP, the PostgreSQL datasource must be created by the CAP Java runtime and not be the buildpack. You need to disable the datasource initialization by the buildback by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. The following example shows both configuration settings applied to a CAP Java service module in an mta.yaml: From 458c86454f2d72f868b0a6f39b415943f3887290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20G=C3=B6rler?= Date: Wed, 5 Jun 2024 10:07:28 +0200 Subject: [PATCH 12/18] Update guides/databases-postgres.md --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index fd3f21dfc..4bae0124b 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -92,7 +92,7 @@ There are some limitations on the BTP to consume a PostgreSQL instance from a CA - Only the Java buildpack `java_buildpack` provided by the Cloud Foundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml -- By default, the `java_buildpack` initializes a PostgreSQL datasource with the Java CFEnv library. However, to work properly with CAP, the PostgreSQL datasource must be created by the CAP Java runtime and not be the buildpack. You need to disable the datasource initialization by the buildback by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. +- By default, the `java_buildpack` initializes a PostgreSQL datasource with the Java CFEnv library. However, to work properly with CAP, the PostgreSQL datasource must be created by the CAP Java runtime and not by the buildpack. You need to disable the datasource initialization by the buildback by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. The following example shows both configuration settings applied to a CAP Java service module in an mta.yaml: From 7c098715f83e635263dd236c6896cedf2a968b19 Mon Sep 17 00:00:00 2001 From: Rene Jeglinsky Date: Mon, 10 Jun 2024 12:35:38 +0200 Subject: [PATCH 13/18] editing --- guides/databases-postgres.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 4bae0124b..365573a0d 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -84,19 +84,21 @@ Output: ## Provisioning a DB Instance -To connect to a PostgreSQL offering from the cloud provider in Production, leverage the [PostgreSQL on SAP BTP, hyperscaler option](https://discovery-center.cloud.sap/serviceCatalog/postgresql-hyperscaler-option). +To connect to a PostgreSQL offering from the cloud provider in Production, leverage the [PostgreSQL on SAP BTP, hyperscaler option](https://discovery-center.cloud.sap/serviceCatalog/postgresql-hyperscaler-option). For local development and testing convenience, you can run PostgreSQL in a [docker container](#using-docker). +
-There are some limitations on the BTP to consume a PostgreSQL instance from a CAP Java application: +To consume a PostgreSQL instance from a CAP Java application running on SAP BTP, consider the following: -- Only the Java buildpack `java_buildpack` provided by the Cloud Foundry community allows to consume a PostgreSQL service from a CAP Java application. To use this buildpack, configure it in the service module section of your mta.yaml +- Only the Java buildpack `java_buildpack` provided by the Cloud Foundry community allows to consume a PostgreSQL service from a CAP Java application. -- By default, the `java_buildpack` initializes a PostgreSQL datasource with the Java CFEnv library. However, to work properly with CAP, the PostgreSQL datasource must be created by the CAP Java runtime and not by the buildpack. You need to disable the datasource initialization by the buildback by setting the environment variable `CFENV_SERVICE__ENABLED` to `false` at your CAP Java service module. The placeholder `` needs to be replaced with the real service instance name of your PostgreSQL database. +- By default, the `java_buildpack` initializes a PostgreSQL datasource with the Java CFEnv library. However, to work properly with CAP, the PostgreSQL datasource must be created by the CAP Java runtime and not by the buildpack. -The following example shows both configuration settings applied to a CAP Java service module in an mta.yaml: +The following example shows these configuration settings applied to a CAP Java service: -```yaml +::: code-group +```yaml [mta.yaml] modules: - name: bookshop-pg-srv type: java @@ -109,14 +111,16 @@ modules: JBP_CONFIG_SAP_MACHINE_JRE: '{ jre: { version: "17.+" } }' # We do not want cfenv to configure the DataSource for us # cfenv uses names of the services, so this variable must be adapted if needed - # as CFENV_SERVICE_[service-name]_ENABLED + # as CFENV_SERVICE_[pg-service-name]_ENABLED # See https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false ``` +::: + +> You need to disable the datasource initialization by the buildback using `CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false` at your CAP Java service module. `BOOKSHOP-PG-DB` is the placeholder in this example that needs to be replaced with the real service instance name of your PostgreSQL database.
-For local development and testing convenience, you can run PostgreSQL in a [docker container](#using-docker). ### Using Docker From 71c9beb846f7a20f74e660cfbac617f2f96f5f59 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 10 Jun 2024 15:29:26 +0200 Subject: [PATCH 14/18] Update guides/databases-postgres.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: René Jeglinsky --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 365573a0d..64d91ea41 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -118,7 +118,7 @@ modules: ::: -> You need to disable the datasource initialization by the buildback using `CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false` at your CAP Java service module. `BOOKSHOP-PG-DB` is the placeholder in this example that needs to be replaced with the real service instance name of your PostgreSQL database. +> You need to disable the [datasource initialization by the buildback](https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html) using `CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false` at your CAP Java service module. `BOOKSHOP-PG-DB` is the placeholder in this example that needs to be replaced with the real service instance name of your PostgreSQL database.
From 302b4746913e48f027cd974c6ea96440f1028221 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 10 Jun 2024 15:29:35 +0200 Subject: [PATCH 15/18] Update guides/databases-postgres.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: René Jeglinsky --- guides/databases-postgres.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 64d91ea41..b5303fdaf 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -109,10 +109,6 @@ modules: SPRING_PROFILES_ACTIVE: cloud JBP_CONFIG_COMPONENTS: '{jres: ["JavaBuildpack::Jre::SapMachineJRE"]}' JBP_CONFIG_SAP_MACHINE_JRE: '{ jre: { version: "17.+" } }' - # We do not want cfenv to configure the DataSource for us - # cfenv uses names of the services, so this variable must be adapted if needed - # as CFENV_SERVICE_[pg-service-name]_ENABLED - # See https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false ``` From 789ee0a8926bae087693d9ef8d988a52fa32f5c1 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 10 Jun 2024 15:31:53 +0200 Subject: [PATCH 16/18] Update databases-postgres.md --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index b5303fdaf..da47cbde2 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -114,7 +114,7 @@ modules: ::: -> You need to disable the [datasource initialization by the buildback](https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html) using `CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false` at your CAP Java service module. `BOOKSHOP-PG-DB` is the placeholder in this example that needs to be replaced with the real service instance name of your PostgreSQL database. +> You need to disable the [datasource initialization by the buildback](https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html) using `CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false` at your CAP Java service module. `BOOKSHOP-PG-DB` is the real PostgreSQL service instance name in this example.
From 18825f37e1693ce739d8566d15e93aed70c1a61d Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 10 Jun 2024 15:33:03 +0200 Subject: [PATCH 17/18] Update databases-postgres.md --- guides/databases-postgres.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index da47cbde2..5aa991a99 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -114,7 +114,7 @@ modules: ::: -> You need to disable the [datasource initialization by the buildback](https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html) using `CFENV_SERVICE_BOOKSHOP-PG-DB_ENABLED: false` at your CAP Java service module. `BOOKSHOP-PG-DB` is the real PostgreSQL service instance name in this example. +> You need to disable the [datasource initialization by the buildback](https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html) using `CFENV_SERVICE__ENABLED: false` at your CAP Java service module. `BOOKSHOP-PG-DB` is the real PostgreSQL service instance name in this example.
From ea91102b9c59e1a687ae4d965bbe121b0ba41922 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 10 Jun 2024 15:34:24 +0200 Subject: [PATCH 18/18] Update databases-postgres.md --- guides/databases-postgres.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/databases-postgres.md b/guides/databases-postgres.md index 5aa991a99..f08013a61 100644 --- a/guides/databases-postgres.md +++ b/guides/databases-postgres.md @@ -93,7 +93,7 @@ To consume a PostgreSQL instance from a CAP Java application running on SAP BTP, - Only the Java buildpack `java_buildpack` provided by the Cloud Foundry community allows to consume a PostgreSQL service from a CAP Java application. -- By default, the `java_buildpack` initializes a PostgreSQL datasource with the Java CFEnv library. However, to work properly with CAP, the PostgreSQL datasource must be created by the CAP Java runtime and not by the buildpack. +- By default, the `java_buildpack` initializes a PostgreSQL datasource with the Java CFEnv library. However, to work properly with CAP, the PostgreSQL datasource must be created by the CAP Java runtime and not by the buildpack. You need to disable the [datasource initialization by the buildback](https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html) using `CFENV_SERVICE__ENABLED: false` at your CAP Java service module. The following example shows these configuration settings applied to a CAP Java service: @@ -114,7 +114,7 @@ modules: ::: -> You need to disable the [datasource initialization by the buildback](https://docs.cloudfoundry.org/buildpacks/java/configuring-service-connections.html) using `CFENV_SERVICE__ENABLED: false` at your CAP Java service module. `BOOKSHOP-PG-DB` is the real PostgreSQL service instance name in this example. +> `BOOKSHOP-PG-DB` is the real PostgreSQL service instance name in this example.