This example runs Oinker-Go on Marathon on DC/OS Vagrant with Cassandra-Mesos and Marathon-LB.
-
Follow the dcos-vagrant setup steps to configure your installation.
-
Use vagrant to deploy a cluster with 1 (large) private agent node and 1 (small) public agent node (requires 8.5 GB free memory):
vagrant up m1 a1 p1 boot
-
Log into the DC/OS UI with a browser: http://m1.dcos/.
-
Install and configure the DC/OS CLI by following the instructions in the DC/OS UI.
-
Log into DC/OS with the DC/OS CLI:
dcos auth login
Follow the printed instructions to authenticate.
If you were previously logged into a different cluster, you may have to logout first.
-
Configure Cassandra with lower resource usage than default:
cat >/tmp/cassandra.json <<EOF { "service": { "cpus": 0.1, "mem": 512, "heap": 256 }, "executor": { "cpus": 0.1, "mem": 512, "heap": 256 }, "nodes": { "cpus": 0.5, "mem": 2048, "disk": 4096, "heap": { "size": 1024, "new": 100 }, "count": 1, "seeds": 1 }, "task": { "cpus": 0.1, "mem": 128 } } EOF
-
Install the cassandra package:
dcos package install --options=/tmp/cassandra.json cassandra --yes
-
Wait for the Cassandra service to be running and healthy. Check the DC/OS Services UI: http://m1.dcos/#/services/.
The Cassandra service should deploy 1 scheduler task and 1 cassandra node task on private DC/OS nodes. These can be seen on the service detail page. The service won't be marked as healthy or done deploying until both tasks are running and healthy.
For Mesosphere Enterprise DC/OS, follow the instructions to Install Marathon-LB on Mesosphere Enterprise DC/OS.
For open DC/OS, use the following steps to configure and install Marathon-LB:
-
Configure marathon-lb with lower memory usage than default:
cat >/tmp/marathon-lb.json <<EOF { "marathon-lb": { "mem": 256 } } EOF
-
Install the marathon-lb package:
dcos package install --options=/tmp/marathon-lb.json marathon-lb --yes
-
Wait for the Marathon-LB service to be running and healthy. Check the DC/OS Services UI: http://m1.dcos/#/services/.
The Marathon-LB service should deploy 1 task on the public DC/OS node. This can be seen on the service detail page.
-
Create the Oinker app:
dcos marathon app add examples/oinker/oinker.json
-
Wait for Marathon to deploy 3 app instances.
dcos marathon app show oinker | jq -r '"\(.tasksHealthy)/\(.tasksRunning)/\(.instances)"'
-
Visit the load-balanced endpoint in a browser: http://oinker.acme.org/