Skip to content

Instantly share code, notes, and snippets.

@spencersmith
Last active June 3, 2020 13:49
Show Gist options
  • Save spencersmith/5f92a6a8efa8ca6dc6ca26c709eb0bbe to your computer and use it in GitHub Desktop.
Save spencersmith/5f92a6a8efa8ca6dc6ca26c709eb0bbe to your computer and use it in GitHub Desktop.
{
"id": "/alluxio-master",
"cmd": "/alluxio/bin/alluxio bootstrapConf localhost s3\n/start.sh master",
"cpus": 1,
"mem": 512,
"disk": 100,
"instances": 1,
"container": {
"type": "DOCKER",
"volumes": [
{
"containerPath": "/data",
"hostPath": "data",
"mode": "RW"
}
],
"docker": {
"image": "koddidev/alluxio",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 19999,
"hostPort": 19999,
"servicePort": 10101,
"protocol": "tcp",
"labels": {}
},
{
"containerPort": 19998,
"hostPort": 19998,
"servicePort": 10102,
"protocol": "tcp",
"labels": {}
}
],
"privileged": false,
"parameters": [],
"forcePullImage": true
}
},
"env": {
"AWS_ACCESS_KEY": "YOUR_AWS_ACCESS_KEY",
"AWS_SECRET_KEY": "YOUR_AWS_SECRET_KEY",
"ENV ALLUXIO_RAM_FOLDER": "/dev/ram",
"ALLUXIO_UNDERFS_ADDRESS": "s3a://YOUR_S3_BUCKET",
"ALLUXIO_MASTER_HOSTNAME": "alluxio-master.marathon.mesos",
"ENV ALLUXIO_WORKER_MEMORY_SIZE": "2GB",
"JAVA": "/opt/jdk/bin/java"
},
"healthChecks": [
{
"protocol": "TCP",
"portIndex": 0,
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"timeoutSeconds": 20,
"maxConsecutiveFailures": 3,
"ignoreHttp1xx": false
}
],
"labels": {
"DCOS_SERVICE_SCHEME": "http",
"DCOS_SERVICE_NAME": "alluxio-master",
"DCOS_SERVICE_PORT_INDEX": "0",
},
"portDefinitions": [
{
"port": 10101,
"protocol": "tcp",
"labels": {}
},
{
"port": 10102,
"protocol": "tcp",
"labels": {}
}
],
"requirePorts": true
}
{
"id": "/alluxio-worker",
"cmd": "/alluxio/bin/alluxio bootstrapConf alluxio-master.marathon.mesos s3\ncp /alluxio/conf/alluxio-site.properties.template /alluxio/conf/alluxio-site.properties\necho 'alluxio.worker.hostname=YOUR-internal-marathon-load-balancer.us-east-1.elb.amazonaws.com' >> /alluxio/conf/alluxio-site.properties\necho 'alluxio.worker.port=10105' >> /alluxio/conf/alluxio-site.properties\necho 'alluxio.worker.data.port=10103' >> /alluxio/conf/alluxio-site.properties\n/alluxio/bin/alluxio formatWorker\n/start.sh slave",
"cpus": 1,
"mem": 512,
"disk": 100,
"instances": 1,
"container": {
"type": "DOCKER",
"volumes": [
{
"containerPath": "/data",
"hostPath": "data",
"mode": "RW"
}
],
"docker": {
"image": "koddidev/alluxio",
"network": "BRIDGE",
"portMappings": [
{
"containerPort": 30000,
"hostPort": 30000,
"servicePort": 10104,
"protocol": "tcp",
"labels": {}
},
{
"containerPort": 10103,
"hostPort": 10103,
"servicePort": 10103,
"protocol": "tcp",
"labels": {}
},
{
"containerPort": 10105,
"hostPort": 10105,
"servicePort": 10105,
"protocol": "tcp",
"labels": {}
}
],
"privileged": false,
"parameters": [],
"forcePullImage": true
}
},
"env": {
"AWS_ACCESS_KEY": "YOUR_AWS_ACCESS_KEY",
"AWS_SECRET_KEY": "YOUR_AWS_SECRET_KEY",
"ALLUXIO_WORKER_HOSTNAME": "YOUR-internal-marathon-load-balancer.us-east-1.elb.amazonaws.com",
"ENV ALLUXIO_RAM_FOLDER": "/dev/ram",
"ALLUXIO_UNDERFS_ADDRESS": "s3a://YOUR_S3_BUCKET",
"ALLUXIO_MASTER_HOSTNAME": "alluxio-master.marathon.mesos",
"ENV ALLUXIO_WORKER_MEMORY_SIZE": "2GB",
"JAVA": "/opt/jdk/bin/java"
},
"healthChecks": [
{
"protocol": "TCP",
"portIndex": 0,
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"timeoutSeconds": 20,
"maxConsecutiveFailures": 3,
"ignoreHttp1xx": false
}
],
"labels": {
"DCOS_SERVICE_SCHEME": "http",
"HAPROXY_GROUP": "internal",
"DCOS_SERVICE_NAME": "alluxio-worker",
"DCOS_SERVICE_PORT_INDEX": "0",
"HAPROXY_0_VHOST": "YOUR-internal-marathon-load-balancer.us-east-1.elb.amazonaws.com"
},
"portDefinitions": [
{
"port": 10104,
"protocol": "tcp",
"labels": {}
},
{
"port": 10103,
"protocol": "tcp",
"labels": {}
},
{
"port": 10105,
"protocol": "tcp",
"labels": {}
}
],
"requirePorts": true
}
@kyrozetera
Copy link

Make sure to include the label "HAPROXY_GROUP": "internal" in alluxio-master.json as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment