Skip to content

Commit 8cb2a37

Browse files
authored
Merge pull request #62804 from orelmisan/dpdk_checkup_update
virt: Update DPDK checkup's documentation
2 parents fc6965f + f22cd3c commit 8cb2a37

File tree

2 files changed

+13
-84
lines changed

2 files changed

+13
-84
lines changed

modules/virt-checking-cluster-dpdk-readiness.adoc

Lines changed: 12 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,25 @@
66
[id="virt-checking-cluster-dpdk-readiness_{context}"]
77
= DPDK checkup
88

9-
Use a predefined checkup to verify that your {product-title} cluster node can run a virtual machine (VM) with a Data Plane Development Kit (DPDK) workload with zero packet loss. The DPDK checkup runs traffic between a traffic generator pod and a VM running a test DPDK application.
9+
Use a predefined checkup to verify that your {product-title} cluster node can run a virtual machine (VM) with a Data Plane Development Kit (DPDK) workload with zero packet loss. The DPDK checkup runs traffic between a traffic generator and a VM running a test DPDK application.
1010

1111
You run a DPDK checkup by performing the following steps:
1212

13-
. Create a service account, role, and role bindings for the DPDK checkup and a service account for the traffic generator pod.
14-
. Create a security context constraints resource for the traffic generator pod.
13+
. Create a service account, role, and role bindings for the DPDK checkup.
1514
. Create a config map to provide the input to run the checkup and to store the results.
1615
. Create a job to run the checkup.
1716
. Review the results in the config map.
1817
. Optional: To rerun the checkup, delete the existing config map and job and then create a new config map and job.
1918
. When you are finished, delete the DPDK checkup resources.
2019

2120
.Prerequisites
22-
* You have access to the cluster as a user with `cluster-admin` permissions.
2321
* You have installed the OpenShift CLI (`oc`).
24-
* You have configured the compute nodes to run DPDK applications on VMs with zero packet loss.
25-
26-
[IMPORTANT]
27-
====
28-
The traffic generator pod created by the checkup has elevated privileges:
29-
30-
* It runs as root.
31-
* It has a bind mount to the node's file system.
32-
33-
The container image of the traffic generator is pulled from the upstream Project Quay container registry.
34-
====
22+
* The cluster is configured to run DPDK applications.
23+
* The project is configured to run DPDK applications.
3524
3625
.Procedure
3726

