contiv-cni

command
v1.4.2-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

README

Contiv CNI Plugin

This plugin forwards the CNI requests to the gRPC server specified in the CNI config file. The response from gRPC server is then processed back into the standard output of the CNI plugin.

To run the plugin for testing purposes, create the CNI config file /etc/cni/net.d/10-contiv-cni.conf:

{
	"cniVersion": "0.3.1",
	"type": "contiv-cni",
	"grpcServer": "localhost:9111"
}

Given that the contiv-cni binary exists in the folder $GOPATH/src/github.com/contiv/contiv-vpp/cmd/contiv-cni:

Set CNI_PATH environment variable:

CNI_PATH=$GOPATH/src/github.com/contiv/contiv-vpp/cmd/contiv-cni

Enter the folder with CNI scripts and execute the following:

cd vendor/github.com/containernetworking/cni/scripts
sudo CNI_PATH=$CNI_PATH ./priv-net-run.sh ifconfig

Expected output in case that the configured gRPC CNI service is running:

eth0      Link encap:Ethernet  HWaddr a6:2d:de:17:27:00
          inet addr:10.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::a42d:deff:fe17:2700/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:90 (90.0 B)  TX bytes:90 (90.0 B)

Documentation

Overview

Copyright (c) 2017 Cisco and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contiv-cni is a CNI plugin (binary) that forwards the CNI requests to the gRPC server specified in the CNI config file. The response from gRPC server is then processed back into the standard output of the CNI plugin. This plugin implements the CNI specification version 0.3.1 (https://github.com/containernetworking/cni/blob/spec-v0.3.1/SPEC.md).

Jump to

Keyboard shortcuts

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