-
Notifications
You must be signed in to change notification settings - Fork 3
/
mta.yaml
148 lines (148 loc) · 4.55 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
_schema-version: "2.1"
ID: bookshop-recap-ws
version: 1.0.0
description: "Bookshop CAP Java Project with UI"
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- npm run build-bupa
modules:
# --------------------- DB MODULE ---------------------------
- name: bookshop-db-otel
# -----------------------------------------------------------
type: hdb
path: db
parameters:
buildpack: nodejs_buildpack
memory: 128M
build-parameters:
builder: custom
commands:
- npm run build
requires:
- name: bookshop-srv-otel
requires:
- name: bookshop-hdi-container-otel
# --------------------- BUPA DB MODULE ----------------------
- name: bookshop-bupa-db-otel
# -----------------------------------------------------------
type: hdb
path: bupa/gen/db
parameters:
buildpack: nodejs_buildpack
memory: 128M
requires:
- name: bookshop-bupa-hdi-container-otel
# --------------------- APPROUTER MODULE ---------------------
- name: bookshop-app-otel
# ------------------------------------------------------------
type: approuter.nodejs
path: app
parameters:
memory: 128M
disk-quota: 512M
requires:
- name: srv-api
group: destinations
properties:
name: backend
url: ~{srv-url}
forwardAuthToken: true
strictSSL: true
- name: bookshop-uaa-otel
provides:
- name: app-api
properties:
app-url: "${default-url}"
# --------------------- BUPA SERVER MODULE -------------------
- name: bookshop-bupa-srv-otel
# ------------------------------------------------------------
type: nodejs
path: bupa/gen/srv
parameters:
buildpack: nodejs_buildpack
memory: 256M
build-parameters:
builder: npm
provides:
- name: bookshop-bupa-srv-api
properties:
srv-url: ${default-url}
requires:
- name: bookshop-bupa-hdi-container-otel
- name: bookshop-application-logs
- name: bookshop-cloud-logging
# --------------------- SERVER MODULE ------------------------
- name: bookshop-srv-otel
# ------------------------------------------------------------
type: java
path: srv
parameters:
memory: 512M
disk-quota: 512M
buildpack: sap_java_buildpack
properties:
SPRING_PROFILES_ACTIVE: cloud,cap-node
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
JBP_CONFIG_SAP_MACHINE_JRE: "{ version: 17.+ }"
JBP_CONFIG_JAVA_OPTS: "[from_environment: false, java_opts:
'-javaagent:META-INF/.sap_java_buildpack/otel_agent/opentelemetry-javaagent.jar
-Dotel.javaagent.extensions=META-INF/.sap_java_buildpack/otel_agent_extension/otel-agent-ext-java.jar']"
OTEL_METRICS_EXPORTER: cloud-logging
OTEL_TRACES_EXPORTER: cloud-logging
BUPA_NODE_URL: ~{bookshop-bupa-srv-api/srv-url}
build-parameters:
builder: custom
commands:
- mvn clean package -DskipTests=true
build-result: target/*-exec.jar
requires:
- name: bookshop-hdi-container-otel
- name: bookshop-uaa-otel
- name: bookshop-bupa-srv-api
- name: bookshop-application-logs
- name: bookshop-cloud-logging
provides:
- name: srv-api
properties:
srv-url: "${default-url}"
# --------------------- RESOURCES ---------------------
resources:
# -----------------------------------------------------
- name: bookshop-uaa-otel
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
config: # override xsappname as it needs to be unique
xsappname: bookshop-otel-${org}-${space}
oauth2-configuration:
redirect-uris:
- ~{app-api/app-url}/**
requires:
- name: app-api
- name: bookshop-hdi-container-otel
type: org.cloudfoundry.managed-service
parameters:
service: hana
service-plan: hdi-shared
- name: bookshop-bupa-hdi-container-otel
type: org.cloudfoundry.managed-service
parameters:
service: hana
service-plan: hdi-shared
- name: bookshop-application-logs
type: org.cloudfoundry.managed-service
parameters:
service: application-logs
service-plan: lite
- name: bookshop-cloud-logging
type: org.cloudfoundry.managed-service
parameters:
service: cloud-logging
service-plan: standard
path: ./cf-logging.json