Skip to content

Commit

Permalink
baremetal: configure ironic interfaces for other boot mechanisms
Browse files Browse the repository at this point in the history
In order to support additional mechanisms for provisioning machines
beyond iPXE, such as Virtual Media, we need to be able to configure
various interfaces (boot_interface, power_interface, etc).
  • Loading branch information
stbenjam committed Dec 9, 2019
1 parent b5d0c99 commit 51ca657
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
7 changes: 7 additions & 0 deletions data/data/baremetal/masters/main.tf
Expand Up @@ -18,6 +18,13 @@ resource "ironic_node_v1" "openshift-master-host" {

driver = var.hosts[count.index]["driver"]
driver_info = var.driver_infos[count.index]

boot_interface = var.hosts[count.index]["boot_interface"]
inspect_interface = var.hosts[count.index]["inspect_interface"]
management_interface = var.hosts[count.index]["management_interface"]
power_interface = var.hosts[count.index]["power_interface"]
raid_interface = var.hosts[count.index]["raid_interface"]
vendor_interface = var.hosts[count.index]["vendor_interface"]
}

resource "ironic_allocation_v1" "openshift-master-allocation" {
Expand Down
1 change: 0 additions & 1 deletion data/data/baremetal/masters/variables.tf
Expand Up @@ -33,4 +33,3 @@ variable "instance_infos" {
type = list(map(string))
description = "Instance information for hosts"
}

1 change: 0 additions & 1 deletion data/data/baremetal/variables-baremetal.tf
Expand Up @@ -47,4 +47,3 @@ variable "instance_infos" {
type = list(map(string))
description = "Instance information for hosts"
}

11 changes: 8 additions & 3 deletions pkg/tfvars/baremetal/baremetal.go
Expand Up @@ -64,9 +64,14 @@ func TFVars(libvirtURI, bootstrapProvisioningIP, bootstrapOSImage, externalBridg

// Host Details
hostMap := map[string]interface{}{
"name": host.Name,
"port_address": host.BootMACAddress,
"driver": accessDetails.Driver(),
"name": host.Name,
"port_address": host.BootMACAddress,
"driver": accessDetails.Driver(),
"boot_interface": accessDetails.BootInterface(),
"management_interface": accessDetails.ManagementInterface(),
"power_interface": accessDetails.PowerInterface(),
"raid_interface": accessDetails.RAIDInterface(),
"vendor_interface": accessDetails.VendorInterface(),
}

// Properties
Expand Down

0 comments on commit 51ca657

Please sign in to comment.