Last active
August 24, 2016 17:55
-
-
Save RichardHightower/6ebf9071426ec24c0e0644b6895cb348 to your computer and use it in GitHub Desktop.
Java setup for Mesos/Gradle/QBit zip that uses logback/sl4j and virtual hosting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<appender name="STASH-UDP" class="net.logstash.logback.appender.LogstashSocketAppender"> | |
<host>${LOGSTASH_HOST:-192.168.99.100}</host> | |
<port>${LOGSTASH_PORT:-5001}</port> | |
<customFields>{"serviceName":"sample-dcos-qbit","serviceHost":"${HOST}","servicePort":"${PORT0}","serviceId":"sample-dcos-qbit-${HOST}-${PORT0}","serviceAdminPort":"${PORT1}"}</customFields> | |
</appender> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern> | |
%magenta(%d{HH:mm:ss.SSS}) %yellow([%thread]) %highlight(%-5level) %cyan(%logger{15}) - %msg%n | |
</pattern> | |
</encoder> | |
</appender> | |
<root level="INFO"> | |
<appender-ref ref="STDOUT"/> | |
<appender-ref ref="STASH-UDP"/> | |
</root> | |
<logger name="io.advantageous" level="DEBUG"/> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "/sample-dcos3", | |
"cmd": "/opt/install.sh", | |
"cpus": 0.5, | |
"mem": 1024, | |
"disk": 0, | |
"instances": 3, | |
"container": { | |
"type": "DOCKER", | |
"volumes": [], | |
"docker": { | |
"image": "advantageous/run-java-zip:0.2", | |
"network": "BRIDGE", | |
"portMappings": [ | |
{ | |
"containerPort": 8081, | |
"hostPort": 0, | |
"servicePort": 10101, | |
"protocol": "tcp", | |
"labels": {} | |
}, | |
{ | |
"containerPort": 9090, | |
"hostPort": 0, | |
"servicePort": 10102, | |
"protocol": "tcp", | |
"labels": {} | |
} | |
], | |
"privileged": false, | |
"parameters": [], | |
"forcePullImage": false | |
} | |
}, | |
"env": { | |
"LOGSTASH_HOST": "logstash-logback.marathon.mesos", | |
"JAVA_ZIP_LOCATION": "https://s3-us-west-2.amazonaws.com/deploy-sandbox-123/sample-dcos-cas-dcos-0.9.5.zip", | |
"JAVA_RUN_DEBUG": "TRUE", | |
"LOGSTASH_PORT": "10555", | |
"DEPLOYMENT_ENVIRONMENT": "integration", | |
"LOGBACK_PATTERN": "%d{HH:mm:ss.SSS}-[%-5level] %logger{15} - %msg%n", | |
"JAVA_RUN_COMMAND": "/opt/sample-dcos-cas-0.9.5/bin/sample-dcos-cas" | |
}, | |
"healthChecks": [ | |
{ | |
"path": "/__admin/ok", | |
"protocol": "HTTP", | |
"portIndex": 1, | |
"gracePeriodSeconds": 30, | |
"intervalSeconds": 20, | |
"timeoutSeconds": 20, | |
"maxConsecutiveFailures": 3, | |
"ignoreHttp1xx": false | |
} | |
], | |
"labels": { | |
"HAPROXY_GROUP": "external", | |
"HAPROXY_0_VHOST": "sample-dcos3.sandbox.mydomain.com" | |
}, | |
"portDefinitions": [ | |
{ | |
"port": 10101, | |
"protocol": "tcp", | |
"name": "eventbus", | |
"labels": {} | |
}, | |
{ | |
"port": 10102, | |
"protocol": "tcp", | |
"name": "admin", | |
"labels": {} | |
} | |
], | |
"upgradeStrategy": { | |
"minimumHealthCapacity": 0, | |
"maximumOverCapacity": 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment