Commit Graph

221 Commits

Author SHA1 Message Date
Olivier Gayot 7a5ff9e76a examples: add lsb-release for jammy and noble
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2024-02-13 11:56:31 +01:00
Olivier Gayot c1105dffee filesystem: add integration test using nvme-o-tcp
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2024-02-08 19:17:05 +01:00
Olivier Gayot 383a9d20f4 examples: update machine-configs to include NVMe controllers
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2024-01-12 16:00:12 +01:00
Olivier Gayot 3a55a14cc1 examples: add machine-config for NVMe-over-TCP
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-12-13 17:55:41 +01:00
Olivier Gayot 65612edc0b examples: add desktop source with different variations
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-10-10 16:59:31 +02:00
Olivier Gayot 01ec1da86f codecs: skip installation when running an offline install
ubuntu-restricted-addons is a multiverse package and is not included in
the pool. Therefore, trying to get it installed when offline leads to an
obvious error.

Instead of making the whole Ubuntu installation fail, we now warn and
skip installation of the package when performing an offline install.
In a perfect world, we should not have offered to install the package in
the first place, but in practice, we can run an offline installation as
the result of failed mirror testing (bad network for instance).

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-09-29 18:20:19 +02:00
Dan Bungert c7a5f2504f examples: update desktop install-sources 2023-08-31 18:50:55 -06:00
Dan Bungert 18710aef48 runtests: +zfs 2023-08-28 12:59:24 -06:00
Michael Hudson-Doyle ac4d39baf8 add integration that installs desktop
and as a result, tests OEM metapackage code path
2023-08-03 13:17:31 +12:00
Michael Hudson-Doyle 0395b6e9b0 add support for 'dd' image sources
I think only a core dd image source will work for now. Probably.
2023-08-03 09:07:06 +12:00
Michael Hudson-Doyle 307f3b5c0a
Merge pull request #1740 from mwhudson/no-identity-reset-only
do not require identity data when reset_partition_only
2023-07-25 10:36:03 +12:00
Michael Hudson-Doyle d824742aff do not require identity data when reset_partition_only 2023-07-25 09:11:23 +12:00
Michael Hudson-Doyle b3dafb250b fix detection of mounted partitions
Even if we are going to ignore a mountpoint, we still need to process
its children...

