Skip to content

release 0.15.0 #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ clean:

ORG?=intel
REG?=$(ORG)/
TAG?=0.15.0-rc.1
TAG?=0.15.0
export TAG

images = $(shell ls build/docker/*.Dockerfile | sed 's/.*\/\(.\+\)\.Dockerfile/\1/')
Expand Down
30 changes: 20 additions & 10 deletions cmd/fpga_admissionwebhook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ You must install and set up the following FPGA plugin modules for correct operat
$ cd $SRC
$ make intel-fpga-admissionwebhook
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
intel-fpga-admissionwebhook 10efe163a5091e8b2ceaa9baad236d3a41063c88 6c3bce0b8693 0 sec ago 25.2MB
intel-fpga-admissionwebhook devel 6c3bce0b8693 0 sec ago 25.2MB
REPOSITORY TAG IMAGE ID CREATED SIZE
intel/intel-fpga-admissionwebhook 01b11d9d6d18bbe7df987a738efb20ae22ce795e eb8f95f87ee4 0 sec ago 81.9MB
intel/intel-fpga-admissionwebhook devel eb8f95f87ee4 0 sec ago 81.9MB
...
```

Expand All @@ -35,19 +35,29 @@ Run the `scripts/webhook-deploy.sh` script.
$ cd $SRC
$ ./scripts/webhook-deploy.sh
Create secret including signed key/cert pair for the webhook
Creating certs in /tmp/tmp.Ebb77GBKqm
Creating certs in /tmp/tmp.XGTpddQBwP
certificatesigningrequest.certificates.k8s.io/intel-fpga-webhook-svc.default created
NAME AGE REQUESTOR CONDITION
intel-fpga-webhook-svc.default 0s system:admin Pending
NAME AGE REQUESTOR CONDITION
intel-fpga-webhook-svc.default 0s kubernetes-admin Pending
certificatesigningrequest.certificates.k8s.io/intel-fpga-webhook-svc.default approved
secret/intel-fpga-webhook-certs created
Removing /tmp/tmp.Ebb77GBKqm
Removing /tmp/tmp.XGTpddQBwP
Create FPGA CRDs
customresourcedefinition.apiextensions.k8s.io/acceleratorfunctions.fpga.intel.com created
customresourcedefinition.apiextensions.k8s.io/fpgaregions.fpga.intel.com created
acceleratorfunction.fpga.intel.com/arria10-nlb0 created
acceleratorfunction.fpga.intel.com/arria10-nlb3 created
fpgaregion.fpga.intel.com/arria10 created
fpgaregion.fpga.intel.com/arria10.dcp1.0 created
acceleratorfunction.fpga.intel.com/arria10.dcp1.0-compress created
acceleratorfunction.fpga.intel.com/arria10.dcp1.0-nlb0 created
acceleratorfunction.fpga.intel.com/arria10.dcp1.0-nlb3 created
fpgaregion.fpga.intel.com/arria10.dcp1.1 created
acceleratorfunction.fpga.intel.com/arria10.dcp1.1-nlb0 created
acceleratorfunction.fpga.intel.com/arria10.dcp1.1-nlb3 created
fpgaregion.fpga.intel.com/arria10.dcp1.2 created
acceleratorfunction.fpga.intel.com/arria10.dcp1.2-nlb0 created
acceleratorfunction.fpga.intel.com/arria10.dcp1.2-nlb3 created
fpgaregion.fpga.intel.com/d5005 created
acceleratorfunction.fpga.intel.com/d5005-nlb0 created
acceleratorfunction.fpga.intel.com/d5005-nlb3 created
clusterrole.rbac.authorization.k8s.io/fpga-reader created
clusterrolebinding.rbac.authorization.k8s.io/default-fpga-reader created
Create webhook deployment
Expand Down
15 changes: 10 additions & 5 deletions cmd/fpga_crihook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ You must install and set up the following FPGA plugin modules for correct operat

### 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
$ 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 CRI-O hook:
```
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
$ make fpga_crihook
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
$ make intel-fpga-initcontainer
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
intel/intel-fpga-initcontainer 01b11d9d6d18bbe7df987a738efb20ae22ce795e 2e7586fe0fa6 0 sec ago 57.6MB
intel/intel-fpga-initcontainer devel 2e7586fe0fa6 0 sec ago 57.6MB
...
```

### Ensure that CRI-O is configured to allow OCI hooks
Expand Down
66 changes: 33 additions & 33 deletions cmd/fpga_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ You must install and set up the following FPGA plugin modules for correct operat

### 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
$ 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
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
$ make fpga_plugin
```

### Verify kubelet socket exists in /var/lib/kubelet/device-plugins/ directory:
```
$ ls /var/lib/kubelet/device-plugins/kubelet.sock
/var/lib/kubelet/device-plugins/kubelet.sock
$ ls /var/lib/kubelet/device-plugins/kubelet.sock
/var/lib/kubelet/device-plugins/kubelet.sock
```

### Choose mode for FPGA device plugin
Expand All @@ -46,66 +46,66 @@ translated to resources of the same type.

1. Run FPGA device plugin as administrator:
```
$ export KUBE_CONF=/var/run/kubernetes/admin.kubeconfig # path to kubeconfig with admin's credentials
$ export NODE_NAME="<node name>" # if the node's name was overridden and differs from hostname
$ sudo -E $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode af -kubeconfig $KUBE_CONF
FPGA device plugin started in af mode
device-plugin start server at: /var/lib/kubelet/device-plugins/fpga.intel.com-af-f7df405cbd7acf7222f144b0b93acd18.sock
device-plugin registered
$ export KUBE_CONF=/var/run/kubernetes/admin.kubeconfig # path to kubeconfig with admin's credentials
$ export NODE_NAME="<node name>" # if the node's name was overridden and differs from hostname
$ sudo -E $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode af -kubeconfig $KUBE_CONF
FPGA device plugin started in af mode
device-plugin start server at: /var/lib/kubelet/device-plugins/fpga.intel.com-af-f7df405cbd7acf7222f144b0b93acd18.sock
device-plugin registered
```

2. Check if FPGA device plugin is registered on master:
```
$ kubectl describe node <node name> | grep fpga.intel.com
fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
$ kubectl describe node <node name> | grep fpga.intel.com
fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
```

#### Run FPGA device plugin in region mode

1. Run FPGA device plugin as administrator:
```
$ export KUBE_CONF=/var/run/kubernetes/admin.kubeconfig # path to kubeconfig with admin's credentials
$ export NODE_NAME="<node name>" # if the node's name was overridden and differs from hostname
$ sudo -E $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode region -kubeconfig $KUBE_CONF
FPGA device plugin started in region mode
device-plugin start server at: /var/lib/kubelet/device-plugins/fpga.intel.com-region-ce48969398f05f33946d560708be108a.sock
device-plugin registered
$ export KUBE_CONF=/var/run/kubernetes/admin.kubeconfig # path to kubeconfig with admin's credentials
$ export NODE_NAME="<node name>" # if the node's name was overridden and differs from hostname
$ sudo -E $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode region -kubeconfig $KUBE_CONF
FPGA device plugin started in region mode
device-plugin start server at: /var/lib/kubelet/device-plugins/fpga.intel.com-region-ce48969398f05f33946d560708be108a.sock
device-plugin registered
```

2. Check if FPGA device plugin is registered on master:
```
$ kubectl describe node <node name> | grep fpga.intel.com
fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
$ kubectl describe node <node name> | grep fpga.intel.com
fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
```

### Deploy FPGA device plugin as DaemonSet

1. To deploy the plugin in a production cluster, create a service account
for the plugin:
```
$ kubectl create -f deployments/fpga_plugin/fpga_plugin_service_account.yaml
serviceaccount/intel-fpga-plugin-controller created
clusterrole.rbac.authorization.k8s.io/node-getter created
clusterrolebinding.rbac.authorization.k8s.io/get-nodes created
$ kubectl create -f deployments/fpga_plugin/fpga_plugin_service_account.yaml
serviceaccount/intel-fpga-plugin-controller created
clusterrole.rbac.authorization.k8s.io/node-getter created
clusterrolebinding.rbac.authorization.k8s.io/get-nodes created
```

2. Create the DaemonSet:
```
$ kubectl create -f deployments/fpga_plugin/fpga_plugin.yaml
daemonset.apps/intel-fpga-plugin created
$ kubectl create -f deployments/fpga_plugin/fpga_plugin.yaml
daemonset.apps/intel-fpga-plugin created
```

3. Build an image from sources:
```
$ make intel-fpga-plugin
$ make intel-fpga-plugin
```
This image launches `fpga_plugin` in `af` mode by default.

You can override the mode on a per-node basis using this annotation:
```
$ kubectl annotate node mynode "fpga.intel.com/device-plugin-mode=region"
$ kubectl annotate node mynode "fpga.intel.com/device-plugin-mode=region"
```
To use your own container image, modify the
`deployments/fpga_plugin/fpga_plugin.yaml` file.
Expand Down
2 changes: 1 addition & 1 deletion demo/intelfpga-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
restartPolicy: Never
containers:
- name: intelfpga-demo-job-1
image: intel/opae-nlb-demo:0.15.0-rc.1
image: intel/opae-nlb-demo:0.15.0
imagePullPolicy: IfNotPresent
securityContext:
capabilities:
Expand Down
4 changes: 2 additions & 2 deletions demo/opae-nlb-demo/test_fpga.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# Test FPGA by running 2 OPAE samples: nlb3 and nlb0
# nlb3 is expected to succeed, nlb0 - to fail
green () { echo "\033[0;32m$1\033[0m";}
red () { echo "\033[0;31m$1\033[0m";}
green () { echo -e "\033[0;32m$1\033[0m";}
red () { echo -e "\033[0;31m$1\033[0m";}

green 'Running nlb3'
if nlb3; then
Expand Down
18 changes: 9 additions & 9 deletions demo/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@ Only one worker node has a GPU. The time difference in transcoding speed is capt
## Intel® FPGA Device Plugin demo video

The screencast demonstrates the deployment of the Intel® FPGA Device Plugin for
Kubernetes and executes a sample GZIP compression workload. The demo begins
Kubernetes and executes a native loopback 3 (NLB3) workload. The demo begins
with a fully [configured Kubernetes cluster](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/)
with the [Go runtime](https://golang.org/doc/install).

### Demo platform configuration

- Hardware
- 1-node, 2x Intel® Xeon® E5-2680 CPU @ 2.4 GHz
- Total memory 251 GB
- 1-node, 2x Intel@ Xeon@ Gold 6140M CPU @ 2.30GHz
- Total memory 377 GB
- Intel® Arria® 10 GX FPGA
- Software
- OpenSUSE* 15 (Kernel: 4.18.9-200.fc28.x86_64)
- Kubernetes* 1.11
- CRI-O 1.11.1
- Ubuntu 18.04.2 LTS (Kernel: 4.15.0-60-generic)
- Kubernetes* 1.13
- CRI-O 1.13.1
- Intel® FPGA Device Plugin built from master branch

### Demo steps
Expand All @@ -75,14 +75,14 @@ with the [Go runtime](https://golang.org/doc/install).
2. Clone the [Intel Device Plugins for Kubernetes source](https://github.com/intel/intel-device-plugins-for-kubernetes).
3. Provision the [admission controller webhook](https://github.com/intel/intel-device-plugins-for-kubernetes/blob/master/cmd/fpga_admissionwebhook/README.md).
4. Provision the [Intel® FPGA Device Plugin](https://github.com/intel/intel-device-plugins-for-kubernetes/blob/master/cmd/fpga_plugin/README.md).
5. Create bitstream storage for the Intel® FPGA.
6. Run the sample GZIP compression workload.
5. Build the opae-nlb-demo image
6. Run the NLB3 workload.

### Screencast

Intel® FPGA Device Plugin deployment

[![Intel® FPGA Device Plugin deployment](https://asciinema.org/a/mRn15bkRRUzTG4kp2UeHQX6gk.png)](https://asciinema.org/a/mRn15bkRRUzTG4kp2UeHQX6gk)
[![Intel® FPGA Device Plugin deployment](https://asciinema.org/a/7FK8WDwyoL5g1T5HOa2vekKU2.png)](https://asciinema.org/a/7FK8WDwyoL5g1T5HOa2vekKU2)

## Intel® QuickAssist Technology Device Plugin OpenSSL demo video

Expand Down
15 changes: 6 additions & 9 deletions demo/screencast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ screen3()
out "Build intel-fpga-admissionwebhook image:"
command "cd intel-device-plugins-for-kubernetes; make intel-fpga-admissionwebhook" 15
out "Import image from docker to CRI-O:"
command "docker save intel-fpga-admissionwebhook:devel | sudo podman load"
command "docker save intel/intel-fpga-admissionwebhook:devel | sudo podman load"
cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
out "Deploy the webhook:"
command "cd scripts ; ./webhook-deploy.sh --namespace kube-system --mode orchestrated; cd ../"
Expand All @@ -96,14 +96,11 @@ screen4()
out "Build intel-fpga-plugin image"
command "make intel-fpga-plugin" 15
out "Import image from docker to CRI-O:"
command "docker save intel-fpga-plugin:devel | sudo podman load"
command "docker save intel/intel-fpga-plugin:devel | sudo podman load"
out "Build intel-fpga-initcontainer image"
out "NOTE! This image requires 'Acceleration Stack for Runtime' tarball from https://www.intel.com/content/www/us/en/programmable/solutions/acceleration-hub/downloads.html" 15
out "We'll skip download part as it takes time and simply copy the tarball to the required location and build the image:" 15
command "cp /srv/demo/a10_gx_pac_ias_1_1_pv_rte_installer.tar.gz deployments/fpga_plugin/" 15
command "cd deployments/fpga_plugin/ ; ./build-initcontainer-image.sh" 15
command "make intel-fpga-initcontainer" 15
out "Import image from docker to CRI-O:"
command "docker save intel-fpga-initcontainer:devel | sudo podman load"
command "docker save intel/intel-fpga-initcontainer:devel | sudo podman load"
out "Check that both images are imported:"
command "sudo crictl images|grep 'intel-fpga-\(i\|p\)'"
out "Create a service account for the plugin"
Expand All @@ -126,9 +123,9 @@ screen5()
cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
out "5. Run OPAE workload that uses NLB3 bitstream"
out "Build opae-nlb-demo image:"
command "cd demo; ./build-image.sh opae-nlb-demo ; cd ../" 15
command "cd demo; ./build-image.sh intel/opae-nlb-demo ; cd ../" 15
out "Import image from docker to CRI-O:"
command "docker save opae-nlb-demo:devel | sudo podman load"
command "docker save intel/opae-nlb-demo:devel | sudo podman load"
out "Program bitstream that is not wanted by the workload:"
command "sudo /opt/intel/fpga-sw/opae/fpgaconf-wrapper -s0 /srv/intel.com/fpga/9926ab6d6c925a68aabca7d84c545738/d8424dc4a4a3c413f89e433683f9040b.gbs"
out "Check if device is programmed with it:"
Expand Down
2 changes: 1 addition & 1 deletion demo/test-fpga-region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
containers:
- name: test-container
image: intel/opae-nlb-demo:0.15.0-rc.1
image: intel/opae-nlb-demo:0.15.0
imagePullPolicy: IfNotPresent
securityContext:
capabilities:
Expand Down
2 changes: 1 addition & 1 deletion deployments/fpga_admissionwebhook/deployment-tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: fpga-mutator
image: intel/intel-fpga-admissionwebhook:0.15.0-rc.1
image: intel/intel-fpga-admissionwebhook:0.15.0
imagePullPolicy: IfNotPresent
securityContext:
readOnlyRootFilesystem: true
Expand Down
4 changes: 2 additions & 2 deletions deployments/fpga_plugin/fpga_plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
serviceAccountName: intel-fpga-plugin-controller
initContainers:
- name: intel-fpga-initcontainer
image: intel/intel-fpga-initcontainer:0.15.0-rc.1
image: intel/intel-fpga-initcontainer:0.15.0
imagePullPolicy: IfNotPresent
securityContext:
readOnlyRootFilesystem: true
Expand All @@ -33,7 +33,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: intel/intel-fpga-plugin:0.15.0-rc.1
image: intel/intel-fpga-plugin:0.15.0
imagePullPolicy: IfNotPresent
securityContext:
readOnlyRootFilesystem: true
Expand Down
2 changes: 1 addition & 1 deletion deployments/gpu_plugin/gpu_plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: intel/intel-gpu-plugin:0.15.0-rc.1
image: intel/intel-gpu-plugin:0.15.0
imagePullPolicy: IfNotPresent
securityContext:
readOnlyRootFilesystem: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
containers:
- name: crypto-perf
image: intel/crypto-perf:0.15.0-rc.1
image: intel/crypto-perf:0.15.0
imagePullPolicy: IfNotPresent
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 300000; done;" ]
Expand Down
2 changes: 1 addition & 1 deletion deployments/qat_plugin/qat_plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: intel-qat-plugin
image: intel/intel-qat-plugin:0.15.0-rc.1
image: intel/intel-qat-plugin:0.15.0
securityContext:
readOnlyRootFilesystem: true
env:
Expand Down
2 changes: 1 addition & 1 deletion deployments/qat_plugin/qat_plugin_kernel_mode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
securityContext:
readOnlyRootFilesystem: true
privileged: true
image: intel/intel-qat-plugin:0.15.0-rc.1
image: intel/intel-qat-plugin:0.15.0
imagePullPolicy: IfNotPresent
args: ["-mode", "kernel"]
volumeMounts:
Expand Down