-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathmta.tpl.yaml
More file actions
322 lines (321 loc) · 10.5 KB
/
mta.tpl.yaml
File metadata and controls
322 lines (321 loc) · 10.5 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
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
# This is a main template to build the mta extension descriptor file.
# The template is amended/modified by a custom logic, done in src/autoscaler/build-extension-file.sh
# The custom logic is used to replace the placeholders with the actual values specially, `version: MTA_VERSION`
# - version: MTA_VERSION: is replaced once the mta artifact are build and the version is known.
ID: com.github.cloudfoundry.app-autoscaler-release
description: Application Autoscaler Release for Cloud Foundry
_schema-version: "3.3.0"
provider: Cloud Foundry Foundation
copyright: Apache License 2.0
version: MTA_VERSION
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- make clean go-mod-vendor-mta vendor-changelogs
modules:
- name: dbtasks
type: java
path: .
properties:
JBP_LOG_LEVEL:
JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{enabled: false}'
LOG_LEVEL: INFO
DEBUG:
GOTOOLCHAIN: local
GOVERSION: go1.25
build-parameters:
builder: custom
commands:
- make dbtasks.clean package-dbtasks
build-result: dbtasks/target/db-1.0-SNAPSHOT.jar
requires:
- name: database
parameters:
no-route: true
no-start: true
tasks:
- name: apply-api-changelog
command: |
chmod +x ./BOOT-INF/classes/bin/apply-changelog.sh ; \
/home/vcap/app/BOOT-INF/classes/bin/apply-changelog.sh \
BOOT-INF/classes/api.db.changelog.yml \
BOOT-INF/classes/servicebroker.db.changelog.yaml
- name: apply-eventgenerator-changelog
command: |
chmod +x ./BOOT-INF/classes/bin/apply-changelog.sh ; \
/home/vcap/app/BOOT-INF/classes/bin/apply-changelog.sh \
BOOT-INF/classes/dataaggregator.db.changelog.yml \
BOOT-INF/classes/metricscollector.db.changelog.yml
- name: apply-operator-changelog
command: |
chmod +x ./BOOT-INF/classes/bin/apply-changelog.sh ; \
/home/vcap/app/BOOT-INF/classes/bin/apply-changelog.sh \
BOOT-INF/classes/operator.db.changelog.yml
- name: apply-scalingengine-changelog
command: |
chmod +x ./BOOT-INF/classes/bin/apply-changelog.sh ; \
/home/vcap/app/BOOT-INF/classes/bin/apply-changelog.sh \
BOOT-INF/classes/scalingengine.db.changelog.yml
- name: apply-scheduler-changelog
command: |
chmod +x ./BOOT-INF/classes/bin/apply-changelog.sh ; \
/home/vcap/app/BOOT-INF/classes/bin/apply-changelog.sh \
BOOT-INF/classes/scheduler.changelog-master.yaml \
BOOT-INF/classes/quartz.changelog-master.yaml
- name: apiserver
type: go
path: .
properties:
DT_RELEASE_BUILD_VERSION: ${mta-version}
GO_INSTALL_PACKAGE_SPEC: code.cloudfoundry.org/app-autoscaler/src/autoscaler/api/cmd/api
GOFIPS140: v1.0.0
GOTOOLCHAIN: "local"
GOVERSION: go1.25
build-parameters:
builder: custom
commands:
- echo "ignoring scheduler and dbtasks" > /dev/null
ignore: ["acceptance", "build", "scheduler", "dbtasks", ".devbox", ".git", ".github"]
requires:
- name: apiserver-config
- name: broker-catalog
- name: database
- name: app-autoscaler-application-logs
- name: app-autoscaler-dynatrace
parameters:
instances: 0 # overridden in build-extension-file.sh
memory: 1G
disk-quota: 1G
stack: cflinuxfs4
routes:
- name: eventgenerator
type: go
path: .
properties:
DT_RELEASE_BUILD_VERSION: ${mta-version}
GO_INSTALL_PACKAGE_SPEC: code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/cmd/eventgenerator
GOFIPS140: v1.0.0
GOTOOLCHAIN: local
GOVERSION: go1.25
build-parameters:
builder: custom
commands:
- echo "ignoring scheduler, dbtasks and scalingengine" > /dev/null
ignore: ["acceptance", "build", "scheduler", "dbtasks", "scalingengine", ".devbox", ".git", ".github"]
requires:
- name: eventgenerator-config
- name: database
- name: app-autoscaler-application-logs
- name: app-autoscaler-dynatrace
parameters:
instances: 0 # overridden in build-extension-file.sh
memory: 1G
disk-quota: 1G
stack: cflinuxfs4
routes:
- name: metricsforwarder
type: go
path: .
properties:
DT_RELEASE_BUILD_VERSION: ${mta-version}
GO_INSTALL_PACKAGE_SPEC: code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsforwarder/cmd/metricsforwarder
GOFIPS140: v1.0.0
GOTOOLCHAIN: local
GOVERSION: go1.25
build-parameters:
builder: custom
commands:
- echo "ignoring scheduler and dbtasks" > /dev/null
ignore: ["build", "scheduler", "dbtasks", ".devbox", ".git", ".github"]
requires:
- name: metricsforwarder-config
- name: database
- name: syslog-client
- name: app-autoscaler-application-logs
- name: app-autoscaler-dynatrace
parameters:
instances: 0 # overridden in build-extension-file.sh
memory: 1G
disk-quota: 1G
stack: cflinuxfs4
routes:
- name: operator
type: go
path: .
properties:
DT_RELEASE_BUILD_VERSION: ${mta-version}
GO_INSTALL_PACKAGE_SPEC: code.cloudfoundry.org/app-autoscaler/src/autoscaler/operator/cmd/operator
GOFIPS140: v1.0.0
GOTOOLCHAIN: local
GOVERSION: go1.25
build-parameters:
builder: custom
commands:
- echo "ignoring scheduler, dbtasks and eventgenerator" > /dev/null
ignore: ["acceptance", "build", "scheduler", "dbtasks", "eventgenerator", ".devbox", ".git", ".github"]
requires:
- name: operator-config
- name: database
- name: app-autoscaler-application-logs
- name: app-autoscaler-dynatrace
parameters:
instances: 0 # overridden in build-extension-file.sh
memory: 1G
disk-quota: 1G
stack: cflinuxfs4
routes:
- name: scalingengine
type: go
path: .
properties:
DT_RELEASE_BUILD_VERSION: ${mta-version}
GO_INSTALL_PACKAGE_SPEC: code.cloudfoundry.org/app-autoscaler/src/autoscaler/scalingengine/cmd/scalingengine
GOFIPS140: v1.0.0
GOTOOLCHAIN: local
GOVERSION: go1.25
build-parameters:
builder: custom
commands:
- echo "ignoring scheduler, dbtasks and eventgenerator" > /dev/null
ignore: ["acceptance", "build", "scheduler", "dbtasks", "eventgenerator", ".devbox", ".git", ".github"]
requires:
- name: scalingengine-config
- name: database
- name: app-autoscaler-application-logs
- name: app-autoscaler-dynatrace
parameters:
instances: 0 # overridden in build-extension-file.sh
memory: 1G
disk-quota: 1G
stack: cflinuxfs4
routes:
- name: scheduler
type: java
path: .
build-parameters:
builder: custom
commands:
- make scheduler.clean build-scheduler
build-result: scheduler/target/scheduler-1.0-SNAPSHOT.war
properties:
JBP_LOG_LEVEL:
JBP_CONFIG_OPEN_JDK_JRE: '{ "version": "21.+", "jre": { "version": "21.+", "java_home": ".java-buildpack/java_home" } }'
JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{enabled: false}'
DEBUG:
GOTOOLCHAIN: local
GOVERSION: go1.25
requires:
- name: scheduler-config
- name: database
- name: app-autoscaler-application-logs
- name: app-autoscaler-dynatrace
parameters:
instances: 0 # overridden in build-extension-file.sh
memory: 1G
disk-quota: 1G
stack: cflinuxfs4
routes:
- name: acceptance-tests
type: application
path: .
properties:
# JSON configuration - set via extension file during deployment
ACCEPTANCE_CONFIG_JSON: ~
# Test execution settings
SUITES: ""
NODES: 3
SKIP_TEARDOWN: false
GINKGO_OPTS: ""
GOFIPS140: v1.0.0
GOTOOLCHAIN: local
GOVERSION: go1.25
build-parameters:
builder: custom
commands:
- echo "Building acceptance tests for version ${version}"
- bash -c "TARGET_OS=linux TARGET_ARCH=amd64 VERSION=${version} make acceptance-release"
build-result: build/acceptance
ignore: ["build", "scheduler", "dbtasks", ".devbox", ".git", ".github"]
parameters:
no-route: true
no-start: true
memory: 2G
disk-quota: 2G
stack: cflinuxfs4
buildpack: binary_buildpack
tasks:
- name: run-acceptance-tests
command: bash /home/vcap/app/scripts/run-acceptance-tests-task.sh
memory: 2G
disk-quota: 2G
resources:
- name: metricsforwarder-config
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- metricsforwarder-config
path: metricsforwarder/default_config.json
- name: eventgenerator-config
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- eventgenerator-config
path: eventgenerator/default_config.json
- name: apiserver-config
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- apiserver-config
path: api/default_config.json
- name: operator-config
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- operator-config
path: operator/default_config.json
- name: scalingengine-config
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- scalingengine-config
path: scalingengine/default_config.json
- name: scheduler-config
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- scheduler-config
path: scheduler/default_config.json
- name: broker-catalog
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- broker-catalog
- name: database
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- policy_db
- binding_db
- appmetrics_db
- scalingengine_db
- scheduler_db
- lock_db
- relational
- name: syslog-client
type: org.cloudfoundry.user-provided-service
parameters:
service-tags:
- syslog-client
- name: app-autoscaler-application-logs
active: false
type: org.cloudfoundry.managed-service
parameters:
service: application-logs
service-plan: standard
- name: app-autoscaler-dynatrace
type: org.cloudfoundry.existing-service
active: false
optional: true