-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
mta-cf.yaml
331 lines (326 loc) · 10.2 KB
/
mta-cf.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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
ID: bookshop-demo
_schema-version: 3.2.0
version: 1.1.0
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- npm install --production
- npx cds build --production
# Delete node_modules to avoid maximum file length exceeded
- rm -rf app/node_modules
# Standalone OData V2 Proxy is disabled
# - npm run build:copycsntoproxy
modules:
- name: bookshop-demo-db
type: hdb
path: gen/db
build-parameters:
ignore: ["node_modules/"]
parameters:
memory: 256M
disk-quota: 2G
stack: cflinuxfs4
requires:
- name: bookshop-demo-db-service
- name: bookshop-demo-srv
type: nodejs
path: gen/srv
build-parameters:
# When using OpenTelemetry@SAP the following line is not needed
#ignore: ["node_modules/"]
properties:
SAP_JWT_TRUST_ACL: '[{"clientid":"*","identityzone":"*"}]'
SAP_CALM_SERVICE_NAME: bookshop-demo
SAP_CALM_SERVICE_TYPE: SAP_CP_CF
OTEL_RESOURCE_ATTRIBUTES: sap.tenancy.tenant_id=85d309ba-f66d-4775-b927-9a95dfc89a1e
# NODE_ARGS: -r @sap/xotel-agent-ext-js/dist/common/tracer
parameters:
memory: 256M
disk-quota: 2G
stack: cflinuxfs4
provides:
- name: srv_api
properties:
url: ${default-url}
requires:
- name: bookshop-demo-destination-service
- name: bookshop-demo-connectivity-service
- name: bookshop-demo-db-service
- name: bookshop-demo-uaa
- name: bookshop-demo-job-scheduler
parameters:
config:
xsuaa_instance_name: bookshop-demo-uaa
- name: bookshop-demo-logging
# - name: bookshop-demo-cloud-logging
- name: bookshop-demo-autoscaler
parameters:
path: ./autoscaler.json
- name: bookshop-demo-api-sb
# ------------------------------------------------------------
type: nodejs
path: broker/
build-parameters:
builder: npm-ci
ignore: ["node_modules/", "default-*.json"]
parameters:
app-name: bookshop-demo-api-sb-${space}
memory: 64MB
disk-quota: 2G
properties:
SBF_BROKER_CREDENTIALS_HASH: >
{
"broker-user": "<is replaced by config in mtaext>"
}
requires:
- name: bookshop-demo-uaa
- name: srv_api
properties:
SBF_SERVICE_CONFIG:
bookshop-demo-api:
extend_credentials:
shared:
apiUrl: ~{url}
extend_xssecurity:
per_plan:
default:
authorities:
- $XSAPPNAME.admin
extend_catalog:
metadata:
displayName: Bookshop API ${space}
SBF_ENABLE_AUDITLOG: false
provides:
- name: bookshop-demo-api-sb-srv
properties:
app-name: ${app-name}
srv-url: ${default-url}
- name: bookshop-demo-destination-content-deployer
type: com.sap.application.content
build-parameters:
no-source: true
parameters:
content:
subaccount:
destinations:
- Name: bookshop-demo-uaa-apiaccess
Authentication: OAuth2ClientCredentials
ServiceInstanceName: bookshop-demo-uaa-apiaccess
ServiceKeyName: bookshop-demo-uaa-apiaccess-key
sap.cloud.service: bookshop.demo.service
- Name: bookshop-demo-repo-host
ServiceInstanceName: bookshop-demo-repo-host
ServiceKeyName: bookshop-demo-repo-host-key
sap.cloud.service: bookshop.demo.service
- Name: bookshop-demo-uaa
Authentication: OAuth2UserTokenExchange
ServiceInstanceName: bookshop-demo-uaa
ServiceKeyName: bookshop-demo-uaa-key
sap.cloud.service: bookshop.demo.service
- Name: bookshop-demo
Description: CAP backend service
Authentication: OAuth2UserTokenExchange
ServiceInstanceName: bookshop-demo-uaa
ServiceKeyName: bookshop-demo-uaa-key
URL: ~{srv_api/url}
HTML5.DynamicDestination: true
timeout: 600000
# - Name: bookshop-demo-docx
# Authentication: OAuth2ClientCredentials
# ServiceInstanceName: bookshop-demo-docx
# ServiceKeyName: bookshop-demo-docx-key
# Currently fails with:
# [ERROR] Destinations to service [destination] are not supported
# - Name: bookshop-demo-destination
# Authentication: OAuth2ClientCredentials
# ServiceInstanceName: bookshop-demo-destination-service
# ServiceKeyName: bookshop-demo-destination-service-key
# sap.cloud.service: basic.service
existing_destinations_policy: update
requires:
- name: bookshop-demo-uaa
parameters:
service-key:
name: bookshop-demo-uaa-key
- name: bookshop-demo-repo-host
parameters:
service-key:
name: bookshop-demo-repo-host-key
- name: srv_api
- name: bookshop-demo-destination-service
parameters:
content-target: true
# service-key:
# name: bookshop-demo-destination-service-key
- name: bookshop-demo-uaa-apiaccess
parameters:
service-key:
name: bookshop-demo-uaa-apiaccess-key
# - name: bookshop-demo-docx
# parameters:
# service-key:
# name: bookshop-demo-docx-key
# - name: bookshop-demo-v2-proxy
# type: nodejs
# path: standalone-v2-proxy
# build-parameters:
# ignore: ["node_modules/"]
# parameters:
# memory: 128M
# disk-quota: 2G
# provides:
# - name: srv_api_v2
# properties:
# url: '${default-url}'
# requires:
# - name: srv_api
# properties:
# srv_api_url: ~{url}
# - name: bookshop-demo-app
# type: nodejs
# path: app
# build-parameters:
# ignore: ["node_modules/"]
# parameters:
# memory: 256M
# disk-quota: 2G
# requires:
# - name: bookshop-demo-uaa
# - name: srv_api
# group: destinations
# properties:
# forwardAuthToken: true
# strictSSL: false
# name: srv_api
# url: ~{url}
# - name: srv_api_v2
# group: destinations
# properties:
# forwardAuthToken: true
# strictSSL: false
# name: srv_api_v2
# url: ~{url}
- name: bookshop-demo-ui
type: approuter.nodejs
path: approuter
parameters:
memory: 256M
disk-quota: 2G
stack: cflinuxfs4
build-parameters:
ignore: ["node_modules/"]
requires:
# - name: bookshop-demo-ui5-flexibility-keyuser
- name: bookshop-demo-destination-service
- name: bookshop-demo-connectivity-service
- name: bookshop-demo-uaa
- name: bookshop-demo-logging
# - name: bookshop-demo-cloud-logging
- name: bookshop-demo-repo-runtime
- name: srv_api
group: destinations
properties:
forwardAuthToken: true
strictSSL: false
name: srv_api
url: ~{url}
- name: bookshop-demo-deployer
type: com.sap.application.content
path: .
requires:
- name: bookshop-demo-repo-host
parameters:
content-target: true
build-parameters:
build-result: resources
requires:
- artifacts:
- HTML5Module-content.zip
name: bookshop-demo-HTML5Module
target-path: resources/
- name: bookshop-demo-HTML5Module
type: html5
path: app
build-parameters:
ignore: ["node_modules/"]
builder: custom
commands:
- npm run build
supported-platforms: []
resources:
- name: bookshop-demo-db-service
type: com.sap.xs.hdi-container
properties:
hdi-container-name: ${service-name}
- name: bookshop-demo-uaa
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: broker
path: ./xs-security.json
- name: bookshop-demo-uaa-client
parameters:
path: ./xs-security-client.json
service-plan: application
service: xsuaa
type: org.cloudfoundry.managed-service
- name: bookshop-demo-uaa-apiaccess
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: apiaccess
# - name: bookshop-demo-docx
# type: org.cloudfoundry.managed-service
# parameters:
# service: document-information-extraction-trial
# service-plan: default
- name: bookshop-demo-destination-service
parameters:
service-plan: lite
service: destination
type: org.cloudfoundry.managed-service
- name: bookshop-demo-connectivity-service
parameters:
service-plan: lite
service: connectivity
type: org.cloudfoundry.managed-service
- name: bookshop-demo-repo-host
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-plan: app-host
- name: bookshop-demo-repo-runtime
type: org.cloudfoundry.managed-service
parameters:
service-plan: app-runtime
service: html5-apps-repo
- name: bookshop-demo-job-scheduler
type: org.cloudfoundry.managed-service
parameters:
service: jobscheduler
service-plan: lite
config:
enable-xsuaa-support: true
- name: bookshop-demo-logging
type: org.cloudfoundry.managed-service
parameters:
service: application-logs
service-plan: lite
# - name: bookshop-demo-cloud-logging
# type: org.cloudfoundry.managed-service
# parameters:
# service: cloud-logging
# service-plan: dev
- name: bookshop-demo-autoscaler
type: org.cloudfoundry.managed-service
parameters:
service: autoscaler
service-plan: standard
# - name: bookshop-demo-ui5-flexibility-keyuser
# type: org.cloudfoundry.managed-service
# parameters:
# service: ui5-flexibility-keyuser
# service-plan: free