Deploy OpenStack host with Ironic and Redfish

Define node variables

NODE=com4-dev
NODE_BMC_HOST=com4-dev.ipmi.dev.i.example.com
NODE_MAC_NIC1=00:11:22:33:44:55

Define env variables

NODE_BMC_USER=ADMIN
NODE_BMC_PASS=ADMIN

Create now node with Redfish (pxe device boot broken)
https://docs.openstack.org/ironic/latest/admin/drivers/redfish.html

openstack baremetal node create \
  --name ${NODE} \
  --driver redfish \
  --driver-info redfish_address="https://${NODE_BMC_HOST}" \
  --driver-info redfish_username=${NODE_BMC_USER} \
  --driver-info redfish_password=${NODE_BMC_PASS} \
  --driver-info redfish_verify_ca=false \
  --driver-info redfish_system_id=/redfish/v1/Systems/1

Create now node with IPMI
https://docs.openstack.org/ironic/latest/admin/drivers/ipmitool.html

openstack baremetal node create \
  --name ${NODE} \
  --driver ipmi \
  --driver-info ipmi_address=${NODE_BMC_HOST} \
  --driver-info ipmi_username=${NODE_BMC_USER} \
  --driver-info ipmi_password=${NODE_BMC_PASS} 

iPXE
https://docs.openstack.org/ironic/latest/admin/interfaces/boot.html#pxe-boot

openstack baremetal node set ${NODE} \
  --boot-interface ipxe \
  --driver-info deploy_kernel="http://10.33.33.40:8080/ansible_ubuntu.vmlinuz" \
  --driver-info deploy_ramdisk="http://10.33.33.40:8080/ansible_ubuntu.initramfs"

Image
https://docs.openstack.org/ironic/latest/admin/interfaces/boot.html#pxe-boot

openstack baremetal node set ${NODE} \
  --instance-info image_source=http://10.33.33.40:8080/httpboot/img-bionic-minimal.tgz \
  --instance-info image_checksum=a50dc06157e4c7dd773389e4717323d5

UEFI
https://docs.openstack.org/ironic/latest/admin/interfaces/boot.html#pxe-boot

openstack baremetal node set ${NODE} --property capabilities='boot_mode:uefi'
# openstack baremetal node set --property capabilities='boot_device:pxe' ${NODE}

Ansible
https://docs.openstack.org/ironic/latest/admin/drivers/ansible.html

openstack baremetal node set ${NODE} \
  --deploy-interface ansible \
  --driver-info ansible_username=ansible \
  --driver-info ansible_key_file=/etc/ironic/id_rsa

Deploy node
https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/provisioning/node_states.html
https://docs.openstack.org/ironic/latest/_images/states.svg

openstack baremetal node manage ${NODE} --wait
openstack baremetal node provide ${NODE}
openstack baremetal node deploy ${NODE}

Debug

# node
openstack baremetal node validate ${NODE}
openstack baremetal node list
openstack baremetal node show ${NODE}
 
# ironic
tail -f /var/log/ironic/ironic-conductor.log /var/log/ansible.log