intel-device-plugins-for-ku.../cmd/fpga_plugin
Ed Bartosh 7310a98343 fix golint warnings
Fixed the following golint warnings:
./cmd/fpga_plugin/fpga_plugin.go:71:2: struct field fpgaId should be fpgaID
./cmd/fpga_plugin/fpga_plugin.go:78:44: func parameter fpgaId should be fpgaID
./cmd/fpga_plugin/fpga_plugin.go:104:8: var interfaceId should be interfaceID
./cmd/fpga_plugin/fpga_plugin.go:120:7: var interfaceIdFile should be interfaceIDFile
./cmd/fpga_plugin/fpga_plugin.go:156:8: range var fpgaId should be fpgaID
./cmd/fpga_plugin/fpga_plugin.go:254:6: range var fpgaId should be fpgaID
./cmd/fpga_plugin/fpga_plugin.go:254:14: should omit 2nd value from range; this loop is equivalent to `for fpgaId := range ...`
./internal/deviceplugin/deviceplugin.go:30:6: exported type DeviceInfo should have comment or be unexported
./internal/deviceplugin/deviceplugin.go:35:6: exported type Server should have comment or be unexported
./internal/deviceplugin/deviceplugin.go:39:1: exported method Server.Serve should have comment or be unexported
./internal/deviceplugin/deviceplugin.go:43:1: exported method Server.Stop should have comment or be unexported
2018-05-28 16:53:37 +03:00
..
fpga_plugin_test.go fpga: add prefix to FPGA resource name 2018-05-28 15:38:09 +03:00
fpga_plugin.go fix golint warnings 2018-05-28 16:53:37 +03:00
README.md Reworked README.md 2018-05-25 10:31:53 +03:00

Build and test Intel GPU Device Plugin for Kubernetes

Get source code

$ mkdir -p $GOPATH/src/github.com/intel/
$ cd $GOPATH/src/github.com/intel/
$ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git

Build FPGA device plugin

$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
$ make fpga_plugin

Make sure kubelet socket exists in /var/lib/kubelet/device-plugins/

$ ls /var/lib/kubelet/device-plugins/kubelet.sock
/var/lib/kubelet/device-plugins/kubelet.sock

Run FPGA device plugin in afu mode

Run FPGA device plugin as administrator
$ sudo $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode af
FPGA device plugin started in af mode
device-plugin start server at: /var/lib/kubelet/device-plugins/intel-fpga-f7df405cbd7acf7222f144b0b93acd18.sock
device-plugin registered
Check if FPGA device plugin is registered on master
$ kubectl describe node <node name> | grep intel.com/fpga
 intel.com/fpga-af-f7df405cbd7acf7222f144b0b93acd18:  1
 intel.com/fpga-af-f7df405cbd7acf7222f144b0b93acd18:  1

Run FPGA device plugin in region mode

Run FPGA device plugin as administrator
$ sudo $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode region
FPGA device plugin started in region mode
device-plugin start server at: /var/lib/kubelet/device-plugins/intel-fpga-ce48969398f05f33946d560708be108a.sock
device-plugin registered
Check if FPGA device plugin is registered on master
$ kubectl describe node <node name> | grep intel.com/fpga
 intel.com/fpga-region-ce48969398f05f33946d560708be108a:  1
 intel.com/fpga-region-ce48969398f05f33946d560708be108a:  1