Commit graph

1335 commits

Author SHA1 Message Date
yih
266cfdcc44 fix ansible error on centos9 2023-03-02 16:03:11 +01:00
Sanne Raymaekers
56aa40ea5e test/data/manifests: regenerate fedora manifests 2023-03-01 14:35:56 +01:00
Antonio Murdaca
ed4d12fe33 ignition: enable systemd firstboot condition through kargs
This is a workaround to make the systemd believe it's firstboot
when ignition runs on real firstboot.
Right now, since we ship /etc/machine-id, systemd thinks it's not firstboot
and ignition depends on it to run on the real firstboot to enable services from presets.
Since this only applies to artifacts with ignition and changing machineid-compat at
commit creation time may have undesiderable effect, we're doing it here as a stopgap.
We may revisit this in the future.
This patch also pins the version of osbuild because it depends on a fix
for the ignition stage.

Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-02-28 18:35:45 +01:00
Alexander Todorov
e064c12449 Update test suite after rebase to weldr-client-35.9
in order to avoid failures in nightly pipelines b/c JSON format has
changed
2023-02-28 11:15:49 +01:00
Juan Abia
a761184725 Modify CIV options
With the previous method of passing options, we encountered some
problems when sending the options via an array.
2023-02-28 10:26:01 +01:00
Achilleas Koutsou
d2a5c9aafa test: regenerate affected manifests
RHEL 7 manifests included rel-eng packages in their OS pipelines.
These have now been removed.
2023-02-23 16:22:42 +01:00
Xiaofeng Wang
eaee7870ba test: Add user in simplified installer blueprint
Run ansible playbook with user configured in simplified installer
blueprint
2023-02-22 12:18:12 +01:00
Tomáš Hozza
f5580b1f3e Test: regenerate image manifest that use files customization
Regenerate image manifests which use the files customization and are
affected by the recent change to `osbuild/fsnode.go`, specifically to
always setting the `RemoveDestination` to `true`.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
19e38621c9 Test/ostree-ng: test dirs and files customizations
Test the directories and files customization with the ostree container
image type deployed using the (Anaconda-based) installer image.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
3cf77187d6 Test: reformat parts of ostree-ng.sh
Reformat calls of `ansible-playbook` by splitting them into multiple
lines. This makes it easier to read.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
6cd7892c47 Test/ostree: test dirs and files customizations
Test the directories and files customization with the ostree commit
image type.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
50fc6cc29c Test: reformat part of ostree.sh
Split the call to `ansible-playbook` to multiple lines.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
55c3abe842 Test/ansible/check_ostree: test dirs and files customization
Extend the `check_ostree.yaml` to check the result of directories
and files customizations on a running ostree-based system. The test
also checks if a custom systemd unit `custom.service` got enabled
and started on boot.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
c528948b71 Test/API: use directories and files customization for supported images
Use directories and files customization in the compose request for image
types that support this customization (only ostree installer and raw
image do not support it).

Extend the instance verification to check for the custom directories and
files.

Extend the ostree commit verification to check for the custom
directories and files.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
d1325aaf45 Test/API/GCP: don't set gcloud format to JSON by default
Previously, the `--format=json` was always set in the `$GCP_CMD`. This
was working OK in general, but it is creating issues when using
`$GCP_CMD compute ssh` to execute commands on the provisioned VM. In
such case, an extra `[]` is added to the output, which then causes
various checks to fail, since the captured stdout is different than
expected.

Instead remove the `--format=json` by default from `$GCP_CMD` and use it
explicitly only in cases when `jq` is used to parse the command's
output. In all other cases, it should be OK to not set the output format
to JSON and it is very much desirable to do so when SSH-ing to the VM.

