netplugin

module
v0.0.0-09-18-2015.23-1... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2015 License: Apache-2.0

README

Build Status

Netplugin

Generic network plugin is designed to handle networking use cases in clustered multi-host systems. It is specifically designed to handle:

  • Multi-tenant environment where disjoint networks are offered to containers on the same host
  • SDN applications and interoperability with SDN solutions
  • Interoperability with non container environment and hand-off to a physical network
  • Instantiating policies/ACL/QoS associated with containers
  • Multicast or multi-destination dependent applications
  • Integration with existing IPAM tools for migrating customers
  • Handle NIC's capabilities for acceleration (SRIOV/Offload/etc.)

Getting Started

This will provide you with a minimal experience of uploading the intent and seeing the netplugin system act on it. It will create a network on your host that lives behind an OVS bridge and has its own unique interfaces.

Step 1: Clone the project:
$ git clone https://github.com/contiv/netplugin
$ cd netplugin; make build demo ssh
Step 2: Inside the VM, boot netmaster and netplugin
$ cd /opt/golang/src/github.com/contiv/netplugin
$ sudo bin/netmaster &
$ sudo bin/netplugin -host-label host1 &
Step 3: Upload your intent, which we take from the examples/ directory
$ netdcli -cfg examples/one_host_multiple_nets.json

Note: there are tons of examples of network intent in the examples/ directory. Try a few of them out!

Step 4: Run your containers and enjoy the networking!
$ docker run -itd --name=myContainer1 --hostname=myContainer1 ubuntu /bin/bash
$ docker run -itd --name=myContainer2 --hostname=myContainer2 ubuntu /bin/bash
$ docker exec -it myContainer1 /bin/bash
< inside the container >
$ ip addr
$ ping 11.1.0.2
Trying it out in a multi-host VLAN/VXLAN network

The docs/TwoHostMultiVlanDemo.md walks through setting up a multi host demo network and deploy the following Vlan based network.

Multi-tenant network

In the examples directory two_hosts_multiple_tenants.json and two_hosts_multiple_tenants_mix_vlan_vxlan.json shows the creation of a multi-tenant (disjoint, overlapping) networks within a cluster.

Building and Testing

Note: Vagrant 1.7.4 and VirtualBox 5.0+ are required to build and test netplugin.

High level make targets:

  • demo: start a VM (or multiple, set CONTIV_NODES to greater than 1) for development or testing.
  • build: build the binary in a VM and download it to the host.
  • unit-test: run the unit tests. Specify CONTIV_NODE_OS=centos to test on centos instead of ubuntu.
  • system-test: run the networking/"sanity" tests. Specify CONTIV_NODE_OS=centos to test on centos instead of ubuntu.
Kubernetes Integration

The plugin code contains the netplugin code that interfaces with kublet to allow network plumbing before a container is scheduled on one of the minions. Please see Kubernetes Integration for details

How to Contribute

