Installing Calico for the Docker Containerizer
This document provides the commands to download and run Calico for use with the Docker Containerizer in Mesos.
Calico networks Docker tasks for Mesos with its libnetwork plugin. In order to run the libnetwork plugin, the Docker daemon on each agent must be configured with a cluster store.
If using etcd as a cluster store, for example, run the Docker daemon with the following additional parameter:
<ETCD HOST>:<PORT> with the appropriate
for your etcd cluster.
Install and Run Calico
It is very easy to install Calico to use with the Docker Containerizer.
- On each Mesos Agents, download the
curl -o /usr/bin/calicoctl -L https://github.com/projectcalico/calico-containers/releases/download/v0.22.0/calicoctl chmod a+x calicoctl
- Launch the
For production deployments, we recommend running the two containers as services. Visit our guide on running Calico as a Service to learn how to do this.
For test environments that you would like to get up and running
quickly, you can launch the container with
sudo ETCD_AUTHORITY=<ETCD HOST:PORT> ./calicoctl node --libnetwork
Again, be sure to set the ETCD_AUTHORITY to the correct
IP/Hostname:Port for your etcd cluster.
- Ensure calico’s services are running by checking for two Calico containers in Docker:
$ docker ps CONTAINER ID NAMES IMAGE CREATED 19263eda1810 calico-libnetwork calico/node-libnetwork:v0.9.0 3 seconds f237fb21d357 calico-node calico/node:v0.22.0 3 seconds
- Enable Docker Containerizer in Mesos.
By default, Mesos enables on the “Mesos” Containerizer. Be sure to also enable the Docker Containerizer:
sh -c 'echo docker > /etc/mesos-slave/containerizers' systemctl restart mesos-slave.service
With Calico Installed, you’re now ready to launch Calico-networked tasks. See the Docker Containerizer Usage Guide for information.