Commit Graph

6157 Commits

Author SHA1 Message Date
Dan Bungert 8a3392e01a doc: wording and space tweaks to tutorial 2023-07-07 14:36:06 -06:00
Dan Bungert bc510872a4 doc: further editorial improvements to tutorial
Co-authored-by: Chad Smith <chad.smith@canonical.com>
2023-07-07 14:35:29 -06:00
Dan Bungert 482a2bfbd0 doc: simpler copyright declaration 2023-07-07 12:17:10 -06:00
Dan Bungert 3f5a62af79 doc: drop the extension to use markdown
Co-authored-by: Sally <sally.makin@canonical.com>
2023-07-07 10:39:48 -06:00
Dan Bungert 1418af004f doc: many tutorial editorial improvements
Co-authored-by: Sally <sally.makin@canonical.com>
2023-07-07 10:39:48 -06:00
Dan Bungert 35bbd4db18 doc: fix index titles
Co-authored-by: Sally <sally.makin@canonical.com>
2023-07-07 10:09:14 -06:00
Dan Bungert 70e9b00c14 doc: fix title
Co-authored-by: Sally <sally.makin@canonical.com>
2023-07-07 10:08:46 -06:00
Dan Bungert 337c4f8cc8 doc: most yaml samples in ccd format 2023-07-07 09:46:16 -06:00
Dan Bungert 02efd6ae7d doc: intersphinx to cloud-init 2023-07-07 09:01:49 -06:00
Dan Bungert 34333f536f doc: add stub reference, and sample links to it 2023-07-07 09:01:49 -06:00
Dan Bungert 61e9e82783 doc: copy and rewrite intro tutorial 2023-07-07 09:01:49 -06:00
Dan Bungert b07df2247f doc: s/Subiquity/Ubuntu Installation 2023-07-06 18:07:37 -06:00
Dan Bungert f2ce577f85 doc: gitignores 2023-07-06 18:07:37 -06:00
Dan Bungert 1271f5da48 doc: conf tweaks 2023-07-06 13:35:04 -06:00
Michael Hudson-Doyle c554428512 create a method for indicating if a capability can be customized
Currently the only capability that cannot be customized are the core
boot ones, but (a) that will change (b) it obscures the intent of the
check.
2023-07-06 14:52:12 +12:00
Michael Hudson-Doyle a97909cdd5 handle manual capability/target in guided POST
This just makes things a bit more regular.
2023-07-06 14:33:17 +12:00
Michael Hudson-Doyle 9ef996292d have v2_guided_GET indicate when manual partitioning is possible
There are some install scenarios where manual partitioning is not
possible at all. The current way we install core boot classic is one
(although that might change as and when we get partial gadgets) but
other situations might be when doing an install that just creates a
reset partition, or when installing a dd image rather than a squashfs.
2023-07-06 14:31:33 +12:00
Michael Hudson-Doyle 00c65f7246
Merge pull request #1705 from mwhudson/bye-v1-guided
move server client (mostly) to v2 guided API
2023-07-06 11:33:56 +12:00
Olivier Gayot 54465d16fa
Merge pull request #1703 from ogayot/install-oem-ensure-one-kernel
OEM: ensure only one kernel gets installed
2023-07-04 12:03:47 +02:00
Michael Hudson-Doyle 1594963ed5 remove guided_GET and associated types
It does not really say good things that I didn't have to remove any
tests...
2023-07-04 17:14:07 +12:00
Michael Hudson-Doyle b95fd2eb1c convert guided_POST to take a GuidedChoiceV2
can't call v2_guided_POST yet because the return type differs
2023-07-04 17:14:05 +12:00
Michael Hudson-Doyle c08666f418 move server client from guided_GET to v2_guided_GET 2023-07-04 16:59:38 +12:00
Michael Hudson-Doyle 7a2db2d3f7 test and fix for defective encrypted case 2023-07-04 16:57:19 +12:00
Michael Hudson-Doyle 7d6371ee45 add a way for v2_GET to include appropriate raid devices 2023-07-04 16:47:58 +12:00
Olivier Gayot 6424c3c52b oem: ensure a single kernel gets installed
Before running curthooks, we now look in the target if there is an
installed kernel. If there is, we instruct curtin _not_ to install
another one.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-07-03 09:59:45 +02:00
Olivier Gayot b844119b79 oem: disable OEM meta-packages installation on core boot classic
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:53:12 +02:00
Olivier Gayot e6ccfcc118 oem: allow to disable install on desktop and force install on server
By default, OEM meta-packages get installed on ubuntu-desktop and don't
get installed on ubuntu-server. Using autoinstall, we can now give more
control. The autoinstall section supports the following:

Install on server and desktop:

  oem:
    install: true

Do not install even on desktop:

  oem:
    install: false