Also by default pass the `--quiet` option to `gcloud` when using it from
the container. This was previously done only when using the tool
installed on the system.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
1c64d15a61 Test/fedora: add iot-container test manifests with customizations
Add `iot-container` test manifests with customizations. Specifically with
files, directories and services.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
df26be35cc Test/fedora: add iot-commit test manifests with customizations
Add `iot-commit` test manifests with customizations. Specifically with
files, directories and services.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
e16fdeb7ed Test/el/cs: add edge-container test manifests with customizations
Add `edge-container` test manifests with customizations. Specifically with
files, directories and services.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
5a7092bfd5 Test/el/cs: add edge-commit test manifests with customizations
Add `edge-commit` test manifests with customizations. Specifically with
files, directories and services.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
aa9373cb18 Test: use dir and file customizations in qcow2 image manifests
Add the new directories and files customization to the customized qcow2
image manifests used for testing.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
b36c03f20c manifest/os: move the systemd services stage more to the end
Move the handling of the list of enabled and disabled systemd services
more to the end of the `os` pipeline, just before the SELinux stage.
This has no functional effect on produced images, but it will make it
nicer once the handling of the custom files and directories will be
added to the pipeline. Specifically it should be added right before the
services stage to allow enabling custom service files, but after all
other configurations that are applied to the image.

Regenerate all manifests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Mario Cattamo
b68cf83a8e Update boot location for Fedora 37 edge-commit 2023-02-21 09:46:27 +01:00
Juan Abia
5a62453190 Remove cloud cleaner
cloud cleaner is now being executed in it's own repo.
2023-02-15 17:23:35 +01:00
Juan Abia
197cd47e0b test/cases: move CIV options into a variable
In order to provide different options when running CIV from it's own CI,
move them to the variable CIV_OPTIONS
2023-02-15 17:23:35 +01:00
Antonio Murdaca
71ca1d0e9a regenerate manifests
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-02-14 12:07:23 +01:00
Antonio Murdaca
6afab3dff2 rhel9: fix conditionals for sysroot.readonly enablement
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-02-14 12:07:23 +01:00
Antonio Murdaca
b8ddbd3031 internal/distro/rhel9: enable ignition on 9+
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-02-07 13:30:22 +01:00
Antonio Murdaca
5ab00987cd test/cases: add ignition test to edge-raw-image
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-02-07 13:30:22 +01:00
Ondřej Budai
2b1facb44d distro/rhel8: don't install missing MSFT key into azure-sap-rhui
The rhui-azure-rhel8-sap-ha package is currently missing
the /etc/pki/rpm-gpg/RPM-GPG-KEY-microsoft-azure-release key.
This makes the image type unbuildable, which causes some of our tests
to fail.

Overlay the generic RHUI config, so the missing key isn't imported.
See CLOUDX-336 for more information.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-02-07 13:16:12 +01:00
Xiaofeng Wang
b4f15f13e3 test: Add minimal-raw image test
The minimal-raw image is for Fedora only and feature merged by
PR #3181
2023-02-06 17:58:05 +01:00
Achilleas Koutsou
7a1d7ae1d7 test: update installer manifests for RHEL 9.x and CS9
Dracut modules and drivers fixed for the dracut stage in all RHEL 9.x
and CS9 Anaconda installers (image-installer and edge-installer).
2023-01-31 11:03:26 +01:00
Irene Diez
1dfc82ae4a test/data/manifests: regen for edge container + commit
Signed-off-by: Irene Diez <idiez@redhat.com>
2023-01-30 19:26:44 +01:00
Achilleas Koutsou
9706de4f44 test: generate new manifests: RHEL 8 Azure aarch64 2023-01-30 17:40:18 +01:00
Simon de Vlieger
a8b6fd45ec iot-installer: enable anaconda modules
As noted in #3141 I've enabled the extra modules for Anaconda for the
iot-installer image type.
2023-01-27 10:46:27 +01:00
Achilleas Koutsou
6c503e4edc test: update rhel-91 manifests
Updated manifests for RHEL 9.1.

The changes added here would have been part of commit
73882b7289 but the lack of repositories
defined for the distro prevented test case generation.
2023-01-26 20:32:38 +01:00
Achilleas Koutsou
fe7860778c test: update RHEL 7 manifests
Changes:
- Removed unnecessary packages from build roots.  Build packages are
  added on-demand.
- Some stages changed order in the OS pipeline for azure-rhui.  This
  will have no functional effect.
- RHSM Facts stage added to all RHEL 7 manifests.  This wont be used
  since RHEL 7 is not built in the cloud service.  The RHSM fact is
  added by the test case generator to all image types to test that the
  option is working properly.
