vppagent

package module
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

README

VPP Agent

GitHub contributors Build Status Coverage Status Go Report Card GoDoc GitHub license

Please note that the content of this repository is currently WORK IN PROGRESS!

The VPP Agent is a Go implementation of a control/management plane for VPP based cloud-native Virtual Network Functions (VNFs). The VPP Agent is built on top of CN Infra, a framework for developing cloud-native VNFs (CNFs).

The VPP Agent can be used as-is as a management/control agent for VNFs based on off-the-shelf VPP (e.g. a VPP-based vswitch), or as a framework for developing management agents for VPP-based CNFs. An example of a custom VPP-based CNF is the Contiv-VPP vswitch.

Releases
Release Release Date Info
stable Release date latest release
latest Release date last release/pre-release

Have a look at the release notes for a complete list of changes.

Branches
Branch Last Commit Info
master GitHub last commit (branch) has moved to v2, introducing several breaking changes
dev GitHub last commit (branch) will be used for all the future development

Note: The branch pantheon-dev has been deprecated (v1).

Images
Image Image Size/Layers Info
ligato/vpp-agent MicroBadger Size MicroBadger Layers minimal image for production
ligato/dev-vpp-agent MicroBadger Size MicroBadger Layers image prepared for developers

The image tag latest is built from master branch and dev tag is built from dev branch.

Quickstart

For a quick start with the VPP Agent, you can use the pre-built Docker images on DockerHub that contain the VPP Agent and VPP: ligato/vpp-agent (or for ARM64: ligato/vpp-agent-arm64).

  1. Start ETCD (for image versions lower than 2.0, the Kafka is required as well) on your host (e.g. in Docker as described here). Note: for ARM64 see the information for kafka and for etcd.

  2. Run VPP + VPP Agent in a Docker container:

docker pull ligato/vpp-agent
docker run -it --rm --name vpp --privileged ligato/vpp-agent
  1. Manage VPP agent using agentctl:
docker exec -it vpp agentctl -h
  1. Check the configuration (using agentctl or directly using VPP console):
docker exec -it vpp agentctl -e 172.17.0.1:2379 show
docker exec -it vpp vppctl -s localhost:5002

Next Steps

See README of development docker image for more details.

Documentation

Detailed documentation for the VPP Agent can be found at ligato.io/vpp-agent.

Architecture

The VPP Agent is basically a set of VPP-specific plugins that use the CN-Infra framework to interact with other services/microservices in the cloud (e.g. a KV data store, messaging, log warehouse, etc.). The VPP Agent exposes VPP functionality to client apps via a higher-level model-driven API. Clients that consume this API may be either external (connecting to the VPP Agent via REST, gRPC API, Etcd or message bus transport), or local Apps and/or Extension plugins running on the same CN-Infra framework in the same Linux process.

The VNF Agent architecture is shown in the following figure:

vpp agent

Each (northbound) VPP API - L2, L3, ACL, ... - is implemented by a specific VNF Agent plugin, which translates northbound API calls/operations into (southbound) low level VPP Binary API calls. Northbound APIs are defined using protobufs, which allow for the same functionality to be accessible over multiple transport protocols (HTTP, gRPC, Etcd, ...). Plugins use the GoVPP library to interact with the VPP.

The following figure shows the VPP Agent in context of a cloud-native VNF, where the VNF's data plane is implemented using VPP/DPDK and its management/control planes are implemented using the VNF agent:

context

Plugins

The set of plugins in the VPP Agent is as follows:

  • VPP plugins - core plugins providing northbound APIs to default VPP functionality:
    • Interfaces - VPP network interfaces (e.g. DPDK, MEMIF, AF_Packet, VXLAN, Loopback..)
    • L2 - Bridge Domains, L2 cross-connects..
    • L3 - IP Routes, ARPs, ProxyARPs, VRFs..
    • ACL - VPP Access Lists (VPP ACL plugin)
  • Linux plugins (VETH) - allows optional configuration of Linux virtual ethernet interfaces
    • Interfaces - Linux network interfaces (e.g. VETH, TAP..)
    • L3 - IP Routes, ARPs
    • NS - Linux network namespaces
  • GoVPPmux - plugin wrapper around GoVPP. Multiplexes plugins' access to VPP on a single connection.
  • RESTAPI - provides API to retrieve actual state
  • KVScheduler - synchronizes the desired state described by northbound components with the actual state of the southbound.
