-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmta.yaml
More file actions
187 lines (182 loc) · 5.25 KB
/
Copy pathmta.yaml
File metadata and controls
187 lines (182 loc) · 5.25 KB
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
_schema-version: 3.3.0
ID: sample
version: 1.0.0-SNAPSHOT
description: "A simple CAP project."
parameters:
enable-parallel-deployments: true
modules:
- name: sample-srv
type: java
path: srv
parameters:
instances: 1
buildpack: sap_java_buildpack_jakarta
routes:
- route: "${default-url}"
- route: "${default-host}.cert.${default-domain}"
properties:
SPRING_PROFILES_ACTIVE: cloud,sandbox
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
JBP_CONFIG_SAP_MACHINE_JRE: '{ version: 21.+ }'
AMS_DCL_ROOT: ams/dcl
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"
build-parameters:
builder: custom
commands:
- mvn clean package -DskipTests=true --batch-mode
build-result: target/*-exec.jar
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
srv-cert-url: '${protocol}://${default-host}.cert.${default-domain}'
requires:
- name: sample-auth
parameters:
config:
credential-type: X509_GENERATED
app-identifier: srv
- name: mtx-api
properties:
CDS_MULTITENANCY_SIDECAR_URL: ~{mtx-url}
- name: sample-sms
- name: app-api
properties:
CDS_MULTITENANCY_APPUI_URL: ~{url}
- name: sample-db
deployed-after:
- sample-ams-policies-deployer
- name: sample-ams-policies-deployer
type: javascript.nodejs
path: .
build-parameters:
builder: custom
commands:
- npx cds build --for ams
build-result: srv/src/gen/policies
parameters:
buildpack: nodejs_buildpack
no-route: true
no-start: true
tasks:
- name: deploy-dcl
command: npm start
memory: 512M
requires:
- name: sample-auth
parameters:
config:
credential-type: X509_GENERATED
app-identifier: ams-policy-deployer
- name: sample
type: approuter.nodejs
path: app/router
parameters:
keep-existing-routes: true
disk-quota: 256M
memory: 256M
requires:
- name: srv-api
group: destinations
properties:
name: srv-api # must be used in xs-app.json as well
url: ~{srv-cert-url}
forwardAuthToken: true
forwardAuthCertificates: true
strictSSL: true
- name: sample-auth
parameters:
config:
credential-type: X509_GENERATED
app-identifier: approuter
- name: mtx-api
group: destinations
properties:
name: mtx-api # must be used in xs-app.json as well
url: ~{mtx-url}
provides:
- name: app-api
properties:
app-protocol: ${protocol}
app-uri: ${default-uri}
url: ${default-url}
properties:
TENANT_HOST_PATTERN: "^(.*)-${default-uri}"
- name: sample-mtx
type: nodejs
path: mtx/sidecar
build-parameters:
builder: custom
build-result: gen
commands:
- npm run build
requires:
- name: sample-srv
parameters:
instances: 1
memory: 256M
disk-quota: 512M
routes:
- route: "${default-url}"
- route: "${default-host}.cert.${default-domain}"
provides:
- name: mtx-api
properties:
mtx-url: ${default-url}
mtx-cert-url: ${protocol}://${default-host}.cert.${default-domain}
requires:
- name: sample-auth
parameters:
config:
credential-type: X509_GENERATED
app-identifier: mtx
- name: sample-db
resources:
- name: sample-auth
type: org.cloudfoundry.managed-service
parameters:
service: identity
service-name: sample-auth
service-plan: application
config:
display-name: sample
authorization:
enabled: true
oauth2-configuration:
redirect-uris:
- ~{app-api/app-protocol}://~{app-api/app-uri}/login/callback
post-logout-redirect-uris:
- ~{app-api/app-protocol}://~{app-api/app-uri}/*/logout.html
multi-tenant: true
requires:
- name: app-api
- name: sample-sms
type: org.cloudfoundry.managed-service
parameters:
service: subscription-manager
service-plan: provider
config:
applicationType: application
appName: sample-${org}-${space}
appCallbacks:
dependenciesCallbacks:
url: ~{srv-api/srv-cert-url}/mt/sms/subscriptions/tenants/{app_tid}/dependencies
subscriptionCallbacks:
url: ~{srv-api/srv-cert-url}/mt/sms/subscriptions/tenants/{app_tid}
async:
subscribeEnable: true
unSubscribeEnable: true
timeoutInMillis: 300000 # Increase if your deployments are taking longer than that
displayName: sample
description: Description for sample
category: Category
iasServiceInstanceName: sample-auth
requires:
- name: srv-api
processed-after:
- sample-auth
- name: sample-db
type: org.cloudfoundry.managed-service
parameters:
service: service-manager
service-plan: container