Skip to content

Commit 832e4aa

Browse files
committed
crypto-perf: add kustomization and move to deployments
We plan to use crypto-perf for simple QAT testing. This commit adds kustomization to make the deployment easier. The original .yaml is also moved to deployments/ with some changes. For instance, it turns out also vfio-pci mode with DPDK needs CAP_SYS_ADMIN (See PR: #187 which states that only igb_uio would need it). kustomize is available part of kubectl since kubernetes v1.14. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
1 parent 1023504 commit 832e4aa

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

cmd/qat_plugin/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,20 @@ $ kubectl describe node <node name> | grep qat.intel.com/generic
105105
For a DPDK-based workload, you may need to add hugepage request and limit.
106106
107107
```
108-
$ kubectl create -f demo/crypto-perf-dpdk-pod-requesting-qat.yaml
108+
$ kubectl apply -k deployments/qat_dpdk_app/base/
109109
$ kubectl get pods
110110
NAME READY STATUS RESTARTS AGE
111-
dpdkqatuio 1/1 Running 0 27m
111+
qat-dpdk 1/1 Running 0 27m
112112
intel-qat-plugin-5zgvb 1/1 Running 0 3h
113113
114114
```
115115
116-
**Note**: If the `igb_uio` VF driver is used with the QAT device plugin,
117-
the workload be deployed with `SYS_ADMIN` capabilities added.
116+
**Note**: The deployment example above uses kustomize that is available in
117+
kubectl since kubernetes v1.14 release.
118118
119119
3. Manually execute the `dpdk-test-crypto-perf` application to review the logs:
120120
```
121-
$ kubectl exec -it dpdkqatuio bash
121+
$ kubectl exec -it qat-dpdk bash
122122

123123
$ ./dpdk-test-crypto-perf -l 6-7 -w $QAT1 -- --ptest throughput --\
124124
devtype crypto_qat --optype cipher-only --cipher-algo aes-cbc --cipher-op \

demo/screencast-qat-dpdk.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
out "This video demonstrates the Intel(R) QuickAssist Technology device Plugin for Kubernetes"
3636
out "Prerequisites:"
3737
out "* Intel(R) QuickAssist Technology (Intel(R) QAT) DH895xcc Chipset with SR-IOV enabled"
38-
out "* Kubernetes v1.12 cluster"
38+
out "* Kubernetes v1.14 cluster"
3939
out "* Data Plane Development Kit (DPDK) drivers configured"
4040
out "Let's get started!"
4141
}
@@ -80,10 +80,10 @@
8080
{
8181
clear
8282
out "7. View pod specification file for pod requesting QAT Virtual Functions:"
83-
command "cat crypto-perf-dpdk-pod-requesting-qat.yaml"
83+
command "kubectl apply --dry-run -o yaml -k ../deployments/qat_dpdk_app/base"
8484
sleep 5
8585
out "8. Create Pod requesting QAT Virtual Functions:"
86-
command "kubectl create -f crypto-perf-dpdk-pod-requesting-qat.yaml"
86+
command "kubectl apply -k ../deployments/qat_dpdk_app/base"
8787
sleep 2
8888
command "kubectl get pods"
8989
sleep 2
@@ -94,7 +94,7 @@
9494
out "9. Get a shell to the running container and run a DPDK application using QAT device"
9595
out "* \"export\": Lists environment variables - note QAT0, QAT1, QAT2... etc"
9696
out "* \"./dpdk-test-crypto-perf -l 6-7 -w \$QAT0 -- --ptest throughput --devtype crypto_qat --optype cipher-only --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --total-ops 10000000 --burst-sz 32 --buffer-sz 64\" : Manually executes the dpdk-test-crypto-perf application to review the logs"
97-
command "kubectl exec -it dpdkqatuio bash"
97+
command "kubectl exec -it qat-dpdk bash"
9898
sleep 10
9999
}
100100
if [ "$1" == 'play' ] ; then

demo/crypto-perf-dpdk-pod-requesting-qat.yaml renamed to deployments/qat_dpdk_app/base/crypto-perf-dpdk-pod-requesting-qat.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
kind: Pod
22
apiVersion: v1
33
metadata:
4-
name: dpdkqatuio
4+
name: qat-dpdk
55
spec:
66
containers:
7-
- name: dpdkcontainer
7+
- name: crypto-perf
88
image: crypto-perf:devel
99
imagePullPolicy: IfNotPresent
1010
command: [ "/bin/bash", "-c", "--" ]
@@ -17,16 +17,17 @@ spec:
1717
cpu: "3"
1818
memory: "128Mi"
1919
qat.intel.com/generic: '4'
20-
hugepages-2Mi: "1Gi"
20+
hugepages-2Mi: "128Mi"
2121
limits:
2222
cpu: "3"
2323
memory: "128Mi"
2424
qat.intel.com/generic: '4'
25-
hugepages-2Mi: "1Gi"
25+
hugepages-2Mi: "128Mi"
2626
securityContext:
2727
capabilities:
2828
add:
29-
["IPC_LOCK"]
29+
["IPC_LOCK", "SYS_ADMIN"]
30+
restartPolicy: Never
3031
volumes:
3132
- name: hugepage
3233
emptyDir:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- crypto-perf-dpdk-pod-requesting-qat.yaml

0 commit comments

Comments
 (0)