Skip to content

Commit 56053f5

Browse files
authored
Merge pull request #6 from SchSeba/update-prepare-server
update ansible prepare server script
2 parents 3567c2b + 721a088 commit 56053f5

File tree

8 files changed

+297
-0
lines changed

8 files changed

+297
-0
lines changed

pods/infiniband/client-vfio.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
apiVersion: v1
3+
kind: Pod
4+
metadata:
5+
annotations:
6+
k8s.v1.cni.cncf.io/networks: '[
7+
{
8+
"name": "ib-vfio-network-1",
9+
"namespace": "seba"
10+
}
11+
]'
12+
labels:
13+
app: infiniband-client-vfio
14+
name: infiniband-client-vfio
15+
namespace: seba
16+
spec:
17+
containers:
18+
- command:
19+
- /bin/bash
20+
- -c
21+
- sleep INF
22+
image: quay.io/cloud-bulldozer/k8s-netperf:latest
23+
imagePullPolicy: Always
24+
name: netperf
25+
resources:
26+
limits:
27+
cpu: "2"
28+
memory: 1Gi
29+
requests:
30+
cpu: "2"
31+
memory: 1Gi
32+
securityContext:
33+
capabilities:
34+
add:
35+
- IPC_LOCK
36+
- NET_RAW
37+
terminationGracePeriodSeconds: 2

pods/infiniband/client.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
apiVersion: v1
3+
kind: Pod
4+
metadata:
5+
annotations:
6+
k8s.v1.cni.cncf.io/networks: '[
7+
{
8+
"name": "ib-network-1",
9+
"namespace": "seba"
10+
}
11+
]'
12+
labels:
13+
app: infiniband-client
14+
name: infiniband-client
15+
namespace: seba
16+
spec:
17+
containers:
18+
- command:
19+
- /bin/bash
20+
- -c
21+
- sleep INF
22+
image: quay.io/cloud-bulldozer/k8s-netperf:latest
23+
imagePullPolicy: Always
24+
name: netperf
25+
resources:
26+
limits:
27+
cpu: "2"
28+
memory: 1Gi
29+
requests:
30+
cpu: "2"
31+
memory: 1Gi
32+
securityContext:
33+
capabilities:
34+
add:
35+
- IPC_LOCK
36+
- NET_RAW
37+
terminationGracePeriodSeconds: 2

pods/infiniband/server.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
apiVersion: v1
3+
kind: Pod
4+
metadata:
5+
annotations:
6+
k8s.v1.cni.cncf.io/networks: '[
7+
{
8+
"name": "dpdk-network-1",
9+
"namespace": "seba"
10+
}
11+
]'
12+
labels:
13+
app: infiniband-server
14+
name: infiniband-server
15+
namespace: seba
16+
spec:
17+
containers:
18+
- command:
19+
- /bin/bash
20+
- -c
21+
- sleep INF
22+
image: quay.io/cloud-bulldozer/k8s-netperf:latest
23+
imagePullPolicy: Always
24+
name: netperf
25+
resources:
26+
limits:
27+
cpu: "2"
28+
memory: 1Gi
29+
requests:
30+
cpu: "2"
31+
memory: 1Gi
32+
securityContext:
33+
capabilities:
34+
add:
35+
- IPC_LOCK
36+
- NET_RAW
37+
terminationGracePeriodSeconds: 2

pods/infiniband/vm.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
apiVersion: kubevirt.io/v1
3+
kind: VirtualMachine
4+
metadata:
5+
labels:
6+
kubevirt.io/vm: vm-fedora
7+
name: vm-fedora
8+
spec:
9+
runStrategy: Always
10+
template:
11+
metadata:
12+
labels:
13+
kubevirt.io/vm: vm-fedora
14+
spec:
15+
domain:
16+
cpu:
17+
sockets: 2
18+
cores: 1
19+
threads: 1
20+
memory:
21+
guest: 1G
22+
devices:
23+
interfaces:
24+
- name: default
25+
masquerade: {}
26+
- name: sec
27+
sriov: {}
28+
disks:
29+
- disk:
30+
bus: virtio
31+
name: containerdisk
32+
- disk:
33+
bus: virtio
34+
name: cloudinitdisk
35+
terminationGracePeriodSeconds: 0
36+
networks:
37+
- name: default
38+
pod: {}
39+
- name: sec
40+
multus:
41+
networkName: ib-vfio-network-1
42+
volumes:
43+
- containerDisk:
44+
image: quay.io/kubevirt/fedora-with-test-tooling-container-disk:20260112_dc3dc8356a
45+
name: containerdisk
46+
- cloudInitNoCloud:
47+
userData: |-
48+
#cloud-config
49+
password: fedora
50+
chpasswd: { expire: False }
51+
name: cloudinitdisk

pods/tool-box-pdb.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: toolbox-pdb
6+
namespace: seba
7+
spec:
8+
minAvailable: 1
9+
selector:
10+
matchLabels:
11+
app: dpdk

