Integration Guide
This guide explains how to integrate Calico networking and policy on an existing Mesos cluster. These instructions should be followed on each Agent.
Ensure you’ve met the prerequisites before continuing, namely that you have etcd running.
Calico runs as a Docker container on each host. The calicoctl command line tool can be used to launch the calico/node container.
-
Download the calicoctl binary:
sudo wget -O /usr/local/bin/calicoctl https://www.projectcalico.org/builds/calicoctl sudo chmod +x /usr/local/bin/calicoctl -
Launch
calico/node:sudo ETCD_ENDPOINTS=http://$ETCD_IP:$ETCD_PORT calicoctl node run --node-image=quay.io/calico/node:masterNote: Ensure you’ve set or replaced
$ETCD_IPand$ETCD_PORTto point to your etcd cluster.Check that
calico/nodeis now running:vagrant@calico-01:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 408bd2b9ba53 quay.io/calico/node:master "start_runit" 3 seconds ago Up 2 seconds calico-nodeFurthermore, check that the
calico/nodecontainer is functioning properly with the following command:sudo calicoctl node status -
Download the Calico CNI plugin to the
$NETWORK_CNI_PLUGINS_DIRyou configured for Mesos. You may skip this step if you do not plan on using the Unified Containerizer.curl -L -o $NETWORK_CNI_PLUGINS_DIR/calico \ https://github.com/projectcalico/cni-plugin/releases/download/v2.0.0/calico curl -L -o $NETWORK_CNI_PLUGINS_DIR/calico-ipam \ https://github.com/projectcalico/cni-plugin/releases/download/v2.0.0/calico-ipam chmod +x $NETWORK_CNI_PLUGINS_DIR/calico chmod +x $NETWORK_CNI_PLUGINS_DIR/calico-ipam -
Create a Calico CNI configuration in the
$NETWORK_CNI_CONF_DIRyou configured for Mesos, replacinghttp://master.mesos:2379with etcd’s address:cat > $NETWORK_CNI_CONF_DIR/calico.conf <<EOF { "name": "calico", "cniVersion": "0.1.0", "type": "calico", "ipam": { "type": "calico-ipam" }, "etcd_endpoints": "http://master.mesos:2379" } EOF
Next Steps
With Calico installed, you’re now ready to launch Calico-networked tasks. View the guides on using Calico with Mesos