38-
. Create a `ServiceAccount`, `Role`, and `RoleBinding` manifest for the DPDK checkup and the traffic generator pod:
27+
. Create a `ServiceAccount`, `Role`, and `RoleBinding` manifest for the DPDK checkup:
3928
+
4029
.Example service account, role, and rolebinding manifest file
4130
[%collapsible]
@@ -81,14 +70,8 @@ rules:
8170
resources: [ "virtualmachineinstances/console" ]
8271
verbs: [ "get" ]
8372
- apiGroups: [ "" ]
84-
resources: [ "pods" ]
85-
verbs: [ "create", "get", "delete" ]
86-
- apiGroups: [ "" ]
87-
resources: [ "pods/exec" ]
88-
verbs: [ "create" ]
89-
- apiGroups: [ "k8s.cni.cncf.io" ]
90-
resources: [ "network-attachment-definitions" ]
91-
verbs: [ "get" ]
73+
resources: [ "configmaps" ]
74+
verbs: [ "create", "delete" ]
9275
---
9376
apiVersion: rbac.authorization.k8s.io/v1
9477
kind: RoleBinding
@@ -101,11 +84,6 @@ roleRef:
10184
apiGroup: rbac.authorization.k8s.io
10285
kind: Role
10386
name: kubevirt-dpdk-checker
104-
---
105-
apiVersion: v1
106-
kind: ServiceAccount
107-
metadata:
108-
name: dpdk-checkup-traffic-gen-sa
10987
----
11088
====
11189
@@ -116,53 +94,6 @@ metadata:
11694
$ oc apply -n <target_namespace> -f <dpdk_sa_roles_rolebinding>.yaml
11795
----
11896
119-
. Create a `SecurityContextConstraints` manifest for the traffic generator pod:
120-
+
121-
.Example security context constraints manifest
122-
[source,yaml]
123-
----
124-
apiVersion: security.openshift.io/v1
125-
kind: SecurityContextConstraints
126-
metadata:
127-
name: dpdk-checkup-traffic-gen
128-
allowHostDirVolumePlugin: true
129-
allowHostIPC: false
130-
allowHostNetwork: false
131-
allowHostPID: false
132-
allowHostPorts: false
133-
allowPrivilegeEscalation: false
134-
allowPrivilegedContainer: false
135-
allowedCapabilities:
136-
- IPC_LOCK
137-
- NET_ADMIN
138-
- NET_RAW
139-
- SYS_RESOURCE
140-
defaultAddCapabilities: null
141-
fsGroup:
142-
type: RunAsAny
143-
groups: []
144-
readOnlyRootFilesystem: false
145-
requiredDropCapabilities: null
146-
runAsUser:
147-
type: RunAsAny
148-
seLinuxContext:
149-
type: RunAsAny
150-
seccompProfiles:
151-
- runtime/default
152-
- unconfined
153-
supplementalGroups:
154-
type: RunAsAny
155-
users:
156-
- system:serviceaccount:dpdk-checkup-ns:dpdk-checkup-traffic-gen-sa
157-
----
158-
159-
. Apply the `SecurityContextConstraints` manifest:
160-
+
161-
[source,terminal]
162-
----
163-
$ oc apply -f <dpdk_scc>.yaml
164-
----
165-
16697
. Create a `ConfigMap` manifest that contains the input parameters for the checkup:
16798
+
16899
.Example input config map
@@ -175,14 +106,12 @@ metadata:
175106
data:
176107
spec.timeout: 10m
177108
spec.param.networkAttachmentDefinitionName: <network_name> <1>
178-
spec.param.trafficGeneratorRuntimeClassName: <runtimeclass_name> <2>
179-
spec.param.trafficGeneratorImage: "quay.io/kiagnose/kubevirt-dpdk-checkup-traffic-gen:v0.1.1" <3>
180-
spec.param.vmContainerDiskImage: "quay.io/kiagnose/kubevirt-dpdk-checkup-vm:v0.1.1" <4>
109+
spec.param.trafficGeneratorImage: "quay.io/kiagnose/kubevirt-dpdk-checkup-traffic-gen:v0.1.1" <2>
110+
spec.param.vmContainerDiskImage: "quay.io/kiagnose/kubevirt-dpdk-checkup-vm:v0.1.1" <3>
181111
----
182112
<1> The name of the `NetworkAttachmentDefinition` object.
183-
<2> The `RuntimeClass` resource that the traffic generator pod uses.
184-
<3> The container image for the traffic generator. In this example, the image is pulled from the upstream Project Quay Container Registry.
185-
<4> The container disk image for the VM. In this example, the image is pulled from the upstream Project Quay Container Registry.
113+
<2> The container image for the traffic generator. In this example, the image is pulled from the upstream Project Quay Container Registry.
114+
<3> The container disk image for the VM. In this example, the image is pulled from the upstream Project Quay Container Registry.
186115
187116
. Apply the `ConfigMap` manifest in the target namespace:
188117
+
@@ -258,8 +187,7 @@ metadata:
258187
name: dpdk-checkup-config
259188
data:
260189
spec.timeout: 1h2m
261-
spec.param.NetworkAttachmentDefinitionName: "mlx-dpdk-network-1"
262-
spec.param.trafficGeneratorRuntimeClassName: performance-performance-zeus10
190+
spec.param.NetworkAttachmentDefinitionName: "dpdk-network-1"
263191
spec.param.trafficGeneratorImage: "quay.io/kiagnose/kubevirt-dpdk-checkup-traffic-gen:v0.1.1"
264192
spec.param.vmContainerDiskImage: "quay.io/kiagnose/kubevirt-dpdk-checkup-vm:v0.1.1"
265193
status.succeeded: true

virt/monitoring/virt-running-cluster-checkups.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ include::modules/virt-building-vm-containerdisk-image.adoc[leveloffset=+2]
2424
[role="_additional-resources"]
2525
[id="additional-resources_running-cluster-checkups"]
2626
== Additional resources
27+
* xref:../../virt/virtual_machines/vm_networking/virt-attaching-vm-to-sriov-network.adoc#virt-configuring-vm-project-dpdk_virt-attaching-vm-to-sriov-network[Configuring a project for DPDK workloads]
2728
* xref:../../virt/virtual_machines/vm_networking/virt-attaching-vm-multiple-networks.adoc#virt-attaching-vm-multiple-networks[Attaching a virtual machine to multiple networks]
2829
* xref:../../networking/hardware_networks/using-dpdk-and-rdma.adoc#example-vf-use-in-dpdk-mode-intel_using-dpdk-and-rdma[Using a virtual function in DPDK mode with an Intel NIC]
2930
* xref:../../networking/hardware_networks/using-dpdk-and-rdma.adoc#nw-example-dpdk-line-rate_using-dpdk-and-rdma[Using SR-IOV and the Node Tuning Operator to achieve a DPDK line rate]

0 commit comments

Comments
 (0)