From 20f25068c627974ae8c38ca249fcd96ec6924ed0 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 16 Dec 2020 18:56:54 +0100 Subject: [PATCH] Document using ramdisks with the ramdisk deploy interface Change-Id: Ibc28cbfaa9331343c1f91f0e6b32aafda3e5718c Depends-On: https://review.opendev.org/c/openstack/ironic-python-agent-builder/+/767376 --- doc/source/admin/ramdisk-boot.rst | 48 ++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/doc/source/admin/ramdisk-boot.rst b/doc/source/admin/ramdisk-boot.rst index dc212d6eac..542a47738a 100644 --- a/doc/source/admin/ramdisk-boot.rst +++ b/doc/source/admin/ramdisk-boot.rst @@ -39,7 +39,46 @@ or update an existing node: You can also use it with :ref:`redfish virtual media ` instead of iPXE. -.. TODO(dtantsur): document how exactly to create and boot a ramdisk +Creating a ramdisk +------------------ + +A ramdisk can be created using the ``ironic-ramdisk-base`` element from +ironic-python-agent-builder_, e.g. with Debian: + +.. code-block:: shell + + export ELEMENTS_PATH=/opt/stack/ironic-python-agent-builder/dib + disk-image-create -o /output/ramdisk \ + debian-minimal ironic-ramdisk-base openssh-server dhcp-all-interfaces + +You should consider using the following elements: + +* openssh-server_ to install the SSH server since it's not provided by default + by some minimal images. +* devuser_ or dynamic-login_ to provide SSH access. +* dhcp-all-interfaces_ or simple-init_ to configure networking. + +The resulting files (``/output/ramdisk.kernel`` and +``/output/ramdisk.initramfs`` in this case) can then be used when `Booting a +ramdisk`_. + +Booting a ramdisk +----------------- + +Pass the kernel and ramdisk as normally, also providing the ramdisk as an image +source, for example, + +.. code-block:: shell + + baremetal node set \ + --instance-info kernel=http://path/to/ramdisk.kernel \ + --instance-info ramdisk=http://path/to/ramdisk.initramfs \ + --instance-info image_source=http://path/to/ramdisk.initramfs + baremetal node deploy + +.. note:: + The requirement to pass ``image_source`` is artificial and will be fixed + in a future version of the Bare Metal service. Booting an ISO -------------- @@ -73,3 +112,10 @@ or desired. As such, this interface does come with several caveats: * As with all deployment interfaces, automatic cleaning of the node will still occur with the contents of any local storage being wiped between deployments. + +.. _ironic-python-agent-builder: https://opendev.org/openstack/ironic-python-agent-builder +.. _openssh-server: https://docs.openstack.org/diskimage-builder/latest/elements/openssh-server/README.html +.. _devuser: https://docs.openstack.org/diskimage-builder/latest/elements/devuser/README.html +.. _dynamic-login: https://docs.openstack.org/diskimage-builder/latest/elements/dynamic-login/README.html +.. _dhcp-all-interfaces: https://docs.openstack.org/diskimage-builder/latest/elements/dhcp-all-interfaces/README.html +.. _simple-init: https://docs.openstack.org/diskimage-builder/latest/elements/simple-init/README.html