Giter Site home page Giter Site logo

clearcontainers / sriov Goto Github PK

View Code? Open in Web Editor NEW
30.0 7.0 13.0 16 KB

Simple standalone Docker Plugin implementation to demonstrate Clear Containers with SRIOV

License: Apache License 2.0

Go 100.00%
clear-containers sriov runc runc-containers standalone-docker-plugin docker nfv vfio

sriov's Introduction

DISCONTINUATION OF PROJECT

This project will no longer be maintained by Intel.

Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.

Intel no longer accepts patches to this project.

If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.

sriov

Simple standalone Docker Plugin implementation to demonstrate Clear Containers with SRIOV

For more details about Clear Containers https://github.com/clearcontainers https://clearlinux.org/clear-containers

This plugin supports Docker containers with runc or Clear Containers as the OCI runtime. The plugin is responsible for assigning a SRIOV Virtual Function (VF) into the container namespace.

In the case of runc containers, the VF is directly usable by the container.

In the case of clear containers, if clear containers detect a VF in the namespace, the runtime will unbind the VF from the host, bind it to VFIO and assign it to the clear container using PCI device pass thro. The clear container runtime which support SRIOV can be found at https://github.com/clearcontainers/runtime

How to use this plugin

  1. Build this plugin.

     go build
    
  2. Ensure that your plugin is discoverable https://docs.docker.com/engine/extend/plugin_api/#/plugin-discovery

     sudo cp sriov.json /etc/docker/plugins
    
  3. Start the plugin

     sudo ./sriov &
    
  4. Identify the network interface name of the SRIOV NIC Physical Function (PF) that is connected to the physical network of interest.

  5. Try plugin with Docker runc containers

     #Create a virtual network on physical network b2b with vlanid 100
     sudo docker network create -d sriov --internal --opt pf_iface=eth0 --opt vlanid=100 vfnet
    
     #Create container on the network vfnet
     sudo docker run --net=vfnet -itd busybox top
    
     #Check that your containers are running
     sudo docker ps
    
     #Cleanup
     sudo docker stop $(sudo docker ps -a -q)
     sudo docker rm $(sudo docker ps -a -q)
     sudo docker network rm vfnet
    
  6. Try plugin with Docker Clear containers For Clear Containers, the steps to create network and container are essentially the same. However, before we create Clear Container using SRIOV, host OS needs to boot with intel_iommu=on and have vfio-pci module loaded.

sriov's People

Contributors

amshinde avatar mcastelino avatar rdower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sriov's Issues

No VFs are available on the SR-IOv PF

OS:Centos7.6
kata-container:1.9.0-alpha1
Nic driver:i40e2.3.2-k
vf driver:i40evf3.2.2-k
After starting the sr-iov plugin and creating the sr-iov container network, restart the host. When the host starts up, I can see the sr-iov container network. Start the container after starting the sr-iov function of the network card, and system prints "No VFs are available on the sr-iov PF" in the message log.

It looks like

I was unable to find the package uuid. It looks like CIAO moved uuid to its own parent.

plugin.go:34:2: cannot find package "github.com/01org/ciao/ssntp/uuid" in any of:
/usr/lib/golang/src/github.com/01org/ciao/ssntp/uuid (from $GOROOT)
/root/gocode/src/github.com/01org/ciao/ssntp/uuid (from $GOPATH)

To fix this, I changed it to import "github.com/01org/ciao/uuid"

Then I was able to go get github.com/01org/ciao/uuid/

and it worked.

Move the mapping file setting into network options

Move the mapping file parameters into network options. Longer term we need to consider how to integrate with the cluster orchestrator to choose the network interface. We can look at how macvlan/ipvlan gets managed at a cluster level.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.