From faa328d4b3527e34951272006800cabfeec76190 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 12 Nov 2020 18:20:23 +0100 Subject: [PATCH] Support UEFI in bifrost-cli and document it Change-Id: I829bd3454e1e6bc11f1631aef7ed8278c7b8bbe9 --- bifrost/cli.py | 6 ++++++ doc/source/contributor/testenv.rst | 3 +++ doc/source/install/index.rst | 9 +++++++++ .../notes/bifrost-cli-uefi-0d7890fb53655845.yaml | 8 ++++++++ 4 files changed, 26 insertions(+) create mode 100644 releasenotes/notes/bifrost-cli-uefi-0d7890fb53655845.yaml diff --git a/bifrost/cli.py b/bifrost/cli.py index 1e4b86e35..8b07e93e5 100644 --- a/bifrost/cli.py +++ b/bifrost/cli.py @@ -115,6 +115,7 @@ def cmd_testenv(args): test_vm_disk_gib=args.disk, test_vm_domain_type=args.domain_type, test_vm_node_driver=args.driver, + default_boot_mode='uefi' if args.uefi else 'bios', baremetal_json_file=os.path.abspath(args.inventory), baremetal_nodes_json=os.path.abspath(args.output), extra_vars=args.extra_vars, @@ -160,6 +161,7 @@ def cmd_install(args): use_tinyipa=args.testenv, developer_mode=args.develop, enable_prometheus_exporter=args.enable_prometheus_exporter, + default_boot_mode='uefi' if args.uefi else 'bios', extra_vars=args.extra_vars, **kwargs) log("Ironic is installed and running, try it yourself:\n", @@ -198,6 +200,8 @@ def parse_args(): testenv.add_argument('--driver', default='ipmi', choices=['ipmi', 'redfish'], help='driver for testing nodes') + testenv.add_argument('--uefi', action='store_true', + help='boot testing VMs with UEFI by default') testenv.add_argument('-e', '--extra-vars', action='append', help='additional vars to pass to ansible') testenv.add_argument('-o', '--output', default='baremetal-nodes.json', @@ -234,6 +238,8 @@ def parse_args(): install.add_argument('--enable-prometheus-exporter', action='store_true', default=False, help='Enable Ironic Prometheus Exporter') + install.add_argument('--uefi', action='store_true', + help='use UEFI by default') install.add_argument('-e', '--extra-vars', action='append', help='additional vars to pass to ansible') diff --git a/doc/source/contributor/testenv.rst b/doc/source/contributor/testenv.rst index 4ccc9a695..c22de67f0 100644 --- a/doc/source/contributor/testenv.rst +++ b/doc/source/contributor/testenv.rst @@ -33,6 +33,9 @@ Additionally, the following parameters can be useful: IPMI support uses VirtualBMC_, Redfish - sushy-tools_. +``--uefi`` + Makes the testing VMs boot with UEFI. + See the built-in documentation for more details: .. code-block:: bash diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index 67d3a59d9..02c12a6cd 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -91,6 +91,12 @@ need: * An IP address or a host name of its management controller (BMC). * Credentials for the management controller. * MAC address of the NIC the machine uses for PXE booting (optional for IPMI). +* Whether it boots in the UEFI or legacy (BIOS) mode. + + .. note:: + Some hardware types (like ``redfish``) can enforce the desired boot mode, + while the other (like ``ipmi``) require the same boot mode to be set in + ironic and on the machine. .. _Keystone: https://docs.openstack.org/keystone/latest/ .. _bare metal drivers: https://docs.openstack.org/ironic/latest/admin/drivers.html @@ -255,6 +261,9 @@ Additionally, the following parameters can be useful: ``--enable-prometheus-exporter`` Enable the Ironic Prometheus Exporter service. +``--uefi`` + Boot machines in the UEFI mode by default. + See the built-in documentation for more details: .. code-block:: bash diff --git a/releasenotes/notes/bifrost-cli-uefi-0d7890fb53655845.yaml b/releasenotes/notes/bifrost-cli-uefi-0d7890fb53655845.yaml new file mode 100644 index 000000000..3a77e07d8 --- /dev/null +++ b/releasenotes/notes/bifrost-cli-uefi-0d7890fb53655845.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + Adds the ``--uefi`` argument to ``./bifrost-cli testenv`` to make testing + VMs boot in the UEFI mode. + - | + Adds the ``--uefi`` argument to ``./bifrost-cli install`` to make ironic + use UEFI by default.