vppagent

package module
v1.9.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

README

VPP Agent

Latest release 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 the CN-Infra platform for developing cloud-native VNFs.

The VPP Agent can be used as-is as a management/control agent for VNFs based on off-the-shelf VPP (for example, a VPP-based vswitch), or as a platform for developing customized VNFs with customized VPP-based data.

Architecture

The VPP Agent is basically a set of VPP-specific plugins that use the CN-Infra platform 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 platform 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:

  • Default VPP Plugins - plugins providing northbound APIs to "default" VPP functionality (i.e. VPP functions available "out-of-the-box"):
    • Interfaces - network interface configuration (PCI Ethernet, MEMIF, AF_Packet, VXLAN, Loopback...) + BFD
    • L2 - Bridge Domains, L2 cross-connects
    • L3 - IP Routes, VRFs...
    • ACL - VPP access lists (VPP ACL plugin)
  • GOVPPmux - plugin wrapper around GoVPP. Multiplexes plugins' access to VPP on a single connection.
  • Linux (VETH) - allows optional configuration of Linux virtual ethernet interfaces
  • CN-Infra datasync - data synchronization after HA events
  • CN-Infra core - lifecycle management of plugins (loading, initialization, unloading)
  • RESTAPI - allows to run VPP CLI commands and also provides API to expose existing Northbound objects

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.

Quickstart

For a quick start with the VPP Agent, you can use pre-built Docker images with the Agent and VPP on Dockerhub (or this for ARM64).

  1. Start ETCD and Kafka on your host (e.g. in Docker as described here). Note: The Agent in the pre-built Docker image will not start if it can't connect to both Etcd and Kafka.

    Note: For ARM64 see the information for kafka and for etcd.

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

docker pull ligato/vpp-agent
docker run -it --name vpp --rm ligato/vpp-agent
  1. Configure the 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

Documentation

GoDoc can be browsed online.

Next Steps

Read the README for the Development Docker Image for more details.

Deployment:

K8s integration

Design & architecture:

VPP agent 10.000 feet

Contribution:

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 platform.

Directories

Path Synopsis
Package clientv1 provides clients for local and remote management of VPP and Linux configuration via VPP Agent plugins.
Package clientv1 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/grpcadapter
Package grpcadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using GRPC client.
Package grpcadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using GRPC client.
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.
vpp-agent-ctl
package vpp-agent-ctl implements the vpp-agent-ctl test tool for testing VPP Agent plugins.
package vpp-agent-ctl implements the vpp-agent-ctl test tool for testing VPP Agent plugins.
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.
idx_bd_cache
Example idx_bd_cache demonstrates the use of "bridge-domain name-to-index cache" to watch for bridge-domain config changes across agents.
Example idx_bd_cache demonstrates the use of "bridge-domain name-to-index cache" to watch for bridge-domain config changes across agents.
idx_iface_cache
Example idx_iface_cache demonstrates the use of "interface name-to-index cache" to watch for VPP interface config changes across agents.
Example idx_iface_cache demonstrates the use of "interface name-to-index cache" to watch for VPP interface config changes across agents.
idx_mapping_lookup
Example idx_mapping_lookup shows how to use the name-to-index mapping registry to create a new mapping and how to add and lookup mapping items.
Example idx_mapping_lookup shows how to use the name-to-index mapping registry to create a new mapping and how to add and lookup mapping items.
idx_mapping_watcher
Example idx_mapping_watcher shows how to watch on changes done in name-to-index mapping registry.
Example idx_mapping_watcher shows how to watch on changes done in name-to-index mapping registry.
idx_veth_cache
Example idx_veth_cache demonstrates the use of the "VETH name-to-index cache" to watch Linux VETH interface config changes across agents.
Example idx_veth_cache demonstrates the use of the "VETH name-to-index cache" to watch Linux VETH interface config changes across agents.
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.
Package idxvpp implements name-to-index mapping used by VPP plugins to keep a map between VPP interface handles and northbound string-based identifiers.
Package idxvpp implements name-to-index mapping used by VPP plugins to keep a map between VPP interface handles and northbound string-based identifiers.
cacheutil
Package cacheutil is a base implementation of name-to-index cache on the top of which all typesafe caches are built.
Package cacheutil is a base implementation of name-to-index cache on the top of which all typesafe caches are built.
nametoidx
Package nametoidx is an in-memory implementation of the name-to-index mapping registry.
Package nametoidx is an in-memory implementation of the name-to-index mapping registry.
persist
Package persist asynchronously writes changes in the map (name->idx) to file.
Package persist asynchronously writes changes in the map (name->idx) to file.
controlplane Module
forwarder/api Module
k8s Module
k8s/pkg/apis Module
pkg Module
sdk Module
utils Module
nsm-nse module
Package plugins is the parent package for all vpp-agent plugins.
Package plugins is the parent package for all vpp-agent 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
Package linux implements the Linux plugin that handles management of Linux VETH interfaces.
Package linux implements the Linux plugin that handles management of Linux VETH interfaces.
linux/ifplugin/ifaceidx
Package ifaceidx implements name-to-index mapping registry and cache for Linux interfaces.
Package ifaceidx implements name-to-index mapping registry and cache 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/l3plugin/l3idx
Package l3idx implements name-to-index mapping registry and cache for Linux static arp entries and static routes.
Package l3idx implements name-to-index mapping registry and cache for Linux static arp entries and static routes.
linux/model
Package model defines the linuxplugin's northbound API.
Package model defines the linuxplugin's northbound API.
vpp
Package vpp is the parent package for all "default" VPP-related plugins.
Package vpp is the parent package for all "default" VPP-related plugins.
vpp/aclplugin
Package aclplugin implements the ACL Plugin that handles management of VPP Access lists.
Package aclplugin implements the ACL Plugin that handles management of VPP Access lists.
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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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
Package ifplugin implements the Interface plugin that handles management of VPP interfaces.
Package ifplugin implements the Interface plugin that handles management of VPP interfaces.
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
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/ipsecplugin
Package ipsecplugin implements the IPSec plugin that handles management of IPSec for VPP.
Package ipsecplugin implements the IPSec plugin that handles management of IPSec for VPP.
vpp/l2plugin
Package l2plugin implements the L2 plugin that handles Bridge Domains and L2 FIBs.
Package l2plugin implements the L2 plugin that handles Bridge Domains and L2 FIBs.
vpp/l2plugin/l2idx
Package l2idx implements name-to-index mapping registry and cache for bridge-domains.
Package l2idx implements name-to-index mapping registry and cache for bridge-domains.
vpp/l2plugin/vppcalls
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
Package l3plugin implements the L3 plugin that handles L3 FIBs.
Package l3plugin implements the L3 plugin that handles L3 FIBs.
vpp/l3plugin/vppcalls
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/l4plugin/nsidx
Package nsidx implements name-to-index mapping registry and cache for app namespaces
Package nsidx implements name-to-index mapping registry and cache for app namespaces
vpp/model
Package model defines the northbound API of the default plugins.
Package model defines the northbound API of the default plugins.
vpp/model/rpc
Package rpc is the parent for packages defining various GRPC services generated from protobuf data models.
Package rpc is the parent for packages defining various GRPC services generated from protobuf data models.
vpp/srplugin/cache
Package cache contains caches for certain modeled types.
Package cache contains caches for certain modeled types.
vpp/srplugin/vppcalls
Package vppcalls contains wrappers over VPP binary APIs to simplify their usage
Package vppcalls contains wrappers over VPP 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