doc: many tutorial editorial improvements

Co-authored-by: Sally <sally.makin@canonical.com>
This commit is contained in:
Dan Bungert 2023-07-07 09:56:22 -06:00 committed by Dan Bungert
parent 35bbd4db18
commit 1418af004f
1 changed files with 30 additions and 23 deletions

View File

@ -1,10 +1,10 @@
.. _tutorial_intro-to-autoinstall: .. _tutorial_intro-to-autoinstall:
Introduction to Autoinstall Introduction to autoinstall
*************************** ***************************
Ubuntu installation automation is performed with the autoinstall format. Automatic Ubuntu installation is performed with the autoinstall format.
You might also know this feature as unattended or handsoff or preseeded You might also know this feature as "unattended", "hands-off" or "preseeded"
installation. installation.
This format is supported in the following installers: This format is supported in the following installers:
@ -23,35 +23,36 @@ Differences from debian-installer preseeding
(also known as d-i). (also known as d-i).
Autoinstalls differ from preseeds in the following ways: Autoinstalls differ from preseeds in the following ways:
* the format is different (yaml vs debconf-set-selections) * The format is different: autoinstalls use YAML instead of the preseed
* when the answer to a question is not present in a preseed, d-i stops and debconf-set-selections
asks the user for input. Autoinstalls are not like this: by default, if * When the answer to a question is not present in a preseed, d-i stops and
there is any autoinstall configuration at all, the installer takes the asks the user for input. By comparison, if there is any autoinstall
default for any unanswered question (and fails if there is no default). configuration at all, the autoinstall takes the default for any
* You can designate particular sections in the configuration as "interactive", unanswered question (and fails if there is no default).
which means the installer will still stop and ask about those. * You can designate particular sections in the autoinstall configuration as
"interactive", which means the installer will still stop and ask about those.
Providing the autoinstall configuration Providing the autoinstall configuration
======================================= =======================================
There are 2 methods of providing the autoinstall configuration: There are 2 ways to provide the autoinstall configuration:
* Carried as part of cloud-config * Carried as part of cloud-config
* Directly on the install media * Directly on the install media
Autoinstall by way of cloud-config Autoinstall by way of cloud-config
---------------------------------- ----------------------------------
The suggested method of providing autoinstall to the Ubuntu installer is by way The suggested way of providing autoinstall config to the Ubuntu installer is
of cloud-init. This allows the configuration to be applied to the installer via cloud-init. This allows the configuration to be applied to the installer
without having to modify the install media. without having to modify the install media.
The autoinstall config is provided via cloud-init configuration, which is The autoinstall config is provided via cloud-init configuration, which is
almost endlessly flexible. In most scenarios the easiest way will be to provide almost endlessly flexible. In most scenarios the easiest way will be to provide
user-data via the :external+cloud-init:ref:`datasource_nocloud` data source. user data via the :external+cloud-init:ref:`datasource_nocloud` data source.
When providing autoinstall via cloud-init, the autoinstall config is provided When providing autoinstall via cloud-init, the autoinstall config is provided
as :external+cloud-init:ref:`user_data_formats-cloud_config`. This as :external+cloud-init:ref:`user_data_formats-cloud_config`. This
means we need a :code:`#cloud-config` header. The autoinstall directives are means we need a :code:`#cloud-config` header. The autoinstall directives are
placed under a top level :code:`autoinstall` key, like so: placed under a top level :code:`autoinstall` key, like so:
@ -62,6 +63,12 @@ placed under a top level :code:`autoinstall` key, like so:
version: 1 version: 1
.... ....
.. note::
:external+cloud-init:ref:`user_data_formats-cloud_config` files must contain
the ``#cloud-config`` header to be recognized as a valid cloud config data
file.
Autoinstall on the install media Autoinstall on the install media
-------------------------------- --------------------------------
@ -69,17 +76,17 @@ Another option for supplying autoinstall to the Ubuntu installer is to place a
file named :code:`autoinstall.yaml` on the install media itself. file named :code:`autoinstall.yaml` on the install media itself.
There are two potential locations for the :code:`autoinstall.yaml` file: There are two potential locations for the :code:`autoinstall.yaml` file:
* At the root of the "cdrom". When writing the installation ISO to a USB * At the root of the "cdrom". When you write the installation ISO to a USB
Flash Drive, this can be done by copying the :code:`autoinstall.yaml` to the Flash Drive, this can be done by copying the :code:`autoinstall.yaml` to the
partition containing the contents of the ISO - i.e., in the same directory partition containing the contents of the ISO - i.e.,
containing the :code:`casper` directory. in the directory containing the ``casper`` sub-directory.
* On the rootfs of the installation system - this option will typically * On the rootfs of the installation system - this option will typically
require modifying the installation ISO and is not suggested, but is require modifying the installation ISO and is not suggested, but is
supported. supported.
Directly specifying autoinstall as a :code:`autoinstall.yaml` file does not Directly specifying autoinstall as a :code:`autoinstall.yaml` file does not
require a :code:`#cloud-config` header, and does not use a top level require a :code:`#cloud-config` header, and does not use a top level
:code:`autoinstall` key. The autoinstall directives are placed at the top :code:`autoinstall` key. The autoinstall directives are placed at the top
level. level.
.. code-block:: yaml .. code-block:: yaml
@ -88,14 +95,14 @@ level.
.... ....
Cloud-init and Autoinstall interaction Cloud-init and autoinstall interaction
====================================== ======================================
While cloud-init may assist in providing the autoinstall configuration to the While cloud-init may provide the autoinstall configuration to the
Ubuntu installer, cloud-init itself is not processing the autoinstall. Ubuntu installer, it does not process the autoinstall itself.
If cloud-init directives are intended to modify the ephemeral system, they If cloud-init directives are intended to modify the ephemeral system, they
must appear at the top level of the cloud-config. If instead must appear at the top level of the cloud-config. If instead
cloud-init directives are intended to modify the system being installed, they cloud-init directives are intended to modify the system being installed, they
must appear under a :code:`user-data` section in :code:`autoinstall`. must appear under a :code:`user-data` section in :code:`autoinstall`.