intel-device-plugins-for-ku.../cmd/fpga_plugin
Ed Bartosh 6a3953fc85 reformatted *.go with gofmt -s -w
This is done to fix https://goreportcard.com warnnigs:

gofmt 33%
Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin_test.go
Line 1: warning: file is not gofmted with -s (gofmt)

intel-device-plugins-for-kubernetes/internal/deviceplugin/deviceplugin_test.go
Line 1: warning: file is not gofmted with -s (gofmt)

intel-device-plugins-for-kubernetes/cmd/gpu_plugin/gpu_plugin_test.go
Line 1: warning: file is not gofmted with -s (gofmt)

intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin.go
Line 1: warning: file is not gofmted with -s (gofmt)
2018-05-28 16:59:19 +03:00
..
fpga_plugin_test.go reformatted *.go with gofmt -s -w 2018-05-28 16:59:19 +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