- Azure archive pipeline renamed to xz like in all the other rewritten
  image types that use the xz pipeline.
- Azure image filename before archiving has changed from 'disk.vhd' to
  'image.vhd'.  Again, this will have no functional effect because the
  name of the final artifact is unchanged (disk.vhd.xz).
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
6fdf917271 distro/rhel7: update distribution implementation
Update the implementation of the distro.Distro interface to match the
one in RHEL 8, 9, and Fedora.  The main change is that the runner is a
runner.Runner and not a string.

The runner name is now rhel79 (changed from rhel7).  This is
functionally equivalent based on osbuild's runner version fallback
logic.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
a93ae83c5c distro/rhel7: add packageset chains to qcow2
The qcow2 image type for RHEL 7 doesn't have packageset chains defined.
This means that the blueprint packages are never merged into the os
pipeline.

This is unnecessary right now because of the upcoming rewrite, but it
will minimise the differences that will show up in the manifest.

The qcow2-customize manifest has an added block of options for the
grub2.legacy stage because now the dracut-config-rescue package is being
installed in the image.
2023-01-25 20:37:12 +01:00
Sarita Mahajan
0d16e2310e image: add new image type "minimal-raw" for fedora
Signed-off-by: Sarita Mahajan <sarmahaj@redhat.com>
2023-01-25 19:19:45 +01:00
Tomáš Hozza
8624ff65f8 distro/rhel8: ensure the Azure SAP RHUI image uses appropriate config
Azure RHUI and BYOS images use the respective BYOS / RHUI default image
configuration, inheriting the defaults from a common configuration. The
Azure SAP RHUI image was incorrectly using the common configuration and
was not inheriting any settings from the RHUI configuration. As a
result, the Azure SAP RHUI image was missing the following
configuration:
 - Required GPG keys were not imported from the file system as part of
   image build.
 - No RHSM configuration was applied at all.

Add "Rhui" to the image type definition, to make it explicit that it is
RHUI-based. Make sure that the image type default configuration is based
on the common RHUI configuration. Regenerate affected image manifests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-01-24 19:57:14 +01:00
Achilleas Koutsou
73882b7289 test: update customized test manifests to include bluez
Our 'customize' test manifests include an option to disable the
bluetooth.service.  Originally this option was added for image types
that included bluez in their default package set (Fedora IoT commit) but
it was later copied to the qcow2 image type as a way of testing
customizations.

Until recently, building these caused no issues.  On distros with more
recent versions of systemd, disabling a non-existent service causes an
error and these manifests fail to build.

Added the 'bluez' package to all manifests that include the 'disable
bluetooth.service' customization and updated the manifests.  These
should all be buildable now.
2023-01-23 19:54:39 +01:00
Achilleas Koutsou
7f1a0a76b1 test: update manifests for "rhel-8"
The format-request-map is updated to remove the override for the
customized qcow for rhel-8.
The rhel-8 manifests are now identical to the rhel-87 counterparts.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
24ef584be9 Update repository configs for RHEL 8 (no minor)
- repositories/: add google-compute-engine and google-cloud-sdk repos to
  package repositories.
- test/data/repositories/: add rt, rhui, and rhui-azure to test
  repositories.
- test-case-generators/: update unversioned rhel-8 repos to point to
  RHEL 8.7 snapshots.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
5db70ed3f5 test: generate manifests for "rhel-9"
These are identical to the rhel-91 counterparts.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
7c8b9f4da8 Add repository configs for RHEL 9 (no minor)
Release repositories (in repositories/) for RHEL 9 are the CDN repos
without a minor release, which should always track GA.

Test repositories (in test/data/ and test-case-generators/) point to
RHEL 9.1, the current GA.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
c049499322 test: use kernel-rt-core in ostree tests for CS8 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
257684d9db test: update RHEL 8.x and CS9 edge commit and container manifests 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
c50691c6bc test: update RHEL 8.x and CS8 edge installer manifests 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
1ec7de4caf test: update RHEL 8.x and CS8 image installer manifests 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
d91b2a7571 test: update RHEL 8.x and CS8 edge simplified installer manifests
The changes in these manifest are the same as for the edge raw image.
The installer definition isn't changed, only the raw image.
2023-01-18 11:50:35 +01:00