diff --git a/playbooks/roles/bifrost-ironic-install/README.md b/playbooks/roles/bifrost-ironic-install/README.md index d50bf8c2b..8cc4edac2 100644 --- a/playbooks/roles/bifrost-ironic-install/README.md +++ b/playbooks/roles/bifrost-ironic-install/README.md @@ -179,6 +179,13 @@ power_off_after_inspection: Boolean setting governing the behavior Deployment without the need to reboot the physical machine. +enable_credential_less_deploy: Boolean setting that enables the experimental + feature of deploying nodes without BMC + credentials. Discovery (if enabled) will be + configured to use the default hardware type + "manual-management" and the "agent" power + interface will be enabled. + ### Hardware Inspection Support Bifrost also supports the installation of ironic-inspector in standalone diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index ee3c88742..1f87671b3 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -141,6 +141,8 @@ enabled_power_interfaces: "" default_resource_class: baremetal +enable_credential_less_deploy: false + # Extra pip packages to install with ironic # This should be a list of pip-installable references. # default: empty list @@ -227,16 +229,20 @@ inspector_store_data_in_nginx: false # 'Swift' API endpoint. inspector_store_data_url: "http://localhost:{{ file_url_port }}" -# Inspector defaults +enable_inspector_discovery: true + +inspector_default_node_driver: "{{ 'manual-management' if enable_credential_less_deploy|bool else 'ipmi' }}" + +# Inspector defaults (deprecated in Victoria) inspector: discovery: - enabled: "{{ enable_inspector_discovery | default(true) }}" - default_node_driver: "{{ inspector_default_node_driver | default('ipmi')}}" + enabled: "{{ enable_inspector_discovery }}" + default_node_driver: "{{ inspector_default_node_driver }}" # If baremetal nodes should be turned off after inspection. # The inspector default is to turn off the baremetal node # power, this setting to false enables use of fast track mode. -power_off_after_inspection: false +power_off_after_inspection: "{{ not fast_track|bool }}" # We may not have packaged iPXE files on some distros, or may want to # download them on their own. diff --git a/playbooks/roles/bifrost-ironic-install/tasks/hw_types.yml b/playbooks/roles/bifrost-ironic-install/tasks/hw_types.yml index 0878e84ed..197c1eff2 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/hw_types.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/hw_types.yml @@ -11,6 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. --- +- name: "Fail if credential-less deploy is misconfigured" + fail: + msg: enable_credential_less_deploy requires fast_track and the "manual-management" hardware type + when: + - enable_credential_less_deploy | bool + - (not fast_track | bool or 'manual-management' not in enabled_hardware_types) + - name: "Configure BIOS interfaces if required" set_fact: enabled_bios_interfaces: >- @@ -42,4 +49,5 @@ {%- if "ilo" in enabled_hardware_types -%},ilo{%- endif -%} {%- if "ipmi" in enabled_hardware_types -%},ipmitool{%- endif -%} {%- if "redfish" in enabled_hardware_types -%},redfish{%- endif -%} + {%- if enable_credential_less_deploy|bool -%},agent{%- endif -%} when: enabled_power_interfaces == "" diff --git a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 index 875f9223b..6917a1cad 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 @@ -59,6 +59,7 @@ tftp_master_path = {{ ironic_tftp_master_path }} uefi_pxe_bootfile_name = {{ ipxe_efi_binary }} uefi_pxe_config_template = $pybasedir/drivers/modules/ipxe_config.template {% endif %} +enable_netboot_fallback = true [deploy] http_url = http://{{ internal_ip }}:{{ file_url_port }}/ diff --git a/releasenotes/notes/agent-power-0773acb338ae4169.yaml b/releasenotes/notes/agent-power-0773acb338ae4169.yaml new file mode 100644 index 000000000..01c1b65a2 --- /dev/null +++ b/releasenotes/notes/agent-power-0773acb338ae4169.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Adds support for configuring credential-less deploy via the new ``agent`` + power interface and the ``manual-management`` hardware type. +deprecations: + - | + Deprecates providing inspector discovery parameters via + ``inspector[discovery]``, use explicit variables instead.