prepare-node-virtual-cluster/prepare-server.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,13 @@
315315
register: kubectl_download
316316
until: kubectl_download is succeeded
317317

318+
- name: Create symbolic link for kubectl binary
319+
file:
320+
src: /usr/local/bin/kubectl
321+
dest: /bin/kubectl
322+
state: link
323+
mode: '0777'
324+
318325
- name: Verify kubectl installation
319326
command: kubectl version --client
320327
changed_when: false

sriov-configs/infiniband.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# this policy is need so we switch the interface to infiniband
2+
# but after that the interface name changes from ens4f0np0 to ibs4f0 so we create the real policy for the new interface
3+
---
4+
apiVersion: sriovnetwork.openshift.io/v1
5+
kind: SriovNetworkNodePolicy
6+
metadata:
7+
name: temp-nic-1
8+
namespace: openshift-sriov-network-operator
9+
spec:
10+
deviceType: netdevice
11+
linkType: IB
12+
isRdma: true
13+
nicSelector:
14+
pfNames: ["ens4f0np0"]
15+
nodeSelector:
16+
kubernetes.io/hostname: cnfdd8.t5g-dev.eng.rdu2.dc.redhat.com
17+
numVfs: 16
18+
priority: 99
19+
resourceName: temp_nic_1
20+
---
21+
apiVersion: sriovnetwork.openshift.io/v1
22+
kind: SriovNetworkNodePolicy
23+
metadata:
24+
name: ib-vfio-nic-1
25+
namespace: openshift-sriov-network-operator
26+
spec:
27+
deviceType: vfio-pci
28+
linkType: IB
29+
nicSelector:
30+
pfNames: ["ibs4f0#0-9"]
31+
nodeSelector:
32+
kubernetes.io/hostname: cnfdd8.t5g-dev.eng.rdu2.dc.redhat.com
33+
numVfs: 16
34+
priority: 99
35+
resourceName: ib_vfio_nic_1
36+
---
37+
apiVersion: sriovnetwork.openshift.io/v1
38+
kind: SriovNetworkNodePolicy
39+
metadata:
40+
name: ib-nic-1
41+
namespace: openshift-sriov-network-operator
42+
spec:
43+
deviceType: netdevice
44+
isRdma: true
45+
linkType: IB
46+
nicSelector:
47+
pfNames: ["ibs4f0#10-15"]
48+
nodeSelector:
49+
kubernetes.io/hostname: cnfdd8.t5g-dev.eng.rdu2.dc.redhat.com
50+
numVfs: 16
51+
priority: 99
52+
resourceName: ib_nic_1
53+
---
54+
apiVersion: sriovnetwork.openshift.io/v1
55+
kind: SriovIBNetwork
56+
metadata:
57+
name: ib-vfio-network-1
58+
namespace: openshift-sriov-network-operator
59+
spec:
60+
ipam: '{}'
61+
networkNamespace: seba
62+
resourceName: ib_vfio_nic_1
63+
---
64+
apiVersion: sriovnetwork.openshift.io/v1
65+
kind: SriovIBNetwork
66+
metadata:
67+
name: ib-network-1
68+
namespace: openshift-sriov-network-operator
69+
spec:
70+
ipam: '{}'
71+
networkNamespace: seba
72+
resourceName: ib_nic_1

sriov-configs/test17.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apiVersion: sriovnetwork.openshift.io/v1
2+
kind: SriovNetworkNodePolicy
3+
metadata:
4+
name: sriov-nic-1
5+
namespace: openshift-sriov-network-operator
6+
spec:
7+
deviceType: netdevice
8+
nicSelector:
9+
pfNames: ["enp41s0"]
10+
nodeSelector:
11+
kubernetes.io/hostname: ocp-virt-worker-0.lab
12+
numVfs: 5
13+
priority: 99
14+
resourceName: sriov_nic_1
15+
mtu: 1500
16+
---
17+
apiVersion: sriovnetwork.openshift.io/v1
18+
kind: SriovNetworkNodePolicy
19+
metadata:
20+
name: sriov-nic-2
21+
namespace: openshift-sriov-network-operator
22+
spec:
23+
deviceType: netdevice
24+
nicSelector:
25+
pfNames: ["enp22s0"]
26+
nodeSelector:
27+
kubernetes.io/hostname: ocp-virt-worker-0.lab
28+
numVfs: 5
29+
priority: 99
30+
resourceName: sriov_nic_2
31+
mtu: 1500
32+
# externallyManaged: true
33+
---
34+
apiVersion: sriovnetwork.openshift.io/v1
35+
kind: SriovNetwork
36+
metadata:
37+
name: sriov-network-1
38+
namespace: openshift-sriov-network-operator
39+
spec:
40+
ipam: '{"type": "host-local","ranges": [[{"subnet": "10.0.1.0/24"}]],"dataDir":
41+
"/run/my-orchestrator/container-ipam-state-1"}'
42+
networkNamespace: seba
43+
spoofChk: "on"
44+
trust: "on"
45+
resourceName: sriov_nic_1

0 commit comments

Comments
 (0)