Vagrant Deployed Mesos Cluster with Calico

This guide will show you how to use Vagrant to launch a Mesos Cluster with Calico installed and ready to network Docker Containerizer tasks.

1. Install Dependencies

This guide requires a host machine with:

  • VirtualBox to host the virtual machines.
  • Vagrant to install and configure the machines in Virtual Box.
  • Curl

1.2 Download the source files

mkdir demo; cd demo
curl -O http://docs.projectcalico.org/master/getting-started/mesos/vagrant/Vagrantfile
curl -O http://docs.projectcalico.org/master/getting-started/mesos/vagrant/calico.service
curl -O http://docs.projectcalico.org/master/getting-started/mesos/vagrant/marathon-lb.service
curl -O http://docs.projectcalico.org/master/getting-started/mesos/vagrant/mesos-dns.service

3. Startup

vagrant up

That’s it! Your Mesos Cluster is ready to use! Access it’s services at the following URLs:

Service URL
Mesos-Master UI http://172.24.197.101:5050
Marathon UI http://172.24.197.101:8080

Cluster Layout


.-----------------------------------------------------------------------------------.
| Machine Type | OS     | Hostname        | IP Address     | Services               |
|--------------|--------|-----------------|----------------|------------------------|
| Master       | Centos | calico-mesos-01 | 172.24.197.101 | mesos-master           |
|              |        |                 |                | etcd                   |
|              |        |                 |                | docker                 |
|              |        |                 |                | zookeeper              |
|              |        |                 |                | marathon               |
|              |        |                 |                | marathon load-balancer |
|              |        |                 |                | calico-node            |
|--------------|--------|-----------------|----------------|------------------------|
| Agents       | Centos | calico-mesos-02 | 172.24.197.102 | mesos-agent            |
|              |        | calico-mesos-03 | 172.24.197.103 | docker                 |
|              |        |                 |                | calico-node            |
'-----------------------------------------------------------------------------------'

4. SSH

To connect to your Vagrant boxes on OSX / Linux, see Vagrant’s SSH command. For Windows, see https://github.com/nickryand/vagrant-multi-putty.

5. Next Steps

With your cluster deployed, you can follow the tutorials on using Calico with Mesos.