Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Understanding Contrail with Mesos Architecture

From Contrail Release 5.1.x, Contrail overlay and non-overlay network virtualization features are also available in Apache Mesos environment. The features are available in the commercial version of Mesosphere DC/OS.

Contrail with Mesos Architecture Diagram

Contrail with Mesos Architecture Diagram

Setup information

Setup is performed in two parts:

Note:

You must update the inventory file and set the orchestrator as mesos.

Master nodes consists of:

Slave/Agent nodes consists of:

Components

The following components are a part of the architecture:

Contrail Controller

Contrail controller performs all the decision making. It includes config management, analytics, UI and control plane components for network virtualization. For further details, refer to https://github.com/Juniper/contrail-controller.

Contrail controller exposes APIs for creating configuration and updating virtual network components. In Mesos, mesos manager updates the task (universal docker) information to the Contrail controller via API server. All Contrail controller components are microservice docker containers.

Mesos Manager

Mesos manager consists of two sub modules:

  • VNC server.

  • Interaction with CNI and mesos agent.

Mesos Manager

Mesos manager application runs inside a docker on every slave node.

Mesos manager creates two networking by default: mesos-default-pod-task network and ip-fabric network.

All the pods and tasks are created in the mesos-default-pod-task network.

ip-fabric network is created in the respective domains of mesos-default and project-default.

CNI receives the task information and posts it to the Mesos manager. On receiving the task information, the Mesos manager creates the contrail-vnc objects.

Configuration information for the Mesos manager is present in contrail-mesos.conf file. The file is located at /etc/contrail/contrail-mesos.conf in the mesos manager docker.

Sample of contrail-mesos.conf file:

You can add the network to pod or task through annotation. You can set the network using labels.

Sample task/pod input json file:

Introspect for mesos-manager objects on the port 8109.

Contrail Container Network Interface (CNI)

The Container Network Interface (CNI) is located at /opt/mesosphere/active/cni/contrail-cni-plugin. It is a run to completion executable file.

The config file is located at /opt/mesosphere/etc/dcos/network/cni/contrail-cni-plugin.conf.

Sample contrail-cni-plugin.conf file:

Mesos agent invokes Contrail CNI when custom/host network provider is mentioned as contrail-cni-plugin in the task description.