Tools

The VPP agent repository also contains tools for building and troubleshooting of VNFs based on the VPP Agent:

  • agentctl - a CLI tool that shows the state of a set of VPP agents can configure the agents
  • vpp-agent-ctl - a utility for testing VNF Agent configuration. It contains a set of pre-defined configurations that can be sent to the VPP Agent either interactively or in a script.
  • docker - container-based development environment for the VPP agent and for app/extension plugins.

Contributing

If you are interested in contributing, please see the contribution guidelines.

Documentation

Overview

Package vppagent is the parent for vpp-specific packages used to build VPP Agent, a control/management plane for VPP-based cloud-native VNFs. VPP Agent is built on the cn-infra framework.

Directories

Path Synopsis
api
Package clientv2 provides clients for local and remote management of VPP and Linux configuration via VPP Agent plugins.
Package clientv2 provides clients for local and remote management of VPP and Linux configuration via VPP Agent plugins.
linux
Package linuxclient contains clients for local and remote management of both VPP and Linux configuration via Linux and default plugins.
Package linuxclient contains clients for local and remote management of both VPP and Linux configuration via Linux and default plugins.
linux/dbadapter
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP and Linux configuration.
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP and Linux configuration.
linux/localclient
Package localclient implements client for local management of VPP and Linux configuration.
Package localclient implements client for local management of VPP and Linux configuration.
linux/remoteclient
Package remoteclient implements client for remote management of VPP and Linux configuration.
Package remoteclient implements client for remote management of VPP and Linux configuration.
vpp
Package vppclient contains clients for local and remote management of VPP configuration via default plugins.
Package vppclient contains clients for local and remote management of VPP configuration via default plugins.
vpp/dbadapter
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using Data Broker (by writing to key value store).
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using Data Broker (by writing to key value store).
vpp/localclient
Package localclient implements client for local management of VPP configuration.
Package localclient implements client for local management of VPP configuration.
vpp/remoteclient
Package remoteclient implements the client for remote management of VPP configuration.
Package remoteclient implements the client for remote management of VPP configuration.
cmd
Package cmd is the parent of packages that are used to build various executables from VPP Agent sources.
Package cmd is the parent of packages that are used to build various executables from VPP Agent sources.
agentctl
Agentctl is a command-line tool for monitoring and configuring VPP Agents.
Agentctl is a command-line tool for monitoring and configuring VPP Agents.
agentctl/cmd
Package cmd implements a command line interface (CLI) for agentctl tool.
Package cmd implements a command line interface (CLI) for agentctl tool.
agentctl/impl
Package impl implements handlers for agentctl commands.
Package impl implements handlers for agentctl commands.
agentctl/testing
Package testing contains agentctl unit tests.
Package testing contains agentctl unit tests.
agentctl/testing/then
Package then contains methods for verification of agentctl unit test outcomes.
Package then contains methods for verification of agentctl unit test outcomes.
agentctl/utils
Package utils provides utility functions used in agentctl commands.
Package utils provides utility functions used in agentctl commands.
vpp-agent
Package vpp-agent implements the main entry point into the VPP Agent and it is used to build the VPP Agent executable.
Package vpp-agent implements the main entry point into the VPP Agent and it is used to build the VPP Agent executable.
Package examples contains several examples that illustrate various aspects of VPP Agent's functionality.
Package examples contains several examples that illustrate various aspects of VPP Agent's functionality.
govpp_call
Example govpp_call shows how to use govpp library to communicate with VPP over the binary API.
Example govpp_call shows how to use govpp library to communicate with VPP over the binary API.
grpc_vpp/notifications
Example statistics app demonstrates usage of grpc to stream vpp statistics.
Example statistics app demonstrates usage of grpc to stream vpp statistics.
grpc_vpp/remote_client
Example remote_client demonstrates remote VPP config management via clientv1 using GPRC transport.
Example remote_client demonstrates remote VPP config management via clientv1 using GPRC transport.
localclient_linux/tap
Example localclient_linux demonstrates local Linux (linux-tap) and VPP (tap) config management via clientv1.
Example localclient_linux demonstrates local Linux (linux-tap) and VPP (tap) config management via clientv1.
localclient_linux/veth
Example localclient_linux demonstrates local Linux (veth) and VPP (af-packet) config management via clientv1.
Example localclient_linux demonstrates local Linux (veth) and VPP (af-packet) config management via clientv1.
localclient_vpp/nat
Example localclient_vpp_nat demonstrates NAT VPP configuration managed via clientv1.
Example localclient_vpp_nat demonstrates NAT VPP configuration managed via clientv1.
localclient_vpp/plugins
Example localclient_vpp_plugins demonstrates local VPP config management via clientv1.
Example localclient_vpp_plugins demonstrates local VPP config management via clientv1.
pkg
idxvpp
Package idxvpp extends NamedMapping from cn-infra to provide a map between VPP/Linux items with integer handles and northbound string-based identifiers (logical names).
Package idxvpp extends NamedMapping from cn-infra to provide a map between VPP/Linux items with integer handles and northbound string-based identifiers (logical names).
plugins
govppmux
Package govppmux implements the GoVPPMux plugin that allows multiple plugins to share a single connection to VPP.
Package govppmux implements the GoVPPMux plugin that allows multiple plugins to share a single connection to VPP.
linux/ifplugin/ifaceidx
Package ifaceidx implements name-to-index mapping for Linux interfaces.
Package ifaceidx implements name-to-index mapping for Linux interfaces.
linux/ifplugin/linuxcalls
Package linuxcalls contains wrappers over Netlink APIs related to Linux VETH interfaces or Linux interfaces in general.
Package linuxcalls contains wrappers over Netlink APIs related to Linux VETH interfaces or Linux interfaces in general.
linux/nsplugin/linuxcalls
Package linuxcalls contains wrappers over Netlink & OS APIs related to Linux namespaces.
Package linuxcalls contains wrappers over Netlink & OS APIs related to Linux namespaces.
vpp/aclplugin/vppcalls
Package vppcalls contains wrappers over VPP ACL binary APIs and helpers to dump ACLs configured in VPP - per interface and total.
Package vppcalls contains wrappers over VPP ACL binary APIs and helpers to dump ACLs configured in VPP - per interface and total.
vpp/binapi
Package binapi defines southbound API of the default plugins.
Package binapi defines southbound API of the default plugins.
vpp/binapi/vpp1810/acl
Package acl is a generated from VPP binary API module 'acl'.
Package acl is a generated from VPP binary API module 'acl'.
vpp/binapi/vpp1810/af_packet
Package af_packet is a generated from VPP binary API module 'af_packet'.
Package af_packet is a generated from VPP binary API module 'af_packet'.
vpp/binapi/vpp1810/bfd
Package bfd is a generated from VPP binary API module 'bfd'.
Package bfd is a generated from VPP binary API module 'bfd'.
vpp/binapi/vpp1810/bond
Package bond is a generated from VPP binary API module 'bond'.
Package bond is a generated from VPP binary API module 'bond'.
vpp/binapi/vpp1810/dhcp
Package dhcp is a generated from VPP binary API module 'dhcp'.
Package dhcp is a generated from VPP binary API module 'dhcp'.
vpp/binapi/vpp1810/interfaces
Package interfaces is a generated from VPP binary API module 'interface'.
Package interfaces is a generated from VPP binary API module 'interface'.
vpp/binapi/vpp1810/ip
Package ip is a generated from VPP binary API module 'ip'.
Package ip is a generated from VPP binary API module 'ip'.
vpp/binapi/vpp1810/ipsec
Package ipsec is a generated from VPP binary API module 'ipsec'.
Package ipsec is a generated from VPP binary API module 'ipsec'.
vpp/binapi/vpp1810/l2
Package l2 is a generated from VPP binary API module 'l2'.
Package l2 is a generated from VPP binary API module 'l2'.
vpp/binapi/vpp1810/memclnt
Package memclnt is a generated from VPP binary API module 'memclnt'.
Package memclnt is a generated from VPP binary API module 'memclnt'.
vpp/binapi/vpp1810/memif
Package memif is a generated from VPP binary API module 'memif'.
Package memif is a generated from VPP binary API module 'memif'.
vpp/binapi/vpp1810/nat
Package nat is a generated from VPP binary API module 'nat'.
Package nat is a generated from VPP binary API module 'nat'.
vpp/binapi/vpp1810/punt
Package punt is a generated from VPP binary API module 'punt'.
Package punt is a generated from VPP binary API module 'punt'.
vpp/binapi/vpp1810/session
Package session is a generated from VPP binary API module 'session'.
Package session is a generated from VPP binary API module 'session'.
vpp/binapi/vpp1810/sr
Package sr is a generated from VPP binary API module 'sr'.
Package sr is a generated from VPP binary API module 'sr'.
vpp/binapi/vpp1810/stats
Package stats is a generated from VPP binary API module 'stats'.
Package stats is a generated from VPP binary API module 'stats'.
vpp/binapi/vpp1810/stn
Package stn is a generated from VPP binary API module 'stn'.
Package stn is a generated from VPP binary API module 'stn'.
vpp/binapi/vpp1810/tap
Package tap is a generated from VPP binary API module 'tap'.
Package tap is a generated from VPP binary API module 'tap'.
vpp/binapi/vpp1810/tapv2
Package tapv2 is a generated from VPP binary API module 'tapv2'.
Package tapv2 is a generated from VPP binary API module 'tapv2'.
vpp/binapi/vpp1810/vmxnet3
Package vmxnet3 is a generated from VPP binary API module 'vmxnet3'.
Package vmxnet3 is a generated from VPP binary API module 'vmxnet3'.
vpp/binapi/vpp1810/vpe
Package vpe is a generated from VPP binary API module 'vpe'.
Package vpe is a generated from VPP binary API module 'vpe'.
vpp/binapi/vpp1810/vxlan
Package vxlan is a generated from VPP binary API module 'vxlan'.
Package vxlan is a generated from VPP binary API module 'vxlan'.
vpp/binapi/vpp1901/acl
Package acl is a generated from VPP binary API module 'acl'.
Package acl is a generated from VPP binary API module 'acl'.
vpp/binapi/vpp1901/af_packet
Package af_packet is a generated from VPP binary API module 'af_packet'.
Package af_packet is a generated from VPP binary API module 'af_packet'.
vpp/binapi/vpp1901/bfd
Package bfd is a generated from VPP binary API module 'bfd'.
Package bfd is a generated from VPP binary API module 'bfd'.
vpp/binapi/vpp1901/bond
Package bond is a generated from VPP binary API module 'bond'.
Package bond is a generated from VPP binary API module 'bond'.
vpp/binapi/vpp1901/dhcp
Package dhcp is a generated from VPP binary API module 'dhcp'.
Package dhcp is a generated from VPP binary API module 'dhcp'.
vpp/binapi/vpp1901/interfaces
Package interfaces is a generated from VPP binary API module 'interface'.
Package interfaces is a generated from VPP binary API module 'interface'.
vpp/binapi/vpp1901/ip
Package ip is a generated from VPP binary API module 'ip'.
Package ip is a generated from VPP binary API module 'ip'.
vpp/binapi/vpp1901/ipsec
Package ipsec is a generated from VPP binary API module 'ipsec'.
Package ipsec is a generated from VPP binary API module 'ipsec'.
vpp/binapi/vpp1901/l2
Package l2 is a generated from VPP binary API module 'l2'.
Package l2 is a generated from VPP binary API module 'l2'.
vpp/binapi/vpp1901/memclnt
Package memclnt is a generated from VPP binary API module 'memclnt'.
Package memclnt is a generated from VPP binary API module 'memclnt'.
vpp/binapi/vpp1901/memif
Package memif is a generated from VPP binary API module 'memif'.
Package memif is a generated from VPP binary API module 'memif'.
vpp/binapi/vpp1901/nat
Package nat is a generated from VPP binary API module 'nat'.
Package nat is a generated from VPP binary API module 'nat'.
vpp/binapi/vpp1901/punt
Package punt is a generated from VPP binary API module 'punt'.
Package punt is a generated from VPP binary API module 'punt'.
vpp/binapi/vpp1901/session
Package session is a generated from VPP binary API module 'session'.
Package session is a generated from VPP binary API module 'session'.
vpp/binapi/vpp1901/sr
Package sr is a generated from VPP binary API module 'sr'.
Package sr is a generated from VPP binary API module 'sr'.
vpp/binapi/vpp1901/stn
Package stn is a generated from VPP binary API module 'stn'.
Package stn is a generated from VPP binary API module 'stn'.
vpp/binapi/vpp1901/tap
Package tap is a generated from VPP binary API module 'tap'.
Package tap is a generated from VPP binary API module 'tap'.
vpp/binapi/vpp1901/tapv2
Package tapv2 is a generated from VPP binary API module 'tapv2'.
Package tapv2 is a generated from VPP binary API module 'tapv2'.
vpp/binapi/vpp1901/vmxnet3
Package vmxnet3 is a generated from VPP binary API module 'vmxnet3'.
Package vmxnet3 is a generated from VPP binary API module 'vmxnet3'.
vpp/binapi/vpp1901/vpe
Package vpe is a generated from VPP binary API module 'vpe'.
Package vpe is a generated from VPP binary API module 'vpe'.
vpp/binapi/vpp1901/vxlan
Package vxlan is a generated from VPP binary API module 'vxlan'.
Package vxlan is a generated from VPP binary API module 'vxlan'.
vpp/ifplugin/ifaceidx
Package ifaceidx implements name-to-index mapping registry and cache for VPP interfaces.
Package ifaceidx implements name-to-index mapping registry and cache for VPP interfaces.
vpp/ifplugin/vppcalls/vpp1810
Package vppcalls contains wrappers over VPP binary APIs for all supported interface types and for dumping all interfaces configured in VPP.
Package vppcalls contains wrappers over VPP binary APIs for all supported interface types and for dumping all interfaces configured in VPP.
vpp/ifplugin/vppcalls/vpp1901
Package vppcalls contains wrappers over VPP binary APIs for all supported interface types and for dumping all interfaces configured in VPP.
Package vppcalls contains wrappers over VPP binary APIs for all supported interface types and for dumping all interfaces configured in VPP.
vpp/l2plugin/vppcalls/vpp1810
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
vpp/l2plugin/vppcalls/vpp1901
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
vpp/l3plugin/vppcalls/vpp1901
Package vppcalls contains wrappers over VPP binary APIs for ARPs, proxy ARPs, L3 FIBs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for ARPs, proxy ARPs, L3 FIBs and helpers for dumping them.
vpp/natplugin/vppcalls
Package vppcalls contains wrappers over VPP binary APIs for NAT configuration.
Package vppcalls contains wrappers over VPP binary APIs for NAT configuration.
vpp/srplugin/vppcalls/vpp1810
Package vpp1810 contains wrappers over VPP (version 18.10) binary APIs to simplify their usage
Package vpp1810 contains wrappers over VPP (version 18.10) binary APIs to simplify their usage
vpp/srplugin/vppcalls/vpp1901
Package vpp1901 contains wrappers over VPP (version 19.01) binary APIs to simplify their usage
Package vpp1901 contains wrappers over VPP (version 19.01) binary APIs to simplify their usage
tests

Jump to

Keyboard shortcuts

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