on 02-06-2018 1:04 PM
Hello experts!
I'm tring to use an User-Provided-Service to configure an URL of a .Net back-end rest service with some problems, and i need to use that service in several UI5 applications.
For now we are in development phase so i'm could configure the URL in every UI5 application, but i need to use an user-provided to configure it because we gonna test in quality space (inside same enviroment we have a DEV_SPACE and QAS_SPACE), so i need to point the apps to .NET quality URL too.
I did read answer How to set and use destinations in XSA | Cloud Foundry, and created a service by CUPS command like below:
xs cups bia-backend -p url
Result:
{
"name" : "bia-backend",
"credentials" : {
"url" : "http://dotnet.backend.com"
}
}
modules:
- name: bia.apresentacao-app
type: html5
path: app
requires:
- name: sapui5
properties:
sapui5url: ~{url}
- name: bia-backend
group: destinations
properties:
name: bia
url: ~{url}
resources:
- name: sapui5
type: configuration
parameters:
provider-nid: mta
provider-id: 'com.sap.ui5.dist.sapui5-dist-xsa.XSAC_UI5_FESV3:sapui5_fesv3'
version: '>=1.42.0'
- name: bia-backend
type: org.cloudfoundry.user-provided-service
properties:
bia-backend-service-name: ${service-name}
url: 'http://dotnet.backend.com' # ${url} did not work
parameters:
service-name: bia-backend
But the problem is that i still need to inform the URL as hardcode inside MTA descriptor of every other applications, and i wasn't able to use ${url} parameter inside MTA descriptor (i tried to use org.cloudfoundry.user-provided-service and org.cloudfoundry.user-existing-service).
resources
- name: bia-backend
type: org.cloudfoundry.existing-service # org.cloudfoundry.user-provided-service
properties:
bia-backend-service-name: ${service-name}
url: ${url} #did not work
parameters:
service-name: bia-backend
So how can i reference inside the MTA descriptor, the URL property of credentials on bia-backend service (UPS)? Do i need to use a '.mtaext' and a '.mtad.yaml' archives to change the URL in all apps every time i deploy the application?
My idea was to after we deploy the applications to QAS_SPACE, and transport to production enviroment, use an UUPS command to change the URL in any Enviromment/ORG/SPACE.
Thanks.
Matheus
Hello guys,
We've solved the issue using a '.mtaext' file during deploy.
SAP answered us that is no way to use a URL configured througth CUPS, so we just created the service by CUPS command with no URL parameter, created the URL parameter inside the MTA file (resource of type org.cloudfoundry.existing-service) and on deploy, we've used the '.mtaext' file to change URL parameter to desired value on target system.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Matheus for your research. I've used your suggestion to implement a CAP Example app that can be deployed also to SAP HANA on Premise and call a remote system with a technical user provided via the user-provided service. Please check out Deploy to SAP HANA XSA on Premise.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.