cancel
Showing results for 
Search instead for 
Did you mean: 

MTA with 2 Different Services

01-05-2023 7:30 PM
mvoros Active Contributor
1529 views 4 comments
0 Likes
SAP Managed Tags
Subscribe

Hi,

I have a CAP project that contains a set of UI5 apps that have different namespace/service in manifest.json. E.g.

"sap.cloud": {
"public": true,
"service": "ns1" //Or ns2
}

I can't manage to deploy these correctly using mbt and cf deploy.

Attempt #1: I simply add all the apps in mta.yaml. They get all deployed but all are under the same service ns1, even the apps that have ns2 in manifest.json. The problem is that ns2 apps don't work in the launchpad service. The launchpad service tries correctly to load the apps from ns2 service but HTML5 repo returns 404. When I manually adjust URL by replacing ns2 with ns1, the files get returned correctly. Hence HTML5 repo has the apps under namespace ns1 but launchpad expects them with ns2. I think the launchpad is right here.

Attempt #2: in my mta.yaml file, I define two HTML5 deployers. One for ns1 and one for ns2. I can see that mta archive contains apps for each deployer correctly. I can see that both HTML5 deployers got executed during cf deploy. I checked the logs and they look same for both namespaces. The problem is that HTML5 repo does not show ns2 apps at all. They are simply not there.

Hence my questions are: is it possible to deploy UI5 apps with single mta.yaml with different namespaces/services? If yes, what am I missing? If no, what would be a workaround other than changing namespace.

Thanks

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

WouterLemaire
SAP Mentor
SAP Mentor
0 Likes

Hi,

I always make a new mta project for a ui5 app with each his own namespace/service. This works like a charm for me.

I always use the managed approuter when it needs to come in the Launchpad.

Each one has his own xsuaa service instance and html5 app repo. Sometimes they share the same destination service instance. I think a separate xsuaa service instance is important when having different namespaces and mta’s.

Hope this helps.


kr, Wouter

mvoros
Active Contributor
0 Likes

Thanks, that's the workaround that I want to use as the last option. It would be still operationally beneficial if this could be deployed with one mtar archive instead of having multiple ones.

WouterLemaire
SAP Mentor
SAP Mentor
0 Likes

if you want to keep them in one mta you have to use the same service id for both.

mvoros
Active Contributor
0 Likes

Is this limitation documented somewhere? Because it looks like a bug to me.

I did a bit more experimenting. It's really strange. I can see the ns2 app with cf html5-list. But the app is not visible in BTP cockpit nor in Launchpad service. It looks like it gets uploaded correctly (hence no errors in cf deploy logs) but does not get registered correctly.