forked from sbarzaghialteaup/cap-multitenant-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mta.yaml
262 lines (261 loc) · 10.2 KB
/
mta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
#
# ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ #
# GLOBALS #
# ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ #
#
ID: cap-mt
_schema-version: 3.2.0
description: CAP Multitenant Template
version: 0.0.1
parameters:
enable-parallel-deployments: true
keep-existing-routes: true
build-parameters:
before-all:
- builder: custom
commands:
- cds build --production
#
# ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ #
# MODULES #
# ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ #
#
modules:
#
# ╔═══════════════════════════════════════╗ #
# ║ CAP SERVICE ║ #
# ╚═══════════════════════════════════════╝ #
#
- name: mtt-cap-services
type: nodejs
path: gen/srv
parameters:
disk-quota: 512M
memory: 256M
buildpack: nodejs_buildpack
build-parameters:
ignore: ["default-env.json", "node_modules/"]
builder: custom
commands: []
properties:
SAP_JWT_TRUST_ACL: [{ "clientid": "*", "identityzone": "sap-provisioning" }] # Trust between server and SaaS Manager
EXIT: 1
requires:
- name: mtt-xsuaa
- name: mtt-service-manager
- name: mtt-saas
- name: mtt-application-logging
provides:
- name: mtt-cap-services-api
properties:
srv_api: ${default-url}
- name: mtt-cap-services-mtx-api
properties:
mtx-url: ${default-url}
#
# ╔═══════════════════════════════════════╗ #
# ║ APP ROUTER ║ #
# ╚═══════════════════════════════════════╝ #
#
- name: mtt-approuter
type: nodejs
path: cloud-foundry/approuter
parameters:
disk-quota: 160M
memory: 128M
buildpack: nodejs_buildpack
properties:
TENANT_HOST_PATTERN: "^(.*)-${space}-${app-name}.${default-domain}"
SAP_JWT_TRUST_ACL: [{ "clientid": "*", "identityzone": "sap-provisioning" }]
SEND_XFRAMEOPTIONS: false
build-parameters:
ignore: ["default-env.json", "node_modules/"]
builder: custom
commands: []
requires:
- name: mtt-destination
- name: mtt-xsuaa
- name: mtt-html5-repo-runtime
- name: mtt-portal
- name: mtt-saas
- name: mtt-application-logging
- name: mtt-cap-services-api
group: destinations
properties:
name: srv_api
url: ~{srv_api}
forwardAuthToken: true
timeout: 60000
provides:
- name: mtt-approuter-provisioning
properties:
url: ${default-url}/provisioning
#
# ╔═══════════════════════════════════════╗ #
# ║ HTML5 APPS ║ #
# ╚═══════════════════════════════════════╝ #
#
- name: ui_accessrights
type: html5
path: app/com.alteaup.solutions.accessrights
build-parameters:
builder: custom
commands:
- npm run build
supported-platforms: []
build-result: dist
#
# ╔═══════════════════════════════════════╗ #
# ║ HTML5 DEPLOYER ║ #
# ╚═══════════════════════════════════════╝ #
#
- name: mtt-html-deployer
type: com.sap.application.content
path: cloud-foundry/html5-deployer
requires:
- name: mtt-html5-repo-host
parameters:
content-target: true
build-parameters:
build-result: resources
requires:
- name: ui_accessrights
artifacts:
- ./uimodule*.zip
target-path: resources/
#
# ╔═══════════════════════════════════════╗ #
# ║ PORTAL DEPLOYER ║ #
# ╚═══════════════════════════════════════╝ #
#
- name: mtt-portal-deployer
type: com.sap.application.content
path: cloud-foundry/portal-deployer
parameters:
config:
TENANT_HOST_PATTERN: "^(.*)-${space}-mtt-approuter.${default-domain}"
requires:
- name: mtt-portal
parameters:
content-target: true
service-key:
name: content-deploy-key
config:
content-endpoint: developer
- name: mtt-html5-repo-host
- name: mtt-xsuaa
- name: mtt-saas
#
# ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ #
# RESOURCES #
# ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ #
#
resources:
#
# ┌─────────────────────────────────────┐ #
# │ DESTINATIONS │ #
# └─────────────────────────────────────┘ #
#
- name: mtt-destination
type: org.cloudfoundry.managed-service
parameters:
service: destination
service-plan: lite
#
# ┌─────────────────────────────────────┐ #
# │ SERVICE MANAGER │ #
# └─────────────────────────────────────┘ #
#
- name: mtt-service-manager
type: org.cloudfoundry.managed-service
parameters:
service: service-manager
service-plan: container
properties:
hdi-service-name: ${service-name}
#
# ┌─────────────────────────────────────┐ #
# │ XSUAA │ #
# └─────────────────────────────────────┘ #
#
- name: mtt-xsuaa
type: org.cloudfoundry.managed-service
properties:
XSAPPNAME: ${xsuaa-app}
parameters:
service: xsuaa
service-plan: application
path: cloud-foundry/xsuaa/xs-security.json
xsuaa-app: ${org}-${space}-mt-app-pub
config:
xsappname: ${xsuaa-app}
tenant-mode: shared
#
# ┌─────────────────────────────────────┐ #
# │ SAAS │ #
# └─────────────────────────────────────┘ #
#
- name: mtt-saas
type: org.cloudfoundry.managed-service
requires:
- name: mtt-xsuaa
- name: mtt-cap-services-mtx-api
- name: mtt-approuter-provisioning
parameters:
service: saas-registry
service-plan: application
config:
appName: ~{mtt-xsuaa/XSAPPNAME}
xsappname: ~{mtt-xsuaa/XSAPPNAME}
displayName: ~{mtt-xsuaa/XSAPPNAME}
description: |-
org: ${org}
space: ${space}
XSAPPNAME: ~{mtt-xsuaa/XSAPPNAME}
onSubscription: ~{mtt-cap-services-mtx-api/mtx-url}/mtx/v1/provisioning/tenant/{tenantId}
category: "CAP Multitenant"
appUrls:
getDependencies: ~{mtt-approuter-provisioning/url}/mtx/v1/provisioning/dependencies
onSubscription: ~{mtt-cap-services-mtx-api/mtx-url}/mtx/v1/provisioning/tenant/{tenantId}
#
# ┌─────────────────────────────────────┐ #
# │ HTML5 RUNTIME │ #
# └─────────────────────────────────────┘ #
#
- name: mtt-html5-repo-runtime
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-plan: app-runtime
#
# ┌─────────────────────────────────────┐ #
# │ HTML5 HOST │ #
# └─────────────────────────────────────┘ #
#
- name: mtt-html5-repo-host
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-plan: app-host
config:
sizeLimit: 1
#
# ┌─────────────────────────────────────┐ #
# │ PORTAL SERVICE │ #
# └─────────────────────────────────────┘ #
#
- name: mtt-portal
type: org.cloudfoundry.managed-service
parameters:
service: portal
service-plan: standard
#
# ┌─────────────────────────────────────┐ #
# │ APPLICATION LOGGING │ #
# └─────────────────────────────────────┘ #
#
- name: mtt-application-logging
type: org.cloudfoundry.managed-service
parameters:
service: application-logs
service-plan: lite