This repository was archived by the owner on Nov 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
286 lines (235 loc) · 11.1 KB
/
Makefile
File metadata and controls
286 lines (235 loc) · 11.1 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# Include environment variables
include .env
# Export variables to child processes
export
# Script paths
CLUSTER_SCRIPT := scripts/cluster.sh
MANIFESTS_SCRIPT := scripts/manifests.sh
TOOLS_SCRIPT := scripts/tools.sh
DPF_SCRIPT := scripts/dpf.sh
VM_SCRIPT := scripts/vm.sh
UTILS_SCRIPT := scripts/utils.sh
POST_INSTALL_SCRIPT := scripts/post-install.sh
NFS_SERVICE_SCRIPT := scripts/nfs-service.sh
# Sanity tests script:
SANITY_CHECKS_SCRIPT := scripts/dpf-sanity-checks.sh
.PHONY: all clean check-cluster create-cluster prepare-manifests generate-ovn update-paths help delete-cluster verify-files \
download-iso fix-yaml-spacing create-vms delete-vms enable-storage cluster-install wait-for-ready \
wait-for-installed wait-for-status cluster-start clean-all deploy-dpf kubeconfig deploy-nfd \
install-hypershift install-helm deploy-dpu-services prepare-dpu-files upgrade-dpf create-day2-cluster get-day2-iso \
redeploy-dpu enable-ovn-injector deploy-argocd deploy-maintenance-operator configure-flannel \
deploy-core-operator-sources setup-nfs-server deploy-metallb deploy-lso deploy-odf prepare-nfs run-dpf-sanity
all:
@mkdir -p logs
@bash -o pipefail -c '$(MAKE) _all 2>&1 | tee "logs/make_all_$(shell date +%Y%m%d_%H%M%S).log"'
_all: verify-files check-cluster create-vms prepare-manifests cluster-install update-etc-hosts kubeconfig deploy-dpf prepare-dpu-files deploy-dpu-services enable-ovn-injector
@echo ""
@echo "================================================================================"
@echo "✅ DPF Installation Complete!"
@echo "================================================================================"
@echo ""
@echo "Next steps to add worker nodes with DPUs:"
@echo "1. Access Assisted Installer UI and download discovery ISO"
@echo "2. Boot worker nodes with the discovery ISO"
@echo "3. Approve pending certificate signing requests"
@echo "4. Wait for nodes to join the cluster"
@echo "5. Monitor DPU deployment progress"
@echo ""
@echo "================================================================================"
verify-files:
@$(UTILS_SCRIPT) verify-files
clean:
@$(CLUSTER_SCRIPT) clean
delete-cluster:
@$(CLUSTER_SCRIPT) delete-cluster
check-cluster:
@$(CLUSTER_SCRIPT) check-create-cluster
create-cluster:
@$(CLUSTER_SCRIPT) check-create-cluster
create-day2-cluster:
@$(CLUSTER_SCRIPT) create-day2-cluster
get-day2-iso: create-day2-cluster
@$(CLUSTER_SCRIPT) get-day2-iso
prepare-manifests:
@$(MANIFESTS_SCRIPT) prepare-manifests
generate-ovn:
@$(MANIFESTS_SCRIPT) generate-ovn-manifests
update-paths:
@$(MANIFESTS_SCRIPT) prepare-manifests
download-iso:
@$(CLUSTER_SCRIPT) download-iso
create-vms: download-iso
@$(VM_SCRIPT) create
delete-vms:
@$(VM_SCRIPT) delete
cluster-start:
@$(CLUSTER_SCRIPT) start-cluster-installation
cluster-install:
@$(CLUSTER_SCRIPT) cluster-install
wait-for-status:
@$(CLUSTER_SCRIPT) wait-for-status "$(STATUS)"
wait-for-ready:
@$(MAKE) wait-for-status STATUS=ready
wait-for-installed:
@$(MAKE) wait-for-status STATUS=installed
enable-storage:
@$(MANIFESTS_SCRIPT) enable-storage
prepare-dpf-manifests:
@$(MANIFESTS_SCRIPT) prepare-dpf-manifests
upgrade-dpf: install-helm
@scripts/dpf-upgrade.sh interactive
deploy-argocd: install-helm
@$(DPF_SCRIPT) deploy-argocd
deploy-maintenance-operator: install-helm
@$(DPF_SCRIPT) deploy-maintenance-operator
deploy-dpf: prepare-dpf-manifests
@$(DPF_SCRIPT) apply-dpf
prepare-dpu-files:
@$(POST_INSTALL_SCRIPT) prepare
deploy-dpu-services: prepare-dpu-files
@$(POST_INSTALL_SCRIPT) apply
deploy-hypershift:
@$(DPF_SCRIPT) deploy-hypershift
create-ignition-template:
@$(DPF_SCRIPT) create-ignition-template
redeploy-dpu:
@$(POST_INSTALL_SCRIPT) redeploy
configure-flannel: deploy-dpu-services
@echo "✅ Flannel IPAM controller is deployed as part of DPU services"
enable-ovn-injector: install-helm
@scripts/enable-ovn-injector.sh
deploy-core-operator-sources:
@$(MANIFESTS_SCRIPT) deploy-core-operator-sources
update-etc-hosts:
@scripts/update-etc-hosts.sh update_etc_hosts
clean-all:
@$(CLUSTER_SCRIPT) clean-all
@$(VM_SCRIPT) delete
kubeconfig:
@$(CLUSTER_SCRIPT) get-kubeconfig
deploy-nfd:
@$(DPF_SCRIPT) deploy-nfd
deploy-metallb:
@$(DPF_SCRIPT) deploy-metallb
deploy-lso:
@$(CLUSTER_SCRIPT) deploy-lso
deploy-odf:
@$(CLUSTER_SCRIPT) deploy-odf
prepare-nfs:
@$(MANIFESTS_SCRIPT) prepare-nfs
install-hypershift:
@$(TOOLS_SCRIPT) install-hypershift
install-helm:
@$(TOOLS_SCRIPT) install-helm
setup-nfs-server:
@$(NFS_SERVICE_SCRIPT)
run-dpf-sanity:
@echo "Running $(SANITY_CHECKS_SCRIPT) ..."
@chmod +x $(SANITY_CHECKS_SCRIPT)
@$(SANITY_CHECKS_SCRIPT)
help:
@echo "Available targets:"
@echo "Cluster Management:"
@echo " all - Complete setup: verify, create cluster, VMs, install, and wait for completion"
@echo " create-cluster - Create a new cluster"
@echo " create-day2-cluster - Create a day2 cluster for worker nodes with DPUs"
@echo " get-day2-iso - Get ISO URL for worker nodes with DPUs (uses day2 cluster)"
@echo " download-iso - Download the ISO for master nodes"
@echo " prepare-manifests - Prepare required manifests"
@echo " deploy-core-operator-sources - Deploy NFD & SR-IOV subscriptions and CatalogSource"
@echo " delete-cluster - Delete the cluster"
@echo " clean - Remove generated files"
@echo " clean-all - Delete cluster, VMs, and clean all generated files"
@echo ""
@echo "VM Management:"
@echo " create-vms - Create virtual machines for the cluster"
@echo " delete-vms - Delete virtual machines"
@echo ""
@echo "Installation and Status:"
@echo " cluster-install - Start cluster installation (includes waiting for ready and installed status)"
@echo " cluster-start - Start cluster installation without waiting"
@echo " wait-for-status - Wait for specific cluster status (use STATUS=desired_status)"
@echo " wait-for-ready - Wait for cluster ready status"
@echo " wait-for-installed - Wait for cluster installed status"
@echo " kubeconfig - Download cluster kubeconfig if not exists"
@echo ""
@echo "DPF Installation:"
@echo " deploy-argocd - Deploy GitOps operator"
@echo " deploy-maintenance-operator - Deploy Maintenance Operator (standalone)"
@echo " deploy-dpf - Deploy DPF operator (automatically deploys prerequisites for v25.7+)"
@echo " prepare-dpf-manifests - Prepare DPF installation manifests"
@echo " update-etc-hosts - Update /etc/hosts with cluster entries"
@echo " deploy-nfd - Deploy NFD operator directly from source"
@echo " deploy-metallb - Deploy MetalLB operator for LoadBalancer support (only if HYPERSHIFT_API_IP is set)"
@echo " deploy-lso - Deploy Local Storage Operator for block storage (multi-node only)"
@echo " deploy-odf - Deploy OpenShift Data Foundation for distributed storage (multi-node only)"
@echo " prepare-nfs - Prepare NFS manifests (internal or external NFS based on configuration)"
@echo " upgrade-dpf - Interactive DPF operator upgrade (user-friendly wrapper for prepare-dpf-manifests)"
@echo " prepare-dpu-files - Prepare post-installation manifests with custom values"
@echo " deploy-dpu-services - Deploy DPU services to the cluster"
@echo " configure-flannel - Deploy flannel IPAM controller for automatic podCIDR assignment"
@echo ""
@echo "Hypershift Management:"
@echo " install-hypershift - Install Hypershift binary and operator"
@echo " create-hypershift-cluster - Create a new Hypershift hosted cluster"
@echo " configure-hypershift-dpucluster - Configure DPF to use Hypershift hosted cluster"
@echo ""
@echo "Configuration options:"
@echo "Cluster Configuration:"
@echo " CLUSTER_NAME - Set cluster name (default: $(CLUSTER_NAME))"
@echo " BASE_DOMAIN - Set base DNS domain (default: $(BASE_DOMAIN))"
@echo " OPENSHIFT_VERSION - Set OpenShift version (default: $(OPENSHIFT_VERSION))"
@echo " KUBECONFIG - Path to kubeconfig file (default: $(KUBECONFIG))"
@echo ""
@echo "Feature Configuration:"
@echo " DISABLE_NFD - Skip NFD deployment (default: $(DISABLE_NFD))"
@echo " NFD_OPERAND_IMAGE - (deprecated - no longer used)"
@echo ""
@echo "Hypershift Configuration:"
@echo " HYPERSHIFT_IMAGE - Hypershift operator image (default: $(HYPERSHIFT_IMAGE))"
@echo " HOSTED_CLUSTER_NAME - Name of the hosted cluster (default: $(HOSTED_CLUSTER_NAME))"
@echo " CLUSTERS_NAMESPACE - Namespace for clusters (default: $(CLUSTERS_NAMESPACE))"
@echo " OCP_RELEASE_IMAGE - OCP release image for hosted cluster (default: $(OCP_RELEASE_IMAGE))"
@echo ""
@echo "Network Configuration:"
@echo " POD_CIDR - Set pod CIDR (default: $(POD_CIDR))"
@echo " SERVICE_CIDR - Set service CIDR (default: $(SERVICE_CIDR))"
@echo " DPU_INTERFACE - Set DPU interface (default: $(DPU_INTERFACE))"
@echo " API_VIP - Set API VIP address"
@echo " INGRESS_VIP - Set Ingress VIP address"
@echo ""
@echo "VM Configuration:"
@echo " VM_COUNT - Number of VMs to create (default: $(VM_COUNT))"
@echo " RAM - RAM in MB for VMs (default: $(RAM))"
@echo " VCPUS - Number of vCPUs for VMs (default: $(VCPUS))"
@echo " DISK_SIZE1 - Primary disk size in GB (default: $(DISK_SIZE1))"
@echo " DISK_SIZE2 - Secondary disk size in GB (default: $(DISK_SIZE2))"
@echo ""
@echo "DPF Configuration:"
@echo " DPF_VERSION - DPF operator version (default: $(DPF_VERSION))"
@echo " ETCD_STORAGE_CLASS - StorageClass for hosted cluster etcd (default: $(ETCD_STORAGE_CLASS))"
@echo " BFB_STORAGE_CLASS - StorageClass for BFB PVC (default: $(BFB_STORAGE_CLASS))"
@echo ""
@echo "MetalLB Configuration:"
@echo " HYPERSHIFT_API_IP - IP address for Hypershift API server LoadBalancer"
@echo " If set: Deploys MetalLB and uses LoadBalancer for Hypershift API"
@echo " If not set: Uses NodePort for Hypershift API (multi-node) or default (single-node)"
@echo ""
@echo "NFS Configuration:"
@echo " NFS_SERVER_NODE_IP - External NFS server IP (if set, uses external NFS; otherwise internal)"
@echo " NFS_PATH - NFS export path (default: /)"
@echo ""
@echo "Post-installation Configuration:"
@echo " BFB_URL - URL for BFB file (default: http://10.8.2.236/bfb/rhcos_4.19.0-ec.4_installer_2025-04-23_07-48-42.bfb)"
@echo " HBN_OVN_NETWORK - Network for HBN OVN IPAM (default: 10.0.120.0/22)"
@echo ""
@echo "NFS Server Setup:"
@echo " setup-nfs-server - Setup NFS server with systemd service and firewall configuration"
@echo " Environment variables:"
@echo " NFS_EXPORT_DIR - Export directory path (default: /nfs/exports)"
@echo " NFS_EXPORT_OPTIONS - Export options (default: rw,sync,no_root_squash,no_subtree_check)"
@echo " NFS_ALLOWED_NETWORK - Allowed network/host (default: *)"
@echo ""
@echo "Wait Configuration:"
@echo " MAX_RETRIES - Maximum number of retries for status checks (default: $(MAX_RETRIES))"
@echo " SLEEP_TIME - Sleep time in seconds between retries (default: $(SLEEP_TIME))"