-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdriver-installation.yaml
115 lines (112 loc) · 3.12 KB
/
driver-installation.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: &name install-mlx-driver
labels:
app: *name
spec:
selector:
matchLabels:
app: *name
template:
metadata:
labels:
app: *name
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node.kubernetes.io/instance-type
operator: In
values:
- Standard_H16mr
- Standard_H16mr_Promo
- Standard_H16r
- Standard_H16r_Promo
- Standard_H8_Promo
- Standard_HB120-16rs_v2
- Standard_HB120-32rs_v2
- Standard_HB120-64rs_v2
- Standard_HB120-96rs_v2
- Standard_HB120rs_v2
- Standard_HB120-16rs_v3
- Standard_HB120-32rs_v3
- Standard_HB120-64rs_v3
- Standard_HB120-96rs_v3
- Standard_HB120rs_v3
- Standard_HB60-15rs
- Standard_HB60-30rs
- Standard_HB60-45rs
- Standard_HB60rs
- Standard_NC24rs_v2
- Standard_ND96amsr_A100_v4
- Standard_ND96asr_v4
- Standard_HC44rs
- standard_hb120-96rs_v3
hostNetwork: true
hostPID: true
containers:
- image: ghcr.io/converged-computing/aks-infiniband-install:ubuntu-22.04
imagePullPolicy: Always
name: *name
command: ["/entrypoint.sh"]
args: ["installonly"]
resources:
requests:
{}
limits:
{}
securityContext:
privileged: true
volumeMounts:
- name: actions
mountPath: "/opt/actions"
- name: hostmount
mountPath: "/mnt/actions"
- name: debs
mountPath: "/mnt/debs"
volumes:
- name: debs
hostPath:
path: /opt/debs
type: DirectoryOrCreate
- name: hostmount
hostPath:
path: /opt/actions
type: DirectoryOrCreate
- name: actions
configMap:
name: install-driver-actions
---
apiVersion: v1
kind: ConfigMap
metadata:
name: install-driver-actions
labels:
app: install-mlx-driver
data:
installonly: |
#!/usr/bin/env bash
set -eo pipefail
umount /mnt/install || true
cd /opt/debs
mkdir -p /mnt/install
mount -o ro,loop ./MLNX_OFED_LINUX-24.04-0.7.0.0-ubuntu22.04-x86_64.iso /mnt/install
/mnt/install/mlnxofedinstall --force
/etc/init.d/openibd restart
# Read in ip links, rename to ib0, and start
# ip link set ibP257s75549 name ib0
# ip link set ib0 up
wget https://raw.githubusercontent.com/converged-computing/aks-infiniband-install/main/ubuntu22.04/parse-links.py
python3 parse-links.py
ip link
check_ib="$(ip link | grep ib0)"
if [ -z "$check_ib" ];
then
echo "driver installation failed"
exit 1
fi
echo "installation completed."
exit 0