Patches and contributions are welcome, please hit the GitHub page to open an issue or to submit patches send pull requests. Please sign your commits, and read CONTRIBUTING.md

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cenkalti/hub
Package hub provides a simple event dispatcher for publish/subscribe pattern.
Package hub provides a simple event dispatcher for publish/subscribe pattern.
_workspace/src/github.com/cenkalti/rpc2
Package rpc2 provides bi-directional RPC client and server similar to net/rpc.
Package rpc2 provides bi-directional RPC client and server similar to net/rpc.
_workspace/src/github.com/cenkalti/rpc2/jsonrpc
Package jsonrpc implements a JSON-RPC ClientCodec and ServerCodec for the rpc2 package.
Package jsonrpc implements a JSON-RPC ClientCodec and ServerCodec for the rpc2 package.
_workspace/src/github.com/contiv/ofnet
** Copyright 2014 Cisco Systems Inc.
** Copyright 2014 Cisco Systems Inc.
_workspace/src/github.com/contiv/ofnet/ofctrl
** Copyright 2014 Cisco Systems Inc.
** Copyright 2014 Cisco Systems Inc.
_workspace/src/github.com/contiv/ofnet/rpcHub
** Copyright 2014 Cisco Systems Inc.
** Copyright 2014 Cisco Systems Inc.
_workspace/src/github.com/docker/docker/pkg/listenbuffer
Package listenbuffer uses the kernel's listening backlog functionality to queue connections, allowing applications to start listening immediately and handle connections later.
Package listenbuffer uses the kernel's listening backlog functionality to queue connections, allowing applications to start listening immediately and handle connections later.
_workspace/src/github.com/docker/docker/pkg/parsers/kernel
Package kernel provides helper function to get, parse and compare kernel versions for different platforms.
Package kernel provides helper function to get, parse and compare kernel versions for different platforms.
_workspace/src/github.com/docker/docker/pkg/plugins
Package plugins provides structures and helper functions to manage Docker plugins.
Package plugins provides structures and helper functions to manage Docker plugins.
_workspace/src/github.com/docker/docker/pkg/proxy
Package proxy provides a network Proxy interface and implementations for TCP and UDP.
Package proxy provides a network Proxy interface and implementations for TCP and UDP.
_workspace/src/github.com/docker/docker/pkg/sockets
Package sockets provides helper functions to create and configure Unix or TCP sockets.
Package sockets provides helper functions to create and configure Unix or TCP sockets.
_workspace/src/github.com/docker/docker/pkg/stringid
Package stringid provides helper functions for dealing with string identifiers
Package stringid provides helper functions for dealing with string identifiers
_workspace/src/github.com/docker/docker/pkg/tlsconfig
Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers.
Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers.
_workspace/src/github.com/docker/docker/pkg/units
Package units provides helper function to parse and print size and time units in human-readable format.
Package units provides helper function to parse and print size and time units in human-readable format.
_workspace/src/github.com/docker/libnetwork
Package libnetwork provides the basic functionality and extension points to create network namespaces and allocate interfaces for containers to use.
Package libnetwork provides the basic functionality and extension points to create network namespaces and allocate interfaces for containers to use.
_workspace/src/github.com/docker/libnetwork/bitseq
Package bitseq provides a structure and utilities for representing long bitmask as sequence of run-lenght encoded blocks.
Package bitseq provides a structure and utilities for representing long bitmask as sequence of run-lenght encoded blocks.
_workspace/src/github.com/docker/libnetwork/drivers/remote/api
Package api represents all requests and responses suitable for conversation with a remote driver.
Package api represents all requests and responses suitable for conversation with a remote driver.
_workspace/src/github.com/docker/libnetwork/idm
Package idm manages reservation/release of numerical ids from a configured set of contiguous ids
Package idm manages reservation/release of numerical ids from a configured set of contiguous ids
_workspace/src/github.com/docker/libnetwork/ipallocator
Package ipallocator defines the default IP allocator.
Package ipallocator defines the default IP allocator.
_workspace/src/github.com/docker/libnetwork/ipam
Package ipam that specifies the contract the IPAM plugin need to satisfy, decoupling IPAM interface and implementation.
Package ipam that specifies the contract the IPAM plugin need to satisfy, decoupling IPAM interface and implementation.
_workspace/src/github.com/docker/libnetwork/options
Package options provides a way to pass unstructured sets of options to a component expecting a strongly-typed configuration structure.
Package options provides a way to pass unstructured sets of options to a component expecting a strongly-typed configuration structure.
_workspace/src/github.com/docker/libnetwork/resolvconf
Package resolvconf provides utility code to query and update DNS configuration in /etc/resolv.conf
Package resolvconf provides utility code to query and update DNS configuration in /etc/resolv.conf
_workspace/src/github.com/docker/libnetwork/types
Package types contains types that are common across libnetwork project
Package types contains types that are common across libnetwork project
_workspace/src/github.com/godbus/dbus
Package dbus implements bindings to the D-Bus message bus system.
Package dbus implements bindings to the D-Bus message bus system.
_workspace/src/github.com/godbus/dbus/introspect
Package introspect provides some utilities for dealing with the DBus introspection format.
Package introspect provides some utilities for dealing with the DBus introspection format.
_workspace/src/github.com/godbus/dbus/prop
Package prop provides the Properties struct which can be used to implement org.freedesktop.DBus.Properties.
Package prop provides the Properties struct which can be used to implement org.freedesktop.DBus.Properties.
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/hashicorp/go-msgpack/codec
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
_workspace/src/github.com/hashicorp/memberlist
memberlist is a library that manages cluster membership and member failure detection using a gossip based protocol.
memberlist is a library that manages cluster membership and member failure detection using a gossip based protocol.
_workspace/src/github.com/jainvipin/bitset
Package bitset implements bitsets, a mapping between non-negative integers and boolean values.
Package bitset implements bitsets, a mapping between non-negative integers and boolean values.
_workspace/src/github.com/vishvananda/netlink
Package netlink provides a simple library for netlink.
Package netlink provides a simple library for netlink.
_workspace/src/github.com/vishvananda/netlink/nl
Package nl has low level primitives for making Netlink calls.
Package nl has low level primitives for making Netlink calls.
_workspace/src/github.com/vishvananda/netns
Package netns allows ultra-simple network namespace handling.
Package netns allows ultra-simple network namespace handling.
_workspace/src/golang.org/x/crypto/ssh
Package ssh implements an SSH client and server.
Package ssh implements an SSH client and server.
_workspace/src/golang.org/x/crypto/ssh/agent
Package agent implements a client to an ssh-agent daemon.
Package agent implements a client to an ssh-agent daemon.
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
_workspace/src/golang.org/x/crypto/ssh/test
This package contains integration tests for the golang.org/x/crypto/ssh package.
This package contains integration tests for the golang.org/x/crypto/ssh package.
Package core provides definition for a generic interface that helps provision networking for an endpoint (like a container, a vm or a bare-metal host).
Package core provides definition for a generic interface that helps provision networking for an endpoint (like a container, a vm or a bare-metal host).
mgmtfn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL