-
Notifications
You must be signed in to change notification settings - Fork 167
Expand file tree
/
Copy pathmta-multi-tenant.yaml
More file actions
170 lines (170 loc) · 5.44 KB
/
mta-multi-tenant.yaml
File metadata and controls
170 lines (170 loc) · 5.44 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
_schema-version: '2.1'
ID: bookshop-mt-ias
version: 1.0.0
description: "Multitenant Bookshop CAP Java Project with UI"
parameters:
enable-parallel-deployments: true
modules:
# --------------------- SERVER MODULE ------------------------
- name: bookshop-mt-ias-srv
# ------------------------------------------------------------
type: java
path: srv
parameters:
memory: 1024M
disk-quota: 512M
buildpack: sap_java_buildpack_jakarta
routes:
- route: '${default-url}'
- route: '${default-host}.cert.${default-domain}'
properties:
SPRING_PROFILES_ACTIVE: cloud,sandbox
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
JBP_CONFIG_SAP_MACHINE_JRE: '{ version: 21.+ }'
build-parameters:
builder: custom
commands:
- mvn clean package -DskipTests=true
build-result: target/*-exec.jar
requires:
- name: bookshop-service-manager
- name: bookshop-sms
- name: bookshop-identity
parameters:
config:
credential-type: "X509_GENERATED"
key-length: 2048
validity: 30
validity-type: "DAYS"
app-identifier: "microservice1"
- name: mtx-api
properties:
CDS_MULTITENANCY_SIDECAR_URL: ~{mtx-url}
- name: app-api
properties:
CDS_MULTITENANCY_APPUI_URL: ~{app-url}
- name: cf-logging
provides:
- name: srv-api
properties:
srv-url: '${default-url}'
srv-cert-url: '${protocol}://${default-host}.cert.${default-domain}'
# --------------------- SIDECAR MODULE -----------------------
- name: bookshop-mt-ias-sidecar
# ------------------------------------------------------------
type: nodejs
path: mtx/sidecar
parameters:
memory: 256M
disk-quota: 1024M
build-parameters:
builder: custom
build-result: gen
commands:
- npm run build
requires:
- name: bookshop-mt-ias-srv
requires:
- name: bookshop-service-manager
- name: bookshop-identity
parameters:
config:
credential-type: "X509_GENERATED"
key-length: 2048
validity: 30
validity-type: "DAYS"
app-identifier: "microservice1"
- name: cf-logging
provides:
- name: mtx-api
properties:
mtx-url: ${default-url}
# --------------------- APPROUTER MODULE ---------------------
- name: bookshop-mt-ias-app
# ------------------------------------------------------------
type: approuter.nodejs
path: app
parameters:
memory: 256M
disk-quota: 512M
keep-existing-routes: true
properties:
TENANT_HOST_PATTERN: ^(.*)-${default-host}.${default-domain} # testing only, use custom domain with wildcard for production
requires:
- name: srv-api
group: destinations
properties:
name: backend
url: ~{srv-cert-url}
forwardAuthCertificates: true
forwardAuthToken: true
strictSSL: true
- name: bookshop-identity
parameters:
config:
credential-type: "X509_GENERATED"
key-length: 2048
validity: 30
validity-type: "DAYS"
app-identifier: "microservice1"
- name: bookshop-sms
provides:
- name: app-api
properties:
app-url: '${default-url}'
app-domain: '${default-domain}'
# --------------------- RESOURCES ---------------------
resources:
# -----------------------------------------------------
- name: bookshop-service-manager
type: org.cloudfoundry.managed-service
parameters:
service: service-manager
service-plan: container
- name: bookshop-identity
type: org.cloudfoundry.managed-service
parameters:
service: identity
service-plan: application
config:
authorization:
enabled: true
value_help_url: "https://vhp-srv-develop.cert.cfapps.sap.hana.ondemand.com/odata/v4/ExampleValueHelpService/"
oauth2-configuration:
redirect-uris: [
"https://*.cfapps.sap.hana.ondemand.com/**",
"https://*.internal.cfapps.sap.hana.ondemand.com/node/signin-oidc/*",
"http://localhost:5000/login/callback?authType=ias"
]
xsuaa-cross-consumption: true
display-name: bookshop-identity
multi-tenant: true
- name: bookshop-sms
type: org.cloudfoundry.managed-service
parameters:
service: subscription-manager
service-plan: provider
config:
iasServiceInstanceName: bookshop-identity
applicationType: application
appName: bookshop-mt-ias
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}
subscribeEnable: true
unSubscribeEnable: true
timeoutInMillis: 60000
displayName: bookshop-mt-ias
description: "Bookshop Identity"
category: "Application Development and Automation"
requires:
- name: srv-api
processed-after: [ bookshop-identity ]
- name: cf-logging
type: org.cloudfoundry.managed-service
parameters:
service: application-logs
service-plan: lite