Skip to content

Commit 4f28657

Browse files
author
Ubuntu
committed
fpga: fixed documentation and demo
1 parent 01b11d9 commit 4f28657

File tree

6 files changed

+80
-68
lines changed

6 files changed

+80
-68
lines changed

cmd/fpga_admissionwebhook/README.md

+20-10
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ You must install and set up the following FPGA plugin modules for correct operat
2121
$ cd $SRC
2222
$ make intel-fpga-admissionwebhook
2323
$ docker images
24-
REPOSITORY TAG IMAGE ID CREATED SIZE
25-
intel-fpga-admissionwebhook 10efe163a5091e8b2ceaa9baad236d3a41063c88 6c3bce0b8693 0 sec ago 25.2MB
26-
intel-fpga-admissionwebhook devel 6c3bce0b8693 0 sec ago 25.2MB
24+
REPOSITORY TAG IMAGE ID CREATED SIZE
25+
intel/intel-fpga-admissionwebhook 01b11d9d6d18bbe7df987a738efb20ae22ce795e eb8f95f87ee4 0 sec ago 81.9MB
26+
intel/intel-fpga-admissionwebhook devel eb8f95f87ee4 0 sec ago 81.9MB
2727
...
2828
```
2929

@@ -35,19 +35,29 @@ Run the `scripts/webhook-deploy.sh` script.
3535
$ cd $SRC
3636
$ ./scripts/webhook-deploy.sh
3737
Create secret including signed key/cert pair for the webhook
38-
Creating certs in /tmp/tmp.Ebb77GBKqm
38+
Creating certs in /tmp/tmp.XGTpddQBwP
3939
certificatesigningrequest.certificates.k8s.io/intel-fpga-webhook-svc.default created
40-
NAME AGE REQUESTOR CONDITION
41-
intel-fpga-webhook-svc.default 0s system:admin Pending
40+
NAME AGE REQUESTOR CONDITION
41+
intel-fpga-webhook-svc.default 0s kubernetes-admin Pending
4242
certificatesigningrequest.certificates.k8s.io/intel-fpga-webhook-svc.default approved
4343
secret/intel-fpga-webhook-certs created
44-
Removing /tmp/tmp.Ebb77GBKqm
44+
Removing /tmp/tmp.XGTpddQBwP
4545
Create FPGA CRDs
4646
customresourcedefinition.apiextensions.k8s.io/acceleratorfunctions.fpga.intel.com created
4747
customresourcedefinition.apiextensions.k8s.io/fpgaregions.fpga.intel.com created
48-
acceleratorfunction.fpga.intel.com/arria10-nlb0 created
49-
acceleratorfunction.fpga.intel.com/arria10-nlb3 created
50-
fpgaregion.fpga.intel.com/arria10 created
48+
fpgaregion.fpga.intel.com/arria10.dcp1.0 created
49+
acceleratorfunction.fpga.intel.com/arria10.dcp1.0-compress created
50+
acceleratorfunction.fpga.intel.com/arria10.dcp1.0-nlb0 created
51+
acceleratorfunction.fpga.intel.com/arria10.dcp1.0-nlb3 created
52+
fpgaregion.fpga.intel.com/arria10.dcp1.1 created
53+
acceleratorfunction.fpga.intel.com/arria10.dcp1.1-nlb0 created
54+
acceleratorfunction.fpga.intel.com/arria10.dcp1.1-nlb3 created
55+
fpgaregion.fpga.intel.com/arria10.dcp1.2 created
56+
acceleratorfunction.fpga.intel.com/arria10.dcp1.2-nlb0 created
57+
acceleratorfunction.fpga.intel.com/arria10.dcp1.2-nlb3 created
58+
fpgaregion.fpga.intel.com/d5005 created
59+
acceleratorfunction.fpga.intel.com/d5005-nlb0 created
60+
acceleratorfunction.fpga.intel.com/d5005-nlb3 created
5161
clusterrole.rbac.authorization.k8s.io/fpga-reader created
5262
clusterrolebinding.rbac.authorization.k8s.io/default-fpga-reader created
5363
Create webhook deployment

cmd/fpga_crihook/README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@ You must install and set up the following FPGA plugin modules for correct operat
1010

1111
### Get source code:
1212
```
13-
$ mkdir -p $GOPATH/src/github.com/intel/
14-
$ cd $GOPATH/src/github.com/intel/
15-
$ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git
13+
$ mkdir -p $GOPATH/src/github.com/intel/
14+
$ cd $GOPATH/src/github.com/intel/
15+
$ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git
1616
```
1717

1818
### Build CRI-O hook:
1919
```
20-
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
21-
$ make fpga_crihook
20+
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
21+
$ make intel-fpga-initcontainer
22+
$ docker images
23+
REPOSITORY TAG IMAGE ID CREATED SIZE
24+
intel/intel-fpga-initcontainer 01b11d9d6d18bbe7df987a738efb20ae22ce795e 2e7586fe0fa6 0 sec ago 57.6MB
25+
intel/intel-fpga-initcontainer devel 2e7586fe0fa6 0 sec ago 57.6MB
26+
...
2227
```
2328

2429
### Ensure that CRI-O is configured to allow OCI hooks

cmd/fpga_plugin/README.md

+33-33
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ You must install and set up the following FPGA plugin modules for correct operat
1111

1212
### Get source code:
1313
```
14-
$ mkdir -p $GOPATH/src/github.com/intel/
15-
$ cd $GOPATH/src/github.com/intel/
16-
$ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git
14+
$ mkdir -p $GOPATH/src/github.com/intel/
15+
$ cd $GOPATH/src/github.com/intel/
16+
$ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git
1717
```
1818

1919
### Build FPGA device plugin:
2020
```
21-
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
22-
$ make fpga_plugin
21+
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
22+
$ make fpga_plugin
2323
```
2424

2525
### Verify kubelet socket exists in /var/lib/kubelet/device-plugins/ directory:
2626
```
27-
$ ls /var/lib/kubelet/device-plugins/kubelet.sock
28-
/var/lib/kubelet/device-plugins/kubelet.sock
27+
$ ls /var/lib/kubelet/device-plugins/kubelet.sock
28+
/var/lib/kubelet/device-plugins/kubelet.sock
2929
```
3030

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

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

5757
2. Check if FPGA device plugin is registered on master:
5858
```
59-
$ kubectl describe node <node name> | grep fpga.intel.com
60-
fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
61-
fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
59+
$ kubectl describe node <node name> | grep fpga.intel.com
60+
fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
61+
fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
6262
```
6363

6464
#### Run FPGA device plugin in region mode
6565

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

7676
2. Check if FPGA device plugin is registered on master:
7777
```
78-
$ kubectl describe node <node name> | grep fpga.intel.com
79-
fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
80-
fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
78+
$ kubectl describe node <node name> | grep fpga.intel.com
79+
fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
80+
fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
8181
```
8282

8383
### Deploy FPGA device plugin as DaemonSet
8484

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

9494
2. Create the DaemonSet:
9595
```
96-
$ kubectl create -f deployments/fpga_plugin/fpga_plugin.yaml
97-
daemonset.apps/intel-fpga-plugin created
96+
$ kubectl create -f deployments/fpga_plugin/fpga_plugin.yaml
97+
daemonset.apps/intel-fpga-plugin created
9898
```
9999
100100
3. Build an image from sources:
101101
```
102-
$ make intel-fpga-plugin
102+
$ make intel-fpga-plugin
103103
```
104104
This image launches `fpga_plugin` in `af` mode by default.
105105
106106
You can override the mode on a per-node basis using this annotation:
107107
```
108-
$ kubectl annotate node mynode "fpga.intel.com/device-plugin-mode=region"
108+
$ kubectl annotate node mynode "fpga.intel.com/device-plugin-mode=region"
109109
```
110110
To use your own container image, modify the
111111
`deployments/fpga_plugin/fpga_plugin.yaml` file.

demo/opae-nlb-demo/test_fpga.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

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

88
green 'Running nlb3'
99
if nlb3; then

demo/readme.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,20 @@ Only one worker node has a GPU. The time difference in transcoding speed is capt
5353
## Intel® FPGA Device Plugin demo video
5454

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

6060
### Demo platform configuration
6161

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

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

8181
### Screencast
8282

8383
Intel® FPGA Device Plugin deployment
8484

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

8787
## Intel® QuickAssist Technology Device Plugin OpenSSL demo video
8888

demo/screencast.sh

+6-9
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ screen3()
7979
out "Build intel-fpga-admissionwebhook image:"
8080
command "cd intel-device-plugins-for-kubernetes; make intel-fpga-admissionwebhook" 15
8181
out "Import image from docker to CRI-O:"
82-
command "docker save intel-fpga-admissionwebhook:devel | sudo podman load"
82+
command "docker save intel/intel-fpga-admissionwebhook:devel | sudo podman load"
8383
cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
8484
out "Deploy the webhook:"
8585
command "cd scripts ; ./webhook-deploy.sh --namespace kube-system --mode orchestrated; cd ../"
@@ -96,14 +96,11 @@ screen4()
9696
out "Build intel-fpga-plugin image"
9797
command "make intel-fpga-plugin" 15
9898
out "Import image from docker to CRI-O:"
99-
command "docker save intel-fpga-plugin:devel | sudo podman load"
99+
command "docker save intel/intel-fpga-plugin:devel | sudo podman load"
100100
out "Build intel-fpga-initcontainer image"
101-
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
102-
out "We'll skip download part as it takes time and simply copy the tarball to the required location and build the image:" 15
103-
command "cp /srv/demo/a10_gx_pac_ias_1_1_pv_rte_installer.tar.gz deployments/fpga_plugin/" 15
104-
command "cd deployments/fpga_plugin/ ; ./build-initcontainer-image.sh" 15
101+
command "make intel-fpga-initcontainer" 15
105102
out "Import image from docker to CRI-O:"
106-
command "docker save intel-fpga-initcontainer:devel | sudo podman load"
103+
command "docker save intel/intel-fpga-initcontainer:devel | sudo podman load"
107104
out "Check that both images are imported:"
108105
command "sudo crictl images|grep 'intel-fpga-\(i\|p\)'"
109106
out "Create a service account for the plugin"
@@ -126,9 +123,9 @@ screen5()
126123
cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
127124
out "5. Run OPAE workload that uses NLB3 bitstream"
128125
out "Build opae-nlb-demo image:"
129-
command "cd demo; ./build-image.sh opae-nlb-demo ; cd ../" 15
126+
command "cd demo; ./build-image.sh intel/opae-nlb-demo ; cd ../" 15
130127
out "Import image from docker to CRI-O:"
131-
command "docker save opae-nlb-demo:devel | sudo podman load"
128+
command "docker save intel/opae-nlb-demo:devel | sudo podman load"
132129
out "Program bitstream that is not wanted by the workload:"
133130
command "sudo /opt/intel/fpga-sw/opae/fpgaconf-wrapper -s0 /srv/intel.com/fpga/9926ab6d6c925a68aabca7d84c545738/d8424dc4a4a3c413f89e433683f9040b.gbs"
134131
out "Check if device is programmed with it:"

0 commit comments

Comments
 (0)