Install only on desktop (the default):

  oem:
    install: auto

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:53:12 +02:00
Olivier Gayot 7e8c1eedd5 oem: raise error on certified hardware if a specific kernel is requested
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:53:12 +02:00
Olivier Gayot 30dff3f8d9
Merge pull request #1702 from ogayot/install-oem-kernel-selection
Override requested kernel flavor on certified hardware
2023-06-30 20:52:05 +02:00
Olivier Gayot f92e675abb oem: raise error on certified hardware if a specific kernel is requested
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:51:09 +02:00
Olivier Gayot 527522f748 oem: skip listing OEM metapkgs on ubuntu-server
OEM meta-packages have an attribute stating if they want the OEM kernel
or the "default" kernel to be installed alongside them.

That said, in the OEM archive, they expect the "default" OEM kernel to
be the HWE kernel. This is only true for ubuntu-desktop. Let's not
install OEM meta-packages on ubuntu-server for now.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:51:09 +02:00
Olivier Gayot 69a840fdb9 oem: check if OEM meta-packages want OEM or default kernel flavor
When installing on certified hardware, we now look for the
Ubuntu-Oem-Kernel-Flavour attribute of the OEM meta-package to determine
which kernel flavour we should use. This attribute can take two values:

 * oem -> in which case we make use of the override to install the
          OEM kernel flavor
 * default -> in which case we get the kernel flavor that was originally
   configured.

If the attribute is not present or contains any other value, it is
treated the same as if it was "oem".

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:51:09 +02:00
Olivier Gayot 1c2979811c kernel: move conversion flavor -> pkgname outside the ctrler
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:51:09 +02:00
Olivier Gayot cae7765fbf kernel: add a way to override the kernel metapkg we want to install
Before running curtin's curthooks, we use the kernel model to configure
which kernel meta-package we want to install on the target system.

There are multiple ways to select the kernel flavor, including
autoinstall directives or placing a file in
/etc/subiquity/kernel-meta-package.

That said, if we install Ubuntu on certified hardware, the OEM
meta-package will have something to say about the expected kernel
flavor. When installing the kernel meta-package, it will automatically
pull the kernel that it expects to run on.

Therefore, we should make it possible to override the kernel flavor so
that we don't end up with multiple kernels installed.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-30 20:51:09 +02:00
Olivier Gayot fc458ff109
Merge pull request #1700 from ogayot/install-oem
Install (and optionally upgrade) available OEM meta-packages
2023-06-30 20:49:33 +02:00
Olivier Gayot 6492ddc50c
Merge pull request #1704 from ogayot/doc-add-active-directory-schema
documentation: update autoinstall schema to include active-directory
2023-06-30 10:53:03 +02:00
Michael Hudson-Doyle 5ba9e524d8
Merge pull request #1697 from mwhudson/reset-only
support for creating only a reset partition
2023-06-30 16:53:55 +12:00
Michael Hudson-Doyle 64ad6514a3 suggestion from review 2023-06-30 16:43:01 +12:00
Dan Bungert 446f3772d3
Merge pull request #1687 from dbungert/default-user-none
server: fix when cloud-config has no default user
2023-06-29 16:20:23 -06:00
Dan Bungert 5bd9a4fc94 server: fix when cloud-config has no default user
If a cloud-config is sent that adjusts the users but creates no default
user, Subiquity crashes with a exception while mishandling the None.

cloudinit.distros.ug_util.extract_default is documented as returning
None in the event that the default user cannot be found.

Example bad cloud-config:
```yaml
users:
- name: ubuntu-server
```
2023-06-29 15:51:01 -06:00
Olivier Gayot 8f7760462a documentation: update autoinstall schema to include active-directory
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-29 14:26:54 +02:00
Michael Hudson-Doyle 0f78185b9a add some unit tests 2023-06-28 13:43:52 +12:00
Michael Hudson-Doyle bc11d0df3e maybe fix CI 2023-06-28 12:45:34 +12:00
Michael Hudson-Doyle 283e07a615 add integration test for reset-partition-only
This requires some tweaks to make the test machinery accept an
autoinstall that doesn't do most of the things we usually expect.  Also
set the .target attribute to None when reset-partition-only is true to
catch more issues in the dry-run environment.
2023-06-28 12:21:09 +12:00
Michael Hudson-Doyle 94172698f5 more bits and pieces 2023-06-26 17:01:57 +12:00
Michael Hudson-Doyle 35b951c87a skip some other steps in stage 1 2023-06-26 17:01:57 +12:00
Michael Hudson-Doyle 663a752d3a one more 2023-06-26 17:01:57 +12:00
Michael Hudson-Doyle 19f6b37b9b extremely naive way of having only a reset partition 2023-06-26 17:01:57 +12:00
Olivier Gayot 6123601cba oem: install (and upgrade) OEM meta-packages if available
When OEM meta-packages are available, install them before running
curthooks. If we are online, we also upgrade the metapackages so that
they are upgraded to their version in the relevant OEM archive. This
will effectively pull the kernel.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-23 10:05:21 +02:00
Olivier Gayot 64aabc1dd0 ubuntu-drivers: try to avoid OEM metapkgs when installing drivers
When installing third-party drivers, we now pass the --no-oem option to
the ubuntu-drivers install command. Because of LP #1966413, the option
might get ignored, which is not ideal but sort of acceptable - because
we want OEM meta-packages installed unconditionally anyway.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-23 10:05:21 +02:00