on 11-15-2021 6:13 AM
Hello All,
Good Day!
I have been part of the bootcamp on CAP Modelling - integration and extension. As part of the exercise, I am stuck with a problem to which I find no solution.
The CAP app -s deployed and started. But, I am unable to subscribe it in the consumer - tenant.
On inspection, I found that the routes dont work properly.
I am walking around the cloud development blind and with blinkers :). So any input/tip will help in fixing or learning.
The below screenshots for reference.
Regards,
Sharath
This is a typical issue faced. The problem (I am guessing) is in the MTA file. It probably has a property defined for approuter like the following
TENANT_HOST_PATTERN: '^(.*)-${space}-${app-name}.${default-domain}'
This works fine when (only when) space, app-name are all in lower case and do not include .(dots).
You can see the actual value of this, if you look for the User defined environment variable for the app (approuter) in cockpit or search for this in the output of the command:
cf env <app name for approuter>
The quick fix is to "hard code" the URL pattern.
cf set-env <app name for approuter> TENANT_HOST_PATTERN '(.*)-ntt-btp....'
and restart the app.
You may check if the pattern works using RegEx against the tenant host name from route. The first group extracted should be the tenant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The CAP MTX Module doesn't take care about creation the routes of the approuter in the provider account. Without additional coding that uses the Cloud Foundry API's you have to add the route manually. For some inspirations how to get the route created check out Getting your head into Cloud Application Programming model multitenancy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.