This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy pathmarathon.json.mustache
194 lines (183 loc) · 8.52 KB
/
marathon.json.mustache
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
{
"id": "{{service.name}}",
"cpus": 0.5,
"mem": 1024,
"instances": 1,
"user": "{{service.user}}",
"cmd": "export LD_LIBRARY_PATH=$MESOS_SANDBOX/libmesos-bundle/lib:$LD_LIBRARY_PATH; export MESOS_NATIVE_JAVA_LIBRARY=$(ls $MESOS_SANDBOX/libmesos-bundle/lib/libmesos-*.so); export JAVA_HOME=$(ls -d $MESOS_SANDBOX/jdk*/); export JAVA_HOME=${JAVA_HOME%/}; export PATH=$(ls -d $JAVA_HOME/bin):$PATH && export JAVA_OPTS=\"-Xms256M -Xmx512M -XX:-HeapDumpOnOutOfMemoryError {{#debug.address}}-agentlib:jdwp=transport=dt_socket,server=y,suspend={{debug.suspend}},address={{debug.address}}{{/debug.address}}\" && ./bootstrap -resolve=false -template=false && ./hello-world-scheduler/bin/helloworld {{service.yaml}} {{service.yamls}}",
"constraints": {{service.constraints}},
{{#service.role}}
"role": "{{service.role}}",
{{/service.role}}
"labels": {
"DCOS_COMMONS_API_VERSION": "v1",
"DCOS_COMMONS_UNINSTALL": "true",
"DCOS_PACKAGE_FRAMEWORK_NAME": "{{service.name}}",
"MARATHON_SINGLE_INSTANCE_APP": "true",
"DCOS_SERVICE_NAME": "{{service.name}}",
"DCOS_SERVICE_PORT_INDEX": "0",
"DCOS_SERVICE_SCHEME": "http"
},
{{#service.service_account_secret}}
"container": {
"type": "MESOS",
"volumes": [
{
"containerPath": "secrets/service-account.json",
"secret": "serviceCredential"
}
]
},
"secrets": {
"serviceCredential": {
"source": "{{service.service_account_secret}}"
}
},
{{/service.service_account_secret}}
"env": {
"PACKAGE_NAME": "{{package-name}}",
"PACKAGE_VERSION": "{{package-version}}",
"PACKAGE_BUILD_TIME_EPOCH_MS": "{{package-build-time-epoch-ms}}",
"PACKAGE_BUILD_TIME_STR": "{{package-build-time-str}}",
"FRAMEWORK_NAME": "{{service.name}}",
"FRAMEWORK_LOG_LEVEL": "{{service.log_level}}",
"FRAMEWORK_PRINCIPAL": "{{service.service_account}}",
"FRAMEWORK_USER": "{{service.user}}",
"ENABLE_ROLE_MIGRATION": "{{service.enable_role_migration}}",
"HELLO_COUNT": "{{hello.count}}",
"HELLO_CPUS": "{{hello.cpus}}",
"HELLO_GPUS": "{{hello.gpus}}",
"HELLO_MEM": "{{hello.mem}}",
"HELLO_DISK": "{{hello.disk}}",
"HELLO_SECCOMP_UNCONFINED": "{{hello.seccomp-unconfined}}",
{{#hello.seccomp-profile-name}}
"HELLO_SECCOMP_PROFILE_NAME": "{{hello.seccomp-profile-name}}",
{{/hello.seccomp-profile-name}}
{{#hello.volume_profile}}
"HELLO_VOLUME_PROFILE": "{{hello.volume_profile}}",
{{/hello.volume_profile}}
"HELLO_PLACEMENT": "{{{hello.placement}}}",
{{#hello.kill_grace_period}}
"HELLO_KILL_GRACE_PERIOD": "{{hello.kill_grace_period}}",
{{/hello.kill_grace_period}}
"HELLO_LABELS": "{{hello.labels}}",
"WORLD_COUNT": "{{world.count}}",
"WORLD_CPUS": "{{world.cpus}}",
"WORLD_MEM": "{{world.mem}}",
"WORLD_DISK": "{{world.disk}}",
"WORLD_PLACEMENT": "{{{world.placement}}}",
{{#world.kill_grace_period}}
"WORLD_KILL_GRACE_PERIOD": "{{world.kill_grace_period}}",
{{/world.kill_grace_period}}
{{#service.region}}
"SERVICE_REGION": "{{service.region}}",
{{/service.region}}
"SLEEP_DURATION": "{{service.sleep}}",
"JAVA_URI": "{{resource.assets.uris.jre-tar-gz}}",
"KEYSTORE_APP_URI": "{{resource.assets.uris.keystore-app-zip}}",
"BOOTSTRAP_URI": "{{resource.assets.uris.bootstrap-zip}}",
"LIBMESOS_URI": "{{resource.assets.uris.libmesos-bundle-tar-gz}}",
{{#service.service_account_secret}}
"DCOS_SERVICE_ACCOUNT_CREDENTIAL": "secrets/service-account.json",
"MESOS_MODULES": "{\"libraries\":[{\"file\":\"libmesos-bundle\/lib\/mesos\/libdcos_security.so\",\"modules\":[{\"name\": \"com_mesosphere_dcos_ClassicRPCAuthenticatee\",\"parameters\":[{\"key\":\"service_account_credential\",\"value\":\"file://secrets/service-account.json\"}]},{\"name\":\"com_mesosphere_dcos_http_Authenticatee\",\"parameters\":[{\"key\":\"service_account_credential\",\"value\":\"file://secrets/service-account.json\"},{\"key\":\"jwt_exp_timeout\",\"value\":\"5mins\"},{\"key\":\"preemptive_refresh_duration\",\"value\":\"30mins\"}]}]}]}",
"MESOS_AUTHENTICATEE": "com_mesosphere_dcos_ClassicRPCAuthenticatee",
"MESOS_HTTP_AUTHENTICATEE": "com_mesosphere_dcos_http_Authenticatee",
{{/service.service_account_secret}}
{{#service.task_failure_backoff.enabled}}
"ENABLE_BACKOFF": "{{service.task_failure_backoff.enabled}}",
"FRAMEWORK_BACKOFF_FACTOR": "{{service.task_failure_backoff.backoff_factor}}",
"FRAMEWORK_INITIAL_BACKOFF": "{{service.task_failure_backoff.initial_backoff}}",
"FRAMEWORK_MAX_LAUNCH_DELAY": "{{service.task_failure_backoff.max_launch_delay}}",
{{/service.task_failure_backoff.enabled}}
{{#hello.secret1}}
"HELLO_SECRET1" : "{{hello.secret1}}",
{{/hello.secret1}}
{{#hello.secret2}}
"HELLO_SECRET2" : "{{hello.secret2}}",
{{/hello.secret2}}
{{#world.secret1}}
"WORLD_SECRET1" : "{{world.secret1}}",
{{/world.secret1}}
{{#world.secret2}}
"WORLD_SECRET2" : "{{world.secret2}}",
{{/world.secret2}}
{{#world.secret3}}
"WORLD_SECRET3" : "{{world.secret3}}",
{{/world.secret3}}
{{#tls.discovery_task_prefix}}
"DISCOVERY_TASK_PREFIX": "{{tls.discovery_task_prefix}}",
{{/tls.discovery_task_prefix}}
{{#service.custom_service_tld}}
"SERVICE_TLD": "{{service.custom_service_tld}}",
{{/service.custom_service_tld}}
"CONTAINER_LOGGER_LOGROTATE_MAX_STDOUT_SIZE": "{{service.logrotate_options.stdout_max_size}}",
"CONTAINER_LOGGER_LOGROTATE_MAX_STDERR_SIZE": "{{service.logrotate_options.stderr_max_size}}",
"KEYSTORE_APP_VERSION": "{{tls.keystore_app_version}}",
"NGINX_CONTAINER_VERSION": "{{tls.nginx_container_version}}",
"TEST_BOOLEAN": "{{service.test_boolean}}",
"TEST_PROFILE_VOLUME_COMMAND": "{{{service.test_profile_volume_command}}}",
"SCENARIOS": "{{service.scenario}}",
"ALLOW_REGION_AWARENESS": "{{service.allow_region_awareness}}",
"HELLO_PORT_ONE": "{{hello.port_one}}",
"GLOG_v":"{{service.verbose_mesos_logging}}",
"TASKCFG_ALL_PACKAGE_VERSION_TO_FORCE_UPDATE": "{{package-version}}",
"WORLD_READINESS_CHECK_INTERVAL": "{{world.readiness_check.interval}}",
"WORLD_READINESS_CHECK_DELAY": "{{world.readiness_check.delay}}",
"WORLD_READINESS_CHECK_TIMEOUT": "{{world.readiness_check.timeout}}",
{{#hello.external_volume_name}}
"HELLO_EXTERNAL_VOLUME_NAME: "{{hello.external_volume_name}}",
{{/hello.external_volume_name}}
{{#world.external_volume_name}}
"WORLD_EXTERNAL_VOLUME_NAME: "{{world.external_volume_name}}",
{{/world.external_volume_name}}
{{#service.external_volumes.pod-replacement-failure-policy.enable-automatic-pod-replacement}}
"ENABLE_AUTOMATIC_POD_REPLACEMENT": "{{service.external_volumes.pod-replacement-failure-policy.enable-automatic-pod-replacement}}",
"PERMANENT_FAILURE_TIMEOUT_SECS": "{{service.external_volumes.pod-replacement-failure-policy.permanent-failure-timeout-secs}}",
"MIN_REPLACE_DELAY_SECS": "{{service.external_volumes.pod-replacement-failure-policy.min-replace-delay-secs}}",
{{/service.external_volumes.pod-replacement-failure-policy.enable-automatic-pod-replacement}}
"EXTERNAL_VOLUME_DRIVER_NAME": "{{service.external_volumes.volume_driver_name}}",
"EXTERNAL_VOLUME_DRIVER_OPTIONS": "{{service.external_volumes.volume_driver_options}}",
"HELLO_RLIMIT_NOFILE_SOFT": "{{hello.rlimits.rlimit_nofile.soft}}",
"HELLO_RLIMIT_NOFILE_HARD": "{{hello.rlimits.rlimit_nofile.hard}}",
"WORLD_RLIMIT_NOFILE_SOFT": "{{world.rlimits.rlimit_nofile.soft}}",
"WORLD_RLIMIT_NOFILE_HARD": "{{world.rlimits.rlimit_nofile.hard}}"
},
"fetch": [
{ "uri": "{{resource.assets.uris.bootstrap-zip}}", "cache": true },
{ "uri": "{{resource.assets.uris.jre-tar-gz}}", "cache": true },
{ "uri": "{{resource.assets.uris.scheduler-zip}}", "cache": false },
{ "uri": "{{resource.assets.uris.libmesos-bundle-tar-gz}}", "cache": true }
],
"upgradeStrategy":{
"minimumHealthCapacity": 0,
"maximumOverCapacity": 0
},
"check": {
"http": {
"portIndex": 0,
"path": "/v1/health",
"scheme": "HTTP"
},
"intervalSeconds": {{service.check.intervalSeconds}},
"timeoutSeconds": {{service.check.timeoutSeconds}},
"delaySeconds": {{service.check.delaySeconds}}
},
"healthChecks": [
{
"protocol": "MESOS_HTTP",
"path": "/v1/health",
"gracePeriodSeconds": 900,
"intervalSeconds": 30,
"portIndex": 0,
"timeoutSeconds": 30,
"maxConsecutiveFailures": 0
}
],
"portDefinitions": [
{
"port": 0,
"protocol": "tcp",
"name": "api"
}
]
}