|
| 1 | + |
| 2 | +{ |
| 3 | + "id": "{{service.name}}", |
| 4 | + "cpus": 1.0, |
| 5 | + "mem": 1024, |
| 6 | + "instances": 1, |
| 7 | + "user": "{{service.user}}", |
| 8 | + "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*/jre/); export JAVA_HOME=${JAVA_HOME%/}; export PATH=$(ls -d $JAVA_HOME/bin):$PATH && export JAVA_OPTS=\"-Xms256M -Xmx512M -XX:-HeapDumpOnOutOfMemoryError\" && ./bootstrap -resolve=false -template=false && ./operator-scheduler/bin/operator svc.yml", |
| 9 | + "labels": { |
| 10 | + "DCOS_COMMONS_API_VERSION": "v1", |
| 11 | + "DCOS_COMMONS_UNINSTALL": "true", |
| 12 | + "DCOS_PACKAGE_FRAMEWORK_NAME": "{{service.name}}", |
| 13 | + "MARATHON_SINGLE_INSTANCE_APP": "true", |
| 14 | + "DCOS_SERVICE_NAME": "{{service.name}}", |
| 15 | + "DCOS_SERVICE_PORT_INDEX": "0", |
| 16 | + "DCOS_SERVICE_SCHEME": "http" |
| 17 | + }, |
| 18 | + {{#security.secret-name}} |
| 19 | + "container": { |
| 20 | + "type": "MESOS", |
| 21 | + "volumes":[ |
| 22 | + { |
| 23 | + "containerPath": "secrets/service-account.json", |
| 24 | + "secret": "serviceCredential" |
| 25 | + } |
| 26 | + ] |
| 27 | + }, |
| 28 | + "secrets": { |
| 29 | + "serviceCredential": { |
| 30 | + "source": "{{security.secret-name}}" |
| 31 | + } |
| 32 | + }, |
| 33 | + {{/security.secret-name}} |
| 34 | + "env": { |
| 35 | + "PACKAGE_NAME": "{{package-name}}", |
| 36 | + "PACKAGE_VERSION": "{{package-version}}", |
| 37 | + "PACKAGE_BUILD_TIME_EPOCH_MS": "1531343768523", |
| 38 | + "PACKAGE_BUILD_TIME_STR": "2018-07-11T21:16:08.523025", |
| 39 | + "FRAMEWORK_NAME": "{{service.name}}", |
| 40 | + "FRAMEWORK_USER": "{{service.user}}", |
| 41 | + "FRAMEWORK_PRINCIPAL": "{{service.service_account}}", |
| 42 | + "FRAMEWORK_LOG_LEVEL": "{{service.log_level}}", |
| 43 | + "MESOS_API_VERSION": "{{service.mesos_api_version}}", |
| 44 | +
|
| 45 | + "GRAFANA_CPUS": "{{grafana.cpus}}", |
| 46 | + "GRAFANA_MEM": "{{grafana.mem}}", |
| 47 | + "GRAFANA_VOLUME": "{{grafana.volume.path}}", |
| 48 | + "GRAFANA_VOLUME_TYPE": "{{grafana.volume.type}}", |
| 49 | + "GRAFANA_VOLUME_SIZE": "{{grafana.volume.size}}", |
| 50 | + "GRAFANA_INI": "{{grafana.ini}}", |
| 51 | + "GRAFANA_DSP": "{{grafana.provisioning.datasources}}", |
| 52 | + "GRAFANA_DBP": "{{grafana.provisioning.dashboards}}", |
| 53 | +
|
| 54 | + "NODE_COUNT": "{{node.count}}", |
| 55 | + "NODE_PLACEMENT": "{{{node.placement_constraint}}}", |
| 56 | +
|
| 57 | + "NODE_CPUS": "{{node.cpus}}", |
| 58 | + "NODE_MEM": "{{node.mem}}", |
| 59 | + "NODE_DISK": "{{node.disk}}", |
| 60 | + "NODE_DISK_TYPE": "{{node.disk_type}}", |
| 61 | +
|
| 62 | + "JAVA_URI": "{{resource.assets.uris.jre-tar-gz}}", |
| 63 | + "EXECUTOR_URI": "{{resource.assets.uris.executor-zip}}", |
| 64 | + "BOOTSTRAP_URI": "{{resource.assets.uris.bootstrap-zip}}", |
| 65 | + "GRAFANA_URI": "{{resource.assets.uris.grafana-tar-gz}}", |
| 66 | + {{#security.secret-name}} |
| 67 | + "DCOS_SERVICE_ACCOUNT_CREDENTIAL": "secrets/service-account.json", |
| 68 | + "MESOS_MODULES": "{\"libraries\":[{\"file\":\"libmesos-bundle\/lib\/mesos\/libdcos_security.so\",\"modules\":[{\"name\": \"com_mesosphere_dcos_ClassicRPCAuthenticatee\"},{\"name\":\"com_mesosphere_dcos_http_Authenticatee\",\"parameters\":[{\"key\":\"jwt_exp_timeout\",\"value\":\"5mins\"},{\"key\":\"preemptive_refresh_duration\",\"value\":\"30mins\"}]}]}]}", |
| 69 | + "MESOS_AUTHENTICATEE": "com_mesosphere_dcos_ClassicRPCAuthenticatee", |
| 70 | + "MESOS_HTTP_AUTHENTICATEE": "com_mesosphere_dcos_http_Authenticatee", |
| 71 | + {{/security.secret-name}} |
| 72 | + "LIBMESOS_URI": "{{resource.assets.uris.libmesos-bundle-tar-gz}}" |
| 73 | + }, |
| 74 | + "uris": [ |
| 75 | + "{{resource.assets.uris.bootstrap-zip}}", |
| 76 | + "{{resource.assets.uris.jre-tar-gz}}", |
| 77 | + "{{resource.assets.uris.scheduler-zip}}", |
| 78 | + "{{resource.assets.uris.libmesos-bundle-tar-gz}}", |
| 79 | + "{{resource.assets.uris.svc}}" |
| 80 | + ], |
| 81 | + "upgradeStrategy":{ |
| 82 | + "minimumHealthCapacity": 0, |
| 83 | + "maximumOverCapacity": 0 |
| 84 | + }, |
| 85 | + "healthChecks": [ |
| 86 | + { |
| 87 | + "protocol": "MESOS_HTTP", |
| 88 | + "path": "/v1/health", |
| 89 | + "gracePeriodSeconds": 900, |
| 90 | + "intervalSeconds": 30, |
| 91 | + "portIndex": 0, |
| 92 | + "timeoutSeconds": 30, |
| 93 | + "maxConsecutiveFailures": 0 |
| 94 | + } |
| 95 | + ], |
| 96 | + "portDefinitions": [ |
| 97 | + { |
| 98 | + "port": 0, |
| 99 | + "protocol": "tcp", |
| 100 | + "name": "api", |
| 101 | + "labels": { "VIP_0": "/api.{{service.name}}:80" } |
| 102 | + } |
| 103 | + ] |
| 104 | +} |
0 commit comments