Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions deploy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ fencing-assisted:
keep-instance:
@../helpers/keep-instance.sh '$(DAYS)'

baremetal-adopt:
@./openshift-clusters/scripts/baremetal-adopt.sh

baremetal-verify:
@./openshift-clusters/scripts/baremetal-adopt.sh --verify-only

baremetal-wizard:
@./openshift-clusters/scripts/baremetal-wizard.sh

patch-nodes:
@./openshift-clusters/scripts/patch-nodes.sh
get-tnf-logs:
Expand Down Expand Up @@ -138,6 +147,11 @@ help:
@echo " clean-spoke - Clean spoke cluster resources (VMs, network, auth) from assisted installer"
@echo " patch-nodes - Build resource-agents RPM and patch cluster nodes (default version: 4.11)"
@echo ""
@echo "Baremetal Adoption:"
@echo " baremetal-adopt - Adopt baremetal nodes: validate BMC + generate dev-scripts artifacts"
@echo " baremetal-verify - Verify BMC credentials for adopted baremetal nodes (no artifacts)"
@echo " baremetal-wizard - Interactive wizard to create baremetal node inventory"
@echo ""
@echo "Cluster Utilities:"
@echo " get-tnf-logs - Collect pacemaker and etcd logs from cluster nodes"

2 changes: 2 additions & 0 deletions deploy/openshift-clusters/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
inventory.ini
inventory_baremetal.ini

proxy.env
kubeconfig
kubeadmin-password
Expand Down
64 changes: 64 additions & 0 deletions deploy/openshift-clusters/inventory_baremetal.ini.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Baremetal node inventory for TNF adoption
#
# NOTE: This is separate from inventory.ini, which targets the hypervisor host.
# This file describes the physical baremetal nodes to be adopted as OpenShift nodes.
# inventory.ini → hypervisor (where dev-scripts runs)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a hypervisor necessary to deploy here ? Seems like overhead. I guess dev-scripts need to run somewhere ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there is no hypervisor deploy. These 2 comment lines are to describe the difference between inventory.ini and inventory_baremetal.ini

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, ok. Sorry this makes sense now that I have context of the existing inventory.ini

# inventory_baremetal.ini → baremetal nodes (BMC endpoints for adoption)
#
# Copy this file to inventory_baremetal.ini and fill in your node details.
# Then run: make baremetal-adopt
#
# Each node requires:
# bmc_address - BMC/iDRAC/iLO management address (IP or hostname)
# bmc_user - BMC login username
# bmc_pass - BMC login password
# bmc_port - (optional) BMC Redfish port (default: 443)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a note that values must not contain spaces (the parser uses whitespace as the field delimiter). e.g.:

#   bmc_pass   - BMC login password (must not contain spaces)

# boot_mac - (optional) MAC address of the NIC used for PXE boot
# If omitted, the adopt script attempts Redfish discovery.
# data_mac - MAC address of the data NIC (for agent-config hostname mapping)
# May differ from boot_mac on multi-NIC servers. Emitted as BAREMETAL_MACS.
# node_ip - Static IP address for this node on the machine network
#
# The hostname (first field) becomes the node name in ironic_nodes.json.
# For TNF, you need exactly 2 nodes (master-0 and master-1).

[baremetal_nodes]
master-0 bmc_address=192.168.1.100 bmc_user=admin bmc_pass=changeme boot_mac=52:54:00:00:00:01 data_mac=52:54:00:00:00:01 node_ip=192.168.1.10
master-1 bmc_address=192.168.1.101 bmc_user=admin bmc_pass=changeme boot_mac=52:54:00:00:00:02 data_mac=52:54:00:00:00:02 node_ip=192.168.1.11

[baremetal_nodes:vars]
# BMC driver — only redfish is supported for TNF fencing
bmc_driver=redfish

# BMC Redfish port (per-node bmc_port overrides this)
bmc_port=443

# Skip TLS verification for BMC endpoints (common with self-signed certs)
bmc_verify_ca=False

# Node CPU architecture
cpu_arch=x86_64

[baremetal_network]
# Cluster-wide network config for baremetal deploy.
# api_vip - API virtual IP (required)
# ingress_vip - (optional) Ingress virtual IP — defaults to api_vip if omitted
# machine_network - (optional) Machine network CIDR (e.g. 192.168.1.0/24)
# iso_url - Full HTTP URL for agent ISO VirtualMedia boot (required)
# Must be reachable from BMCs. dev-scripts stages the ISO at
# ${WORKING_DIR}/${CLUSTER_NAME}/agent.x86_64.iso on the provisioning host.
api_vip=192.168.1.100
#ingress_vip=192.168.1.101
#machine_network=192.168.1.0/24
iso_url=http://10.1.235.49:8080/dev-scripts/ostest/agent.x86_64.iso

[provisioning_host]
# Remote host where dev-scripts runs (all optional).
# ssh_target - user@host for SSH access to the provisioning machine
# ssh_key - Path to SSH private key (omit to use ssh-agent/default)
# dev_scripts_path - dev-scripts checkout on the remote host
# working_dir - Working directory on the remote host for adoption artifacts
#ssh_target=root@hypervisor.example.com
#ssh_key=~/.ssh/id_ed25519
#dev_scripts_path=~/openshift-metal3/dev-scripts
#working_dir=~/tnt-baremetal
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ ci_token
clusterbot-ci_token
config_arbiter.sh
config_fencing.sh
config_sno.sh
config_sno.sh
config_baremetal_fencing.sh
ironic_nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ export OPENSHIFT_INSTALL_EXPERIMENTAL_DISABLE_IMAGE_POLICY=true
# export VBMC_IMAGE=quay.io/rh-edge-enablement/vbmc:2026-06
# export SUSHY_TOOLS_IMAGE=quay.io/rh-edge-enablement/sushy-tools:2026-06
# fi

# Baremetal network config (node IPs, VIPs, bridge overrides) is auto-generated
# by 'make baremetal-adopt' into config_baremetal_fencing.sh — do not add here.
Loading