|-- db/
`-- data-model.cds
|--app/
|--approuter/
|--mtx/sidecar/
|--srv1
`-- monitoringservice.cds
`--pom.xml
|--srv2
`-- integrationservice.cds
`--pom.xml
<commands>
<command>deploy db srv2 --to h2 --dry > srv2/src/main/resources/schema.sql</command>
<command>deploy db srv1 --to h2 --dry > srv1/src/main/resources/schema.sql</command>
</commands>
<commands>
<command>build --for java --src srv1</command>
<command>deploy db srv1 --to h2 --dry >"${project.basedir}/src/main/resources/schema.sql"
</command>
</commands>
<commands>
<command>build --for java --src srv2</command>
<command>deploy db srv2 --to h2 --dry >"${project.basedir}/src/main/resources/schema.sql"</command>
</commands>
mvn clean install
mvn clean install -pl srv1 -am
mvn clean install -pl srv2 -am
{
"requires": {
"multitenancy": true
},
"build": {
"target": ".",
"tasks": [
{
"for": "java",
"src": "srv1",
"options": {
"model": [
"db",
"srv1",
"app"
]
}
},
{
"for": "java",
"src": "srv2",
"options": {
"model": [
"db",
"srv2",
"app"
]
}
},
{
"for": "mtx-sidecar"
},
{
"for": "hana",
"src": "db",
"options": {
"model": [
"db",
"srv1",
"srv2",
"app"
]
}
}
]
},
"hana": {
"deploy-format": "hdbtable"
}
}
# --------------------- SERVER MODULE ------------------------
- name: mis-srv2
# ----------------------------------------------------------
deployed-after:
- mis-mtx-sidecar
type: java
path: srv2
properties:
SPRING_PROFILES_ACTIVE: cloud
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
JBP_CONFIG_SAP_MACHINE_JRE: "{ use_offline_repository: false, version: 17.+ }"
parameters:
memory: 2048M
disk-quota: 1024M
buildpack: sap_java_buildpack
routes:
- route: "${app-prefix}-${service_route}.${default-domain-host}"
build-parameters:
builder: custom
commands: [mvn clean package]
build-result: "target/*-exec.[wj]ar"
provides:
- name: srv-api2 # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: "${protocol}://${app-prefix}-${service_route}.${default-domain-host}"
requires:
- name: mis-uaa
- name: mis-service-manager
- name: mis-saas-registry
- name: mtx-sidecar
properties:
CDS_MULTITENANCY_MTXS_ENABLED: true
CDS_MULTITENANCY_SIDECAR_URL: ~{url}
- name: approuter_api
properties:
CDS_MULTITENANCY_APPUI_URL: ~{url}
# ----------------- MTX-SIDECAR MODULE -----------------------
- name: mis-mtx-sidecar
# ----------------------------------------------------------
type: nodejs
path: mtx/sidecar
build-parameters:
builder: custom
build-result: gen
commands:
- npm run build
requires:
- name: mis-srv1
- name: mis-srv2
parameters:
memory: 512M
disk-quota: 1024M
requires:
- name: mis-uaa
- name: mis-service-manager
provides:
- name: mtx-sidecar
properties:
url: ${default-url}
# --------------------- APPROUTER MODULE ---------------------
- name: mis-approuter
# ----------------------------------------------------------
type: approuter.nodejs
path: mis-approuter
requires:
- name: mis-html-repo-runtime
- name: mis-uaa
- name: mis-saas-registry
- name: srv-api1
- name: srv-api2
parameters:
disk-quota: 256M
memory: 256M
keep-existing-routes: true
routes:
- route: "${app-prefix}-${approuter_route}.${default-domain-host}"
provides:
- name: approuter_api
properties:
url: "${protocol}://${app-prefix}-${approuter_route}.${default-domain-host}"
properties:
TENANT_HOST_PATTERN: "^(.*)-${app-prefix}-${approuter_route}.${default-domain-host}"
destinations:
- name: backend
url: "~{srv-api1/srv-url}"
- name: backend2
url: "~{srv-api2/srv-url}"
forwardAuthToken: true
- name: mis-saas-registry
type: org.cloudfoundry.managed-service
parameters:
service: saas-registry
service-plan: application
requires:
- name: srv-api2
mbt build -t gen --mtar mta.tar
mbt module-build -m=mis-srv2 -t gen --mtar mta.tar
mbt module-build -m=mis-srv1 -t gen --mtar mta.tar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
11 | |
11 | |
11 | |
11 | |
8 | |
6 | |
5 | |
5 | |
5 |