cncf / cnf-testbed

ARCHIVED: 🧪🛏️Cloud-native Network Function (CNF) Testbed --> See LFN Cloud Native Telecom Initiative https://wiki.lfnetworking.org/pages/viewpage.action?pageId=113213592
https://wiki.lfnetworking.org/pages/viewpage.action?pageId=113213592
Apache License 2.0
164 stars 51 forks source link

Add SRIOV Network Device Plugin example to the CNF Testbed #286

Closed michaelspedersen closed 5 years ago

michaelspedersen commented 5 years ago

Goal: Add workload infrastructure and use-case example utilizing SRIOV Network Device Plugin

Deploying the plugin (workload infrastructure): For the example, only physical functions (PFs) will be utilized. To utilize virtual functions (VFs) on n2.xlarge instances provided by Packet, additional configuration of the Kubernetes worker node is needed:

During initial testing the plugin was successfully tested with VFs, so this can also be done after going through the above configuration steps

Prior to deploying the plugin the host vSwitch (VPP) deployed alongside K8s must be stopped. The PFs used by the plugin will be the same two that was used by the vSwitch.

Deploying the use-case The initial use-case will feature a single container, with one vfio-pci backed PF allocated to it. The container will be running VPP, and due to requirements for both hugepages and access to the vfio-pci kernel module, the container is running in privileged mode. Due to this limitation, the SRIOV Network Device Plugin can not be fully utilized. Under normal operation, the plugin will provide only the requested interfaces to the container, but due to the privileged operating mode all interfaces will be visible (and usable) in the container. To work around this limitation the VPP configuration will be updated based on the information pushed to the container (through an environment variable), and as such only the expected interface will be utilized.

More information about the spec will be added alongside the scripts once added to the CNF Testbed repo.

michaelspedersen commented 5 years ago

Changed from "Spec" project as the plugin by itself it more relevant as a use-case. Workload infrastructure and use-case code has been added already, so this ticket will be closed.

I expect some of the work can be reused in specifications going forward, e.g. DANM and Multus