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 4 private agent nodes and 1 public agent node (requires 10GB free memory):
vagrant up m1 a1 a2 a3 a4 p1 boot
-
Wait for DC/OS to come up. Check the dashboard: http://m1.dcos/.
-
Install the DC/OS CLI by following the instructions on the DC/OS Dashboard
-
Configure Cassandra with lower memory usage than default:
cat >/tmp/cassandra.json <<EOF { "nodes": { "cpus": 0.5, "mem": 512, "disk": 4096, "heap": { "size": 1024, "new": 100 }, "count": 1, "seeds": 1 } } EOF
-
Install cassandra:
dcos package install --options=/tmp/cassandra.json cassandra --yes
-
Wait for the cassandra framework to deploy 3 executors and 3 servers (takes 5m+). Check the Mesos UI: http://m1.dcos/mesos.
Marathon-LB is in the Multiverse repo. So the Multiverse must be added to the DC/OS CLI config.
See the DC/OS CLI docs on how to add the multiverse repo.
-
Configure marathon-lb with lower memory usage than default:
cat >/tmp/marathon-lb.json <<EOF { "marathon-lb": { "mem": 256 } } EOF
-
Install marathon-lb:
dcos package install --options=/tmp/marathon-lb.json marathon-lb --yes
-
Wait for the marathon-lb framework to deploy 1 task. Check the Mesos UI: http://m1.dcos/mesos.
-
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/