on 05-12-2019 3:35 PM
Hello experts,
System used: SAP Cloud Platform, Cloud Foundry
I have developed an MTA application composes of (HANA DB, Node.js, Java, UI5 etc.) in the developer subaccount and tested fine. However, I need to deploy the MTAR into the production subaccount, and while performing the steps, the deployment fails in the production subaccount.
The reason is: I have hardcoded the database_id (copied from the HANA DB service instance) in the mta.yaml (as per the openSap course documentation).
resources:
- name: hdi_xxxxx
parameters:
config:
schema: SCHEMA_XXXX
database_id: slkdfjkd-ssdf-xxxx-xxxx-xxxxxxxxx
properties:
hdi-container-name_2: '${service-name}'
type: com.sap.xs.hdi-container
Workaround: we have manually edit the mta.yaml (database_id) to enter the production HANA DB id and then build it and deploy to production sub account. After this step, we need to revert the changes back for the Dev/QA subaccount deployment.
Question: What is the right way to set the "database_id" like a mapping parameter etc., so that the deployment works for both Dev/QA Subaccount and Production subaccount, without manually changing it? Can you pls guide here?
Regards,
Chathia.
Those parameters aren't mandatory. You could leave it empty and the runtime will check if there is an existing database and created the mapping automatically.
Or do you have mulitple dbs in the repesctive spaces?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marius,
We have a situation where we have to use a hard-coded schema name since the schema name is always going to be same across all environments. But if the schema already exists, the next deployment fails with a "301: Unique Constraint error". Is it possible to have the same schema_name and deploy it to multiple times. Would the db deployer make sure not to create the schema if it already exists?
Below is the example setup I have
# -------------------- SIDECAR MODULE ------------------------
- name: backend-db-deployer
# ------------------------------------------------------------
type: hdb
path: gen/db
parameters:
buildpack: nodejs_buildpack
requires:
# 'hana' and 'xsuaa' resources extracted from CAP configuration
- name: backend-db
- name: backend-uaa
<br>resources:
# ------------------------------------------------------------
- name: backend-db
# ------------------------------------------------------------
type: com.sap.xs.hdi-container
parameters:
shared: true
service: hana
service-plan: hdi-shared
config:
schema: 'MYTESTSCHEMA'
properties:
hdi-service-name: ${service-name}
HDI_DEPLOY_OPTIONS:
auto_undeploy: true
Thanks in Advance.
Deepak
Hi Chathia,
You can use MTA extension descriptors that adjust the MTA depending on the env - dev/qual/prod.
Extension descriptors will have specific parameters for different accounts, such is database_id, or service plans, etc.
More information:
https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/50df803465324d36851c79fd07e...
Best Regards,
Boyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.