<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477620#M4674593</link>
    <description>&lt;P&gt;Can you please check if the deployment of &lt;A href="https://github.com/gregorwolf/pg-beershop" target="_blank"&gt;pg-beershop&lt;/A&gt; works? I've just tried in my trial account and have no issues. &lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2022 18:30:43 GMT</pubDate>
    <dc:creator>gregorw</dc:creator>
    <dc:date>2022-04-13T18:30:43Z</dc:date>
    <item>
      <title>Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaq-p/12477619</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I am trying to deploy CAP project with PostgreSQL unfortunately the deployment fails when trying to deploy the DB deployer with this following error :&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt; [APP/TASK/deploy_to_postgresql/0]  :TypeError: Cannot read properties of undefined (reading 'username') at getCredentialsForClient (/home/vcap/deps/0/node_modules/cds-dbm/dist/adapter/PostgresAdapter.js:13:28)&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;my mta.yaml&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;## Generated mta.yaml based on template version 0.4.0&lt;BR /&gt;## appName = devtoberfest&lt;BR /&gt;## language=nodejs; multiTenant=false&lt;BR /&gt;## approuter=&lt;BR /&gt;_schema-version: "3.1"&lt;BR /&gt;ID: devtoberfest&lt;BR /&gt;version: 1.0.0&lt;BR /&gt;description: "A simple CAP project."&lt;BR /&gt;parameters:&lt;BR /&gt;  enable-parallel-deployments: true&lt;BR /&gt;build-parameters:&lt;BR /&gt;  before-all:&lt;BR /&gt;  - builder: custom&lt;BR /&gt;    commands:&lt;BR /&gt;    - npm install&lt;BR /&gt;    - npx -p @sap/cds-dk cds build &lt;BR /&gt;modules:&lt;BR /&gt;  # --------------------- SERVER MODULE ------------------------&lt;BR /&gt;  - name: devtoberfest-srv&lt;BR /&gt;    # ------------------------------------------------------------&lt;BR /&gt;    type: nodejs&lt;BR /&gt;    path: gen/srv&lt;BR /&gt;    provides:&lt;BR /&gt;      - name: srv-api # required by consumers of CAP services (e.g. approuter)&lt;BR /&gt;        properties:&lt;BR /&gt;          srv-url: ${default-url}&lt;BR /&gt;    requires:&lt;BR /&gt;      - name: devtoberfest-database&lt;BR /&gt;      - name: devtoberfest-uaa   &lt;BR /&gt;  - name: devtoberfest-db-deployer&lt;BR /&gt;    type: custom&lt;BR /&gt;    path: gen/db&lt;BR /&gt;    parameters:&lt;BR /&gt;      buildpacks: [https://github.com/cloudfoundry/apt-buildpack#v0.2.2, nodejs_buildpack] &lt;BR /&gt;      no-route: true&lt;BR /&gt;      no-start: true&lt;BR /&gt;      disk-quota: 2GB&lt;BR /&gt;      memory: 512MB&lt;BR /&gt;      tasks:&lt;BR /&gt;      - name: deploy_to_postgresql&lt;BR /&gt;        command: chmod 755 deploy.sh &amp;amp;&amp;amp; ./deploy.sh&lt;BR /&gt;        disk-quota: 2GB&lt;BR /&gt;        memory: 512MB      &lt;BR /&gt;    requires:&lt;BR /&gt;      - name: devtoberfest-database    &lt;BR /&gt;resources:&lt;BR /&gt;  - name: devtoberfest-database&lt;BR /&gt;    parameters:&lt;BR /&gt;      path: ./pg-options.json&lt;BR /&gt;      service: postgresql-db&lt;BR /&gt;      service-plan: trial&lt;BR /&gt;      skip-service-updates:&lt;BR /&gt;        parameters: true&lt;BR /&gt;    type: org.cloudfoundry.managed-service&lt;BR /&gt;  - name: devtoberfest-uaa&lt;BR /&gt;    type: org.cloudfoundry.managed-service&lt;BR /&gt;    parameters:&lt;BR /&gt;     path: ./xs-security.json&lt;BR /&gt;     service: xsuaa&lt;BR /&gt;     service-name: devtoberfest-uaa&lt;BR /&gt;     service-plan: application&lt;BR /&gt;    &lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;P&gt;package.json&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;{&lt;BR /&gt;  "name": "postgres",&lt;BR /&gt;  "version": "1.0.0",&lt;BR /&gt;  "description": "A simple CAP project.",&lt;BR /&gt;  "repository": "&amp;lt;Add your repository here&amp;gt;",&lt;BR /&gt;  "license": "UNLICENSED",&lt;BR /&gt;  "private": true,&lt;BR /&gt;  "dependencies": {&lt;BR /&gt;    "@sap/cds": "^5",&lt;BR /&gt;    "@sap/cds-dk": "^4.9.2",&lt;BR /&gt;    "@sap/cds-odata-v2-adapter-proxy": "^1.8.4",&lt;BR /&gt;    "cds-dbm": "^0.0.36",&lt;BR /&gt;    "cds-pg": "^0.1.28",&lt;BR /&gt;    "express": "^4",&lt;BR /&gt;    "fs": "0.0.1-security",&lt;BR /&gt;    "handlebars": "^4.7.7",&lt;BR /&gt;    "hdb": "^0.18.3",&lt;BR /&gt;    "nodemailer": "^4.0.1",&lt;BR /&gt;    "passport": "^0.5.2",&lt;BR /&gt;    "path": "^0.12.7"&lt;BR /&gt;  },&lt;BR /&gt;  "devDependencies": {&lt;BR /&gt;    "sqlite3": "^5.0.2"&lt;BR /&gt;  },&lt;BR /&gt;  "scripts": {&lt;BR /&gt;    "start": "cds run",&lt;BR /&gt;    "start:docker": "docker-compose up"&lt;BR /&gt;  },&lt;BR /&gt;  "eslintConfig": {&lt;BR /&gt;    "extends": "eslint:recommended",&lt;BR /&gt;    "env": {&lt;BR /&gt;      "es2020": true,&lt;BR /&gt;      "node": true,&lt;BR /&gt;      "jest": true,&lt;BR /&gt;      "mocha": true&lt;BR /&gt;    },&lt;BR /&gt;    "globals": {&lt;BR /&gt;      "SELECT": true,&lt;BR /&gt;      "INSERT": true,&lt;BR /&gt;      "UPDATE": true,&lt;BR /&gt;      "DELETE": true,&lt;BR /&gt;      "CREATE": true,&lt;BR /&gt;      "DROP": true,&lt;BR /&gt;      "CDL": true,&lt;BR /&gt;      "CQL": true,&lt;BR /&gt;      "CXL": true,&lt;BR /&gt;      "cds": true&lt;BR /&gt;    },&lt;BR /&gt;    "rules": {&lt;BR /&gt;      "no-console": "off",&lt;BR /&gt;      "require-atomic-updates": "off"&lt;BR /&gt;    }&lt;BR /&gt;  },&lt;BR /&gt;  "cds": {&lt;BR /&gt;    "build": {&lt;BR /&gt;      "tasks": [&lt;BR /&gt;        {&lt;BR /&gt;          "for": "node-cf",&lt;BR /&gt;          "src": "srv"&lt;BR /&gt;        },&lt;BR /&gt;        {&lt;BR /&gt;          "use": "cds-dbm/dist/build/postgres-cf",&lt;BR /&gt;          "for": "postgres-cf",&lt;BR /&gt;          "src": "db",&lt;BR /&gt;          "options": {&lt;BR /&gt;            "deployCmd": "npx cds-dbm deploy --load-via delta --auto-undeploy"&lt;BR /&gt;          }&lt;BR /&gt;        }&lt;BR /&gt;      ]&lt;BR /&gt;    },&lt;BR /&gt;    "requires": {&lt;BR /&gt;      "db": {&lt;BR /&gt;        "kind": "database"&lt;BR /&gt;      },&lt;BR /&gt;      "uaa": {&lt;BR /&gt;        "kind": "xsuaa"&lt;BR /&gt;      },&lt;BR /&gt;      "database": {&lt;BR /&gt;        "impl": "cds-pg",&lt;BR /&gt;        "model": [&lt;BR /&gt;          "srv"&lt;BR /&gt;        ]&lt;BR /&gt;      }&lt;BR /&gt;    },&lt;BR /&gt;    "migrations": {&lt;BR /&gt;      "db": {&lt;BR /&gt;        "schema": {&lt;BR /&gt;          "default": "public",&lt;BR /&gt;          "clone": "_cdsdbm_clone",&lt;BR /&gt;          "reference": "_cdsdbm_ref"&lt;BR /&gt;        },&lt;BR /&gt;        "deploy": {&lt;BR /&gt;          "tmpFile": "tmp/_autodeploy.json",&lt;BR /&gt;          "undeployFile": "db/undeploy.json"&lt;BR /&gt;        }&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;PS: I attached the db deployer log.I am grateful if anyone can help me to fix it. &lt;/P&gt;Regards,Yosra</description>
      <pubDate>Wed, 13 Apr 2022 14:02:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaq-p/12477619</guid>
      <dc:creator>yosra_hassad0</dc:creator>
      <dc:date>2022-04-13T14:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477620#M4674593</link>
      <description>&lt;P&gt;Can you please check if the deployment of &lt;A href="https://github.com/gregorwolf/pg-beershop" target="_blank"&gt;pg-beershop&lt;/A&gt; works? I've just tried in my trial account and have no issues. &lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 18:30:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477620#M4674593</guid>
      <dc:creator>gregorw</dc:creator>
      <dc:date>2022-04-13T18:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477621#M4674594</link>
      <description>&lt;P&gt;Thanks Gregor for your help. It works now for me.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 12:09:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477621#M4674594</guid>
      <dc:creator>yosra_hassad0</dc:creator>
      <dc:date>2022-04-15T12:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477622#M4674595</link>
      <description>&lt;P&gt;Would be great if you share what you needed to correct.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 12:23:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477622#M4674595</guid>
      <dc:creator>gregorw</dc:creator>
      <dc:date>2022-04-15T12:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477623#M4674596</link>
      <description>&lt;P&gt;With this updated MTA the deployment works successfully.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;## Generated mta.yaml based on template version 0.4.0&lt;BR /&gt;## appName = devtoberfest&lt;BR /&gt;## language=nodejs; multiTenant=false&lt;BR /&gt;## approuter=&lt;BR /&gt;_schema-version: "3.1"&lt;BR /&gt;ID: postgresTest&lt;BR /&gt;version: 1.0.0&lt;BR /&gt;description: "A simple CAP project."&lt;BR /&gt;parameters:&lt;BR /&gt;  enable-parallel-deployments: true&lt;BR /&gt;build-parameters:&lt;BR /&gt;  before-all:&lt;BR /&gt;  - builder: custom&lt;BR /&gt;    commands:&lt;BR /&gt;    - npm install&lt;BR /&gt;    - npx -p @sap/cds-dk cds build &lt;BR /&gt;modules:&lt;BR /&gt;  # --------------------- SERVER MODULE ------------------------&lt;BR /&gt;  - name: devtoberfest-srv&lt;BR /&gt;    # ------------------------------------------------------------&lt;BR /&gt;    type: nodejs&lt;BR /&gt;    path: gen/srv&lt;BR /&gt;    provides:&lt;BR /&gt;      - name: srv-api # required by consumers of CAP services (e.g. approuter)&lt;BR /&gt;        properties:&lt;BR /&gt;          srv-url: ${default-url}&lt;BR /&gt;    requires:&lt;BR /&gt;      - name: devtoberfest-database&lt;BR /&gt;      - name: devtoberfest-uaa &lt;BR /&gt;  - name: devtoberfest-db-deployer&lt;BR /&gt;    type: custom&lt;BR /&gt;    path: gen/db&lt;BR /&gt;    parameters:&lt;BR /&gt;      buildpacks: [https://github.com/cloudfoundry/apt-buildpack#v0.2.10, nodejs_buildpack] &lt;BR /&gt;      no-route: true&lt;BR /&gt;      no-start: true&lt;BR /&gt;      disk-quota: 3GB&lt;BR /&gt;      memory: 512MB&lt;BR /&gt;      tasks:&lt;BR /&gt;      - name: deploy-to-postgresql&lt;BR /&gt;        command: ./deploy.sh&lt;BR /&gt;        disk-quota: 3GB&lt;BR /&gt;        memory: 512MB&lt;BR /&gt;    build-parameters:&lt;BR /&gt;      ignore: ["node_modules/"]&lt;BR /&gt;    requires:&lt;BR /&gt;    - name: devtoberfest-database   &lt;BR /&gt;resources:&lt;BR /&gt;  - name: devtoberfest-database&lt;BR /&gt;    type: org.cloudfoundry.managed-service&lt;BR /&gt;    parameters:&lt;BR /&gt;      path: ./pg-options.json&lt;BR /&gt;      service: postgresql-db&lt;BR /&gt;      service-plan: trial&lt;BR /&gt;      skip-service-updates:&lt;BR /&gt;        parameters: true&lt;BR /&gt;      service-tags:&lt;BR /&gt;        - plain  &lt;BR /&gt;  - name: devtoberfest-uaa&lt;BR /&gt;    type: org.cloudfoundry.managed-service&lt;BR /&gt;    parameters:&lt;BR /&gt;     path: ./xs-security.json&lt;BR /&gt;     service: xsuaa&lt;BR /&gt;     service-name: devtoberfest-uaa&lt;BR /&gt;     service-plan: application&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;     &lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 13:28:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477623#M4674596</guid>
      <dc:creator>yosra_hassad0</dc:creator>
      <dc:date>2022-04-15T13:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477624#M4674597</link>
      <description>&lt;P&gt;Adding &lt;STRONG&gt;service-tags: - plain&lt;/STRONG&gt; to the service&lt;STRONG&gt; &lt;/STRONG&gt;&lt;EM&gt;devtoberfest-database&lt;/EM&gt;&lt;STRONG&gt; &lt;/STRONG&gt;solve the issue.&lt;/P&gt;&lt;P&gt;PS: I added the mta updated.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 13:31:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477624#M4674597</guid>
      <dc:creator>yosra_hassad0</dc:creator>
      <dc:date>2022-04-15T13:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477625#M4674598</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;gregorwolf&lt;/SPAN&gt; and  &lt;SPAN class="mention-scrubbed"&gt;yosra_hassad0&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;I am also facing the same issue. But in my case I am creating the database first manually using BTP cockpit. In mta.yaml I am just updating the database service.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;resources:
# --------------------- DATABASE MODULE ----------------------  
  - name: xxx-xxxx-xxxxx-database
# ------------------------------------------------------------
    type: org.cloudfoundry.existing-service&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can you please help?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Harshad&lt;/P&gt;</description>
      <pubDate>Sun, 04 Sep 2022 11:13:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477625#M4674598</guid>
      <dc:creator>hash47</dc:creator>
      <dc:date>2022-09-04T11:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477626#M4674599</link>
      <description>&lt;P&gt;Hi   &lt;SPAN class="mention-scrubbed"&gt;harshad47&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;you can update your service instance in Cloud Foundry via the command-line:&lt;BR /&gt;cf update-service mydb -t "list, of, tags" &lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 07:02:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477626#M4674599</guid>
      <dc:creator>SebastianEsch</dc:creator>
      <dc:date>2022-09-06T07:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477627#M4674600</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;yosra_hassad0&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;When i try to get some enteties. the app retuned this error. I don't understand, how to solve this.&lt;/P&gt;&lt;P&gt;Could you help me.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2156896-error.png" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;yagbdeveloper70&lt;/SPAN&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 23:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477627#M4674600</guid>
      <dc:creator>devangelgb</dc:creator>
      <dc:date>2023-03-24T23:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Deploy CAP with PostgreSQL on SAP BTP in cloud foundry</title>
      <link>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477628#M4674601</link>
      <description>&lt;P&gt;Hi  @&lt;SPAN class="mention-scrubbed"&gt;yosra_hassad0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When I deploy my app to btp o locally Which return this error.&lt;/P&gt;&lt;P&gt;Can you help me.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2156897-error2.png" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;yagbdeveloper70&lt;/SPAN&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 23:34:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/deploy-cap-with-postgresql-on-sap-btp-in-cloud-foundry/qaa-p/12477628#M4674601</guid>
      <dc:creator>devangelgb</dc:creator>
      <dc:date>2023-03-24T23:34:21Z</dc:date>
    </item>
  </channel>
</rss>