Add machine config where the installer is running from a partition of a
disk you might want to install to, and an api test.
2023-07-24 12:41:35 +12:00
Michael Hudson-Doyle f08830cd71 fix autoinstalling core boot classic and add integration and unit tests 2023-07-21 11:39:50 +12:00
Dan Bungert 86b9c5749b examples: guided zfs autoinstall example 2023-07-19 14:54:37 -06:00
Michael Hudson-Doyle 55c68b5855 add an integration test to install core and some fixes
Note that it may not be possible to create an fsimage to use as a core
installation source (haven't tried, tbh) but I have upcoming changes to
use a disk image as installation source.
2023-07-19 15:49:32 +12:00
Michael Hudson-Doyle 7a39a53d59 offer reformats for the install media 2023-07-19 13:00:54 +12:00
Michael Hudson-Doyle b23d553220 fix using late-commands and reset-partition-only at the same time 2023-07-17 13:54:57 +12:00
Michael Hudson-Doyle c1d8dcf381 refresh simple.json, in particular with maj:min mount data 2023-07-11 23:11:31 +12:00
Michael Hudson-Doyle 2c75df0ddf remove now-redundant parts of the file names in examples/ 2023-07-11 22:46:19 +12:00
Michael Hudson-Doyle 6b35e5e4a1 tidy up examples/ directory
Move machine configs, sources, autoinstall files and dry-run configs
into their own subdirectories.
2023-07-11 12:49:22 +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
Olivier Gayot e56053f2bb ubuntu-drivers: add support for umockdev in dry-run
When running subiquity in dry-run mode with SUBIQUITY_DEBUG=run-drivers,
we now support using a YAML file describing the hardware in a
umockdev-compatible way. This allows to give some control on what
ubuntu-drivers list will reply.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-15 09:37:02 +02:00
Dan Bungert c0741ab715 examples: autoinstalls showing zfs root
Add example autoinstalls.  Include several necessary steps for
everything to go well that will be moved out of the autoinstall in
following PRs.
2023-06-08 12:06:33 -06:00
Dan Bungert c9180f09c1 examples: improve enhanced-secureboot 2023-05-15 16:50:27 -06:00
Dan Bungert 1cc39ab7ee examples: fake enhanced-secureboot-desktop 2023-05-15 16:50:27 -06:00
Dan Bungert ebc7e39ea8 source: test expected model characteristics 2023-05-15 16:49:15 -06:00
J-P Nurmi 2cbf8fc0dc Add test source catalog for desktop variants 2023-03-28 20:15:14 +02:00
Carlos Nihelton eb08609238
Updates the autoinstall-ad example file to '-' 2023-03-03 20:21:39 -03:00
Carlos Nihelton 68b6805677
Simpler AD integration test 2023-03-02 09:50:03 -03:00
Carlos Nihelton 7062e6ad3b
Consistent naming - part 2 - longer model name
sticking with "active_directory" for clarity.
2023-03-02 09:49:24 -03:00
Carlos Nihelton 03af76d431
AD integration testing
Currently only checks if the AD model causes packages to be installed
if the autoinstall contains AD data.
2023-03-01 15:23:30 -03:00
Olivier Gayot 75f6047a6f mirror: in CI, do not run apt-get update on the host
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-02-23 18:12:24 +01:00
Olivier Gayot 58e524ae6e
Merge pull request #1552 from ogayot/fallback-mirror
Support of multiple candidates mirrors with automatic selection in autoinstall & desktop installs
2023-02-15 09:04:11 +01:00
Olivier Gayot ff46c48d60 mirror: use apt->mirror-selection instead of relying on version
We used to rely on a version key under apt autoinstall section to
specify if we want the old implementation (i.e., a single candidate
primary mirror) or the new implementation (i.e., multiple primary mirror
candidates).

Instead, we now introduce the apt->mirror-selection autoinstall section,
and move the primary section under it.

If the primary section if under apt, we want the old implementation.
If the primary section is under apt->mirror-selection, we want the new
implementation.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-02-14 19:44:57 +01:00
Olivier Gayot fe8ab8a1e8 ssh: don't run ssh-import-id as part of the CI
Running ssh-import-id as part of the CI has limitations. First it
requires that we have access to the Internet. Second, it is affected by
github and launchpad service disruptions and or rate limiting policies.

Make sure we don't call ssh-import-id as part of the CI. Instead use a
username that is configured to produce fake successful key imports.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-02-13 16:41:47 +01:00
Olivier Gayot 7dbd0177e4 mirror: add autoinstall tests for apt/mirror version 2
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-02-10 15:43:05 +01:00
Dan Bungert ec38ae9120 test/api: example of x-make-view-request 2023-01-24 16:06:37 -07:00
Olivier Gayot ec80a1cdee integration-tests: import SSH keys from LP instead of GH
As part of our integrations tests, we import mwhudson's public SSH
key(s) from GitHub. At the moment, however, the GitHub API is rate
limiting the number of queries from our CI.

Upon exceeding the rate limit, our HTTP queries are responded with a 403:

┌────────────────────────────────────────────────────────────────────────┐
│  Importing keys failed:                                                │
│                                                                        │
│  2023-01-08 23:43:40,562 ERROR GitHub REST API rate-limited this IP    │
│  address. See https://developer.github.com/v3/#rate-limiting .         │
│  status_code=403 user=mwhudson                                         │
└────────────────────────────────────────────────────────────────────────┘

Currently, upon pushing to GitHub, the CI runs the integrations tests
against 4 different Ubuntu images (focal, jammy, kinetic, lunar).

This ends up doing 4 SSH import queries at roughly the same time ; which
often exceeds the rate limit and makes some of the tests fail.

This patch makes integration tests import SSH keys from Launchpad
instead of GitHub. Maybe a better approach would be to mock the calls to
ssh-import-id in the CI instead.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-01-09 09:43:53 +01:00
Carlos Nihelton 4f0b45798b
Answers no longer relevant for wsl_setup
Integration tests on wsl_setup variant should not write wsl.conf.
2022-12-16 13:28:11 +00:00
Dan Bungert 1898224c5f examples: machine config for raid1 delete crash
To produce the crash, simply use this machine config in dry run, do
manual partition, and attempt to delete the md device.
2022-12-08 12:30:09 -07:00
Olivier Gayot c7750c7fda mixed-catalog: rework description and name of entries
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-06 15:08:00 +01:00
Olivier Gayot 66c82b3227 drivers: query again list of drivers if the source variant changes
The list of drivers suggested to the user may vary based on whether we
are installing a server or desktop image / source.

In the current implementation of the drivers controller, the value of
the source variant (e.g., server or desktop) is read early in the
initializer.

This is a problem because it happens before the client gets the
opportunity to tell us if we are installing a server or a desktop image.

If the source variant ever changes, we want to query again the list of
drivers to suggest.

Upon configuring the source, the drivers controller will query (again)
the list of drivers.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-05 11:29:07 +01:00
Olivier Gayot d74a506f98 ubuntu-pro: add ability to run magic-attach locally in dry-run mode
In dry-run mode, the 'magic_attach_run_locally' variable can now be used
to execute uaclient on the host (against the uacontracts environment
specified in /etc/ubuntu-advantage/uaclient.conf) instead of relying on
a mock mechanism.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-11-28 17:27:23 +01:00
Olivier Gayot 217ac98fc6 filesystem: mount snapd/seed/systems only if it exists
The "$source"/var/lib/snapd/seed/systems directory only exists in certain
scenarios related to TPM-backed FDE. When the directory does not exist,
attempting to bind-mount it to /var/lib/snapd/seed/systems crashes the
install with a CalledProcessError.

We now make sure the directory exists before trying to mount it. For
dry-run test cases, we added a configuration item that simulates the
presence (or the non-presence) of the systems directory on the source.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-11-25 15:50:01 +01:00
Michael Hudson-Doyle f015634b79 configure controllers tui does not support when installing desktop
A bit of a hack but probably a useful one.
2022-11-15 15:43:33 +13:00
Michael Hudson-Doyle 5dafdb916d call into snapd to set up encryption when required 2022-11-11 14:46:44 +13:00
Michael Hudson-Doyle 2bb3aab362 add sample data which will fail at the finish-install step 2022-11-10 11:48:37 +13:00
Michael Hudson-Doyle c24cfd3d04 call into snapd to finish the installation of a core boot classic system 2022-11-10 11:48:37 +13:00
Michael Hudson-Doyle 5baa7b5e5f tidy sample data slightly 2022-11-10 11:47:29 +13:00