mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
106 lines
2.3 KiB
Plaintext
106 lines
2.3 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * hardware_accelerators/rdma-remote-direct-memory-access.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="rdma-creating-shared-device-rdma-ib_{context}"]
|
|
|
|
= Creating a shared device RDMA on Infiniband
|
|
|
|
Create the workload pods for a shared device Remote Direct Memory Access (RDMA) for an Infiniband installation.
|
|
|
|
.Procedure
|
|
|
|
. Generate custom pod resources:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
$ cat <<EOF > rdma-ib-32-workload.yaml
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: rdma-ib-32-workload
|
|
namespace: default
|
|
annotations:
|
|
k8s.v1.cni.cncf.io/networks: example-ipoibnetwork
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: nvd-srv-32.nvidia.eng.rdu2.dc.redhat.com
|
|
containers:
|
|
- image: quay.io/edge-infrastructure/nvidia-tools:0.1.5
|
|
name: rdma-ib-32-workload
|
|
resources:
|
|
limits:
|
|
nvidia.com/gpu: 1
|
|
rdma/rdma_shared_device_ib: 1
|
|
requests:
|
|
nvidia.com/gpu: 1
|
|
rdma/rdma_shared_device_ib: 1
|
|
EOF
|
|
|
|
$ cat <<EOF > rdma-ib-32-workload.yaml
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: rdma-ib-33-workload
|
|
namespace: default
|
|
annotations:
|
|
k8s.v1.cni.cncf.io/networks: example-ipoibnetwork
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: nvd-srv-33.nvidia.eng.rdu2.dc.redhat.com
|
|
containers:
|
|
- image: quay.io/edge-infrastructure/nvidia-tools:0.1.5
|
|
name: rdma-ib-33-workload
|
|
securityContext:
|
|
capabilities:
|
|
add: [ "IPC_LOCK" ]
|
|
resources:
|
|
limits:
|
|
nvidia.com/gpu: 1
|
|
rdma/rdma_shared_device_ib: 1
|
|
requests:
|
|
nvidia.com/gpu: 1
|
|
rdma/rdma_shared_device_ib: 1
|
|
EOF
|
|
----
|
|
|
|
. Create the pods on the cluster by using the following commands:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f rdma-ib-32-workload.yaml
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
pod/rdma-ib-32-workload created
|
|
----
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f rdma-ib-33-workload.yaml
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
pod/rdma-ib-33-workload created
|
|
----
|
|
|
|
. Verify that the pods are running by using the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get pods
|
|
----
|
|
+
|
|
.Example output
|
|
+
|
|
[source,terminal]
|
|
----
|
|
NAME READY STATUS RESTARTS AGE
|
|
rdma-ib-32-workload 1/1 Running 0 10s
|
|
rdma-ib-33-workload 1/1 Running 0 3s
|
|
---- |