on ‎2022 Dec 09 9:09 AM
Hi,
we are developing a CAP MTX application in a team. In addition, our application uses MTX extensions.
Each developer is working on different features. Both the application logic and the database structures are therefore different for each developer.
How can we run this application locally and deploy the current development status from each local PC without losing the extensions contained in the database?
Since we use HANA native code in our application, local development with SQLite is out of the question.
I have visualised our scenario in the below graphic.
Our requirements:
Any ideas on that? @Cap team: Is a solution for this already on your roadmap?

P.S.: I created this graphic with pyhon. see here for details.
Request clarification before answering.
Hi Helmut,
I cannot say anything about mtx but just tried a similar setup in our mtxs scenario. Assuming you're talking about consumer developed extensions (deployed via cds push), I was able to deploy into a dedicated tenant HDI container, replacing the respective credentials in the default-env.json file with the credentials taken from the service manager container instance.

That allowed me to do something like the following resulting in a deployment of db model changes still keeping the tenant-specific extensions.
cds deploy db --to hana --profile production --vcap-file default-env.json
Still, I assume the scenario is not 100% comparable, as in mtxs there's only one container per tenant and the META container as such does not exist anymore. Instead, SaaS consumer extensions are stored right within the tenant container in a separate table (as you can see below)

Yes I know, the usage of default-env.json is not the preferred way to go anymore, but it allowed me to deploy right into the tenant container for that scenario. Furthermore, I was able to provide additional deployment parameters in the default-env.json file (to ignore re-processing of cfg files in that case).
"HDI_DEPLOY_OPTIONS": { "auto_undeploy" : false, "include_filter" : ["src/" ]Maybe not the most convenient approach like e.g., cds deploy -tenant xyz123 (which would be nice) but maybe it also solves your issue if upgrading to mtxs is a valid approach for you?
Greetings
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi martinfrick,
thank you very much. I'm just migrating to mtxs and will give it a try then.
Cause your approach sounds logical. I also already thought about tweeking the credentials of default-env.json and you just confirmed this. So I accepted your answer.
Thanks again for your fast support
BR Helmut
Hi martinfrick,
I've migrated to mtxs now and copied the credentials of my tenant container to my default-env.json.
When I run "cds deploy db --to hana --profile hybrid --vcap-file default-env.json" (hybrid is configured equaly to production) I get this error:
[deploy] - Deploying to HANA from /home/helmut/projects/mtxtest/projects/nxe/gen/db
[deploy] - Using HDI deployer from /home/helmut/projects/mtxtest/projects/nxe/node_modules/@sap/hdi-deploy/library.js
[deploy] - Deployment ended at 2022-12-12 18:04:15
[deploy] - Error: no service definition found; there must be at least one service definition for the deployment target
Hi Helmut,
great to hear that you already work on the upgrade! The following "hana" definition in the default-env.json, did the job on my side (credentials shortened in the screenshot). Do you have all the additional default values for HDI containers like tags, labels aso.? Would need to check but maybe the hdi-deployer is selecting from the env variables based on labels...
Martin

| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.