Reader small image

You're reading from  Apache Mesos Cookbook

Product typeBook
Published inAug 2017
PublisherPackt
ISBN-139781785884627
Edition1st Edition
Right arrow
Authors (2):
David Blomquist
David Blomquist
author image
David Blomquist

David Blomquist been working with computers since the 1980s. His first computer was an Apple Macintosh and the first networked computer he managed was a 10 terminal Xenix system. Since that time, David has held positions in virtually every area of IT, including operations, development, and architecture. David now specializes in designing Big Data, HPC, and Grid Computing systems with applications in Health Care and Science. Most recently, he has designed and deployed several large-scale clusters for the Federal Government.
Read more about David Blomquist

View More author details
Right arrow

Using container network interface


In this recipe, you will learn how to enable CNI, which is a common interface used by different container runtimes to provide network isolation and configuration for containers.

Getting ready

You need to have Mesos up and running. See the recipes of Chapter 1, Getting Started with Apache Mesos to get more information.

How to do it...

CNI is enabled by default in Mesos. All we need is to download the plugins we want to use and provide configuration. Create two directories; one for plugins and one for configuration:

mkdir -p /etc/mesos-slave/cni/plugins
mkdir -p /etc/mesos-slave/cni/config

Then download and un-compress the plugins:

wget https://github.com/containernetworking/cni/releases/download/v0.3.0/cni-v0.3.0.tgz
tar xvf cni-v0.3.0.tgz -C /etc/mesos-slave/cni/plugins

Write simple config that will create a bridged subnetwork with the IP range 172.16.28.0/24 and the ability to talk with external networks through NAT:

cat << EOF > /etc/mesos-slave/cni/config...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Apache Mesos Cookbook
Published in: Aug 2017Publisher: PacktISBN-13: 9781785884627

Authors (2)

author image
David Blomquist

David Blomquist been working with computers since the 1980s. His first computer was an Apple Macintosh and the first networked computer he managed was a 10 terminal Xenix system. Since that time, David has held positions in virtually every area of IT, including operations, development, and architecture. David now specializes in designing Big Data, HPC, and Grid Computing systems with applications in Health Care and Science. Most recently, he has designed and deployed several large-scale clusters for the Federal Government.
Read more about David Blomquist