forked from SAP-samples/btp-industry-use-cases
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmta.yaml
262 lines (262 loc) · 6.78 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
_schema-version: "3.1"
ID: wpm-app
description: Workplace Management Application
version: 1.0.0
modules:
- name: wpm-app-srv
type: nodejs
path: gen/srv
requires:
- name: wpm-app-auth
- name: wpm-app-destination-service
- name: wpm-app-registry
- name: wpm-app-sm
- name: wpm-app-portal
- name: wpm-app-logging
- name: app-api
properties:
APP_PROTOCOL: ~{app-protocol}
APP_URI: ~{app-uri}
provides:
- name: srv-api
properties:
srv-url: ${default-url}
- name: mtx-api
properties:
mtx-url: ${default-url}
parameters:
buildpack: nodejs_buildpack
host: ${appname}
memory: 512M
disk-quota: 1536M
build-parameters:
builder: npm-ci
ignore:
- default-*.json
- .env
- "*node_modules*"
- package-lock.json
- name: wpm-app-app
type: approuter.nodejs
path: approuter
build-parameters:
ignore:
- default-*.json
- .env
- "*node_modules*"
- package-lock.json
parameters:
memory: 256M
disk-quota: 1536M
keep-existing-routes: true
properties:
TENANT_HOST_PATTERN: '^(.*)-${default-uri}'
SAP_JWT_TRUST_ACL: [{ "clientid": "*", "identityzone": "sap-provisioning" }]
SEND_XFRAMEOPTIONS: false
requires:
- name: wpm-app-destination-service
- name: wpm-app-auth
- name: wpm-app-html5-repo-runtime
- name: wpm-app-portal
- name: wpm-app-registry
- name: wpm-app-logging
- name: srv-api
group: destinations
properties:
name: srv
url: ~{srv-url}
timeout: 600000
forwardAuthToken: true
- name: mtx-api
group: destinations
properties:
name: mtx
url: ~{mtx-url}
timeout: 600000
provides:
- name: app-api
properties:
app-protocol: ${protocol}
app-uri: ${default-uri}
- name: wpm-app-approuter-provisioning
properties:
url: ${default-url}/provisioning
- name: wpm-app-destination-content
type: com.sap.application.content
requires:
- name: wpm-app-destination-service
parameters:
content-target: true
- name: wpm-app_html_repo_host
parameters:
service-key:
name: wpm-app_html_repo_host-key
- name: wpm-app-auth
parameters:
service-key:
name: wpm-app-auth-key
parameters:
content:
instance:
destinations:
- Name: wpm_app_wpm_app_html_repo_host
ServiceInstanceName: wpm-app-html5-app-host-service
ServiceKeyName: wpm-app_html_repo_host-key
sap.cloud.service: ${appname}
- Authentication: OAuth2UserTokenExchange
Name: wpm_app_wpm_app_auth
ServiceInstanceName: wpm-app-auth
ServiceKeyName: wpm-app-auth-key
sap.cloud.service: ${appname}
existing_destinations_policy: ignore
build-parameters:
no-source: true
- name: wpm-app-app-content
type: com.sap.application.content
path: .
requires:
- name: wpm-app_html_repo_host
parameters:
content-target: true
build-parameters:
build-result: resources
requires:
- artifacts:
- wpmapp.zip
name: wpmapp
target-path: resources/
- artifacts:
- wpmadm.zip
name: wpmadm
target-path: resources/
- name: wpmapp
type: html5
path: app/wpm-app
build-parameters:
build-result: dist
builder: custom
commands:
- npm install
- npm run build:cf
supported-platforms: []
- name: wpmadm
type: html5
path: app/wpm-adm
build-parameters:
build-result: dist
builder: custom
commands:
- npm install
- npm run build:cf
supported-platforms: []
- name: wpm-app-portal-deployer
type: com.sap.application.content
path: portal
parameters:
config:
TENANT_HOST_PATTERN: '^(.*)-${default-uri}'
requires:
- name: wpm-app-portal
parameters:
content-target: true
service-key:
name: content-deploy-key
config:
content-endpoint: developer
- name: wpm-app_html_repo_host
- name: wpm-app-auth
resources:
- name: wpm-app-auth
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
- name: wpm-app-destination-service
type: org.cloudfoundry.managed-service
parameters:
config:
init_data:
instance:
existing_destinations_policy: ignore
destinations:
- Name: wpm-app-cfapi
Description: CF Cloud Controller API
URL: ${controller-url}
Type: HTTP
ProxyType: Internet
Authentication: OAuth2Password
tokenServiceURL: ${authorization-url}/oauth/token
clientId: cf
clientSecret:
User: <SetValueInCockpit>
Password: <SetValueInCockpit>
version: 1.0.0
service: destination
service-name: wpm-app-destination-service
service-plan: lite
- name: wpm-app-html5-repo-runtime
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-name: wpm-app-html5-app-runtime-service
service-plan: app-runtime
- name: wpm-app_html_repo_host
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-name: wpm-app-html5-app-host-service
service-plan: app-host
- name: wpm-app-portal
type: org.cloudfoundry.managed-service
parameters:
service: portal
service-plan: standard
- name: wpm-app-registry
type: org.cloudfoundry.managed-service
requires:
- name: wpm-app-auth
- name: mtx-api
- name: wpm-app-approuter-provisioning
parameters:
service: saas-registry
service-plan: application
service-name: wpm-app-registry
config:
xsappname: wpm-app
appName: wpm-app
displayName: 'Workplace Management'
description: 'Manage Workplaces and Bookings'
category: 'SaaS Multitenant Solutions'
appUrls:
getDependencies: ~{mtx-api/mtx-url}/-/cds/saas-provisioning/dependencies
onSubscription: ~{mtx-api/mtx-url}/-/cds/saas-provisioning/tenant/{tenantId}
onSubscriptionAsync: false
onUnSubscriptionAsync: false
callbackTimeoutMillis: 300000
- name: wpm-app-sm
type: org.cloudfoundry.managed-service
requires:
- name: wpm-app-auth
parameters:
service: service-manager
service-plan: container
polling_timeout_seconds: 240
config:
acquireTimeoutMillis: max
polling_timeout_seconds: 480
- name: wpm-app-logging
type: org.cloudfoundry.managed-service
parameters:
service: application-logs
service-plan: lite
parameters:
enable-parallel-deployments: true
keep-existing-routes: true
appname: wpm-app-biagi-dev
build-parameters:
before-all:
- builder: custom
commands:
- npm install --production
- npx -p @sap/cds-dk cds build --production