Commit graph

53 commits

Author SHA1 Message Date
Achilleas Koutsou
a9842d5e9c test-case-generators: enable azure aarch64 manifest generation
Add the rhui-azure rpmrepo snapshots to aarch64 repositories.
The repos are labelled as x86_64 but they're actually 'noarch' and we
name them x86_64 when creating the snapshots.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Sanne Raymaekers
369f237d89 gen-manifests: add ostree rhsm option 2022-12-12 13:42:52 +01:00
Achilleas Koutsou
b9098c64c4 test: add valid parent commit ID to test manifests
The previous value for parent was not a valid commit ID.  In a regular
compose request, the parent ref is resolved before being added as a
source in the manifest.  However, when building test manifests, since
the values aren't real, we don't resolve the ostree refs, meaning that
the test manifests weren't valid — they failed validity checks if run in
osbuild.

Replaced the fake parent ref with a fake parent commit ID
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff".
The manifests still aren't buildable, since they don't point to a valid
ostree repository or commit, but now they're at least valid (in the
technical sense).
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
9ae3d03f88 tools: add package to image-installer manifest request
Add podman to the image installer's packages when generating test
manifests.
2022-11-28 17:20:49 +01:00
Achilleas Koutsou
c5f6aca53b format-request-map: iot-commit with container
Add manifests for container embedding in iot-commits for Fedora.
2022-11-28 17:20:49 +01:00
Achilleas Koutsou
04a7cd36c7 format-request-map: new manifests for container embedding
Add manifests for container embedding in edge-commits and qcow2s.
Limit qcow2 container embedding to RHEL 9.1 for now since it's not
supported on Fedora or RHEL 8 yet.
2022-11-28 17:20:49 +01:00
Brian C. Lane
12c7f12d16 tools: Add new azure-sap-rhui image type
It needs to be listed in format-request-map.json, and the repo snapshots
required to depsolve the packages need to be added to repos.json

NOTE: The snapshots are from https://github.com/osbuild/rpmrepo/
2022-11-18 16:53:22 +01:00
Achilleas Koutsou
cdfd305e0f test: update format request map and test manifests 2022-09-20 18:29:28 +02:00
Tomas Hozza
117f5a48f9 format-request-map.json: fix azure-rhui definition
There was a missing `overrides` property in the `azure-rhui` request
definition, which resulted in:

```
$ ./tools/test-case-generators/generate-test-cases --distro rhel-90
--arch x86_64 --image-types azure-rhui --store /dev/null --output
/home/thozza/devel/osbuild-composer/test/data/manifests
--keep-image-info
Traceback (most recent call last):
  File "/home/thozza/devel/osbuild-composer/./tools/test-case-generators/generate-test-cases", line 176, in <module>
    main(args.distro, args.arch, args.image_types, args.keep_image_info, args.store, args.output)
  File "/home/thozza/devel/osbuild-composer/./tools/test-case-generators/generate-test-cases", line 153, in main
    if distro in test_case_request["overrides"]:
KeyError: 'overrides'
```
2022-09-15 08:50:33 +02:00
Achilleas Koutsou
eb731e031d test: generate new manifests
Add new image type to format request map and generate manifests.
2022-09-13 16:06:19 +01:00
Ondřej Budai
3e25f5ef76 remove all traces of fedora 34
Fedora 34 is EOL, let's remove all traces of it, including:

- distro definition
- repositories (and test one)
- test manifests
- special package set rules
- hacks from the spec file

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-07-18 20:38:33 +02:00
Achilleas Koutsou
577ea9eb95 format-request-map: minor fixes and updates
- azure-rhui filename fix (.xz)
- azure-rhui doesn't need distro override
- minor formatting fixes
2022-07-08 09:30:34 +01:00
Christian Kellner
c5a5da5f56 distro/fedora: add container image type
Add a container image type that is based on the existing fedora
container image. There is a delta in terms of the configuration
because osbuild does not yet provide all the neccessary means,
but the package set is already very close.
2022-06-29 10:02:46 +02:00
Juan Abia
967c8734a1 test-case-generators: update repos and add img types overrides
overrides where needed for `qcow2` and `simplified-image-installer` images on specific distros. Also some repos needed to be updated to newer versions.
2022-05-13 21:01:37 +03:00
Tomas Hozza
1aabc1870d Image tests: don't use customizations for rhel-85/90beta edge-installer
Do not apply the user customizations on edge-installer on RHEL-85/90beta,
since they are not supported there yet. The way we generate image test
cases from the `format-request-map.json` makes even the customized image
types being generated for all distributions automatically.
2022-05-13 21:01:37 +03:00
Tomas Hozza
035b616308 test-case-generators: add request definitions for edge-raw-image
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-05-13 21:01:37 +03:00
Achilleas Koutsou
1ff36bce9a tools/format-request-map: add 'core' group to qcow2 customize
Removed in 2beb707def, possibly
accidentally.
The affected manifests were not regenerated based on this change so
they all already contain the core group.
2022-05-13 13:25:34 +02:00
Jordi Gil
00a84d1fdc distro: allow user and group customizations for iot-installer 2022-05-09 12:25:21 +02:00
Jordi Gil
2beb707def distro/fedora: regenerated test manifests 2022-05-09 12:25:21 +02:00
Achilleas Koutsou
d357f92f91 test: add fs customization to qcow2 test case
Added a filesystem customization to the qcow2 test case to test that the
filesystem is converted to an LVM layout.
Set overrides for distros that don't support fs customizations.
2022-04-29 08:55:36 +02:00
Tomas Hozza
0219ad1f43 RHEL-86: add gce-rhui image type
Add the `gce-rhui` image type intended for Google Compute Engine. The image
uses Google's RHUI infrastructure to access Red Hat content.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-04-14 19:07:31 +01:00
Tomas Hozza
5d27b7c784 RHEL-90: add gce image type
Add the `gce` image type intended for Google Compute Engine. The image
is BYOS - bring your own subscription and requires registering in order
to access Red Hat content.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-04-14 19:07:31 +01:00
Achilleas Koutsou
15243f1dc5 distro: allow user and group customizations for edge-installer
Followup from, f34380d5b5 and
3a1765a5a8, copied to the rest of the RHEL
distro definitions.

For now, these customizations have no effect on the manifest.

The new `with-users` variants of the edge-installer test cases include
the user customizations in the blueprint, but the manifests are
(currently) the same as the corresponding base cases.
2022-04-06 12:09:09 +02:00
Achilleas Koutsou
11be84c225 test: add RHEL 8.4 rhel-edge-installer test case
Include RHEL 8.4 rhel-edge-installer in the test cases.
2022-04-06 12:09:09 +02:00
Achilleas Koutsou
3ac1f940a4 format-request-map: add installers with users
Add two new test cases:
- image-installer-with-users
- edge-installer-with-users
2022-03-28 14:08:57 +02:00
Christian Kellner
f91d8c6292 distro/rhel86: add support for azure marketplace
Add support for building images for the Azure marketplace: add a
new image type "azure-rhui" that can be used to build images
tailored to the Azure marketplace.
Add two sample manifests for 8.5 and 8.6, but note that even the
8.5 is using the 8.6 distro definitions. Also no image-info is
included since `image-info` cannot (yet) handle LVM setups and
the azure marketplace images use the LVM setup.
2022-02-27 22:03:36 +01:00
Achilleas Koutsou
56839545ea test-case-generators: support generating edge-installer manifests
Adds ostree params to the request to generate a test manifest for
edge-installers and necessary customisations in the blueprint for the
edge-simplified installer.  The manifest is not buildable but works for
checking for changes in the pipeline and packages for the installers.
2022-02-26 15:55:56 +00:00
Tomas Hozza
f43d9f4744 Add missing F34 and F35 image test cases
Add F34 and F35 image test cases for all remaining image types, which
were previously not tested. With this PR, image test cases are now
generated for all image types on all architectures as supported by the
Fedora distro definition.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-02-09 15:29:33 +01:00
Tomas Hozza
3025bbb775 Tools: add 'no-image-info' option to image test case requests
Add a new option `no-image-info`, which can be specified for an image
type in `format-request-map.json` in case the image can not be analyzed
using `image-info` and thus it should not be run as part of generating
the image test case.

This is the case for e.g. the `image-installer` image type in RHEL-8.6,
which effectively breaks generating all image test cases for RHEL-8.6
due to `image-info` failing to analyze the resulting image.

This change will allow us to consistently generate image test cases
(manifests only) for all image types, which were so far not covered by
the image testing.

Modify the `generate-test-cases` script to recognize the `no-image-info`
option in the `format-request-map.json`

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-12-21 09:59:17 +01:00
Tomas Hozza
0e90217fcc RHEL-9.0: add EC2 SAP image definition.
The image is not available via Weldr API, because it requires RHUI
client RPMs.

The content and configuration is based on RHEL-8.6 EC2 SAP image, since
there is no definition for the RHEL-9 SAP image yet.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-10-08 16:34:55 +01:00
Tomas Hozza
008dfcc5b5 generate-test-cases: drop --with-customizations option
Generating image test case with all possible blueprint customizations is
supported only for `qcow2` image type. Generating `qcow2` images with
customizations was not a lot of fun. One had to use a special CLI option
for this case.

To streamline the generation of image test cases, drop the
`--with-customizations` option from the `generate-test-cases` script and
move the functionality to `format-request-map.json` by defining a new
`qcow2-customize` test case. This is very similar to what `*edge-rt`
test case already uses. This mean that when the test case for `qcow2`
image type is being generated, actually two test cases will be
generated. The filesystem customizations since RHEL-8.5 are handled
through distro-specific `overrides`.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-09-23 09:20:47 +02:00
Tomas Hozza
6502f527fd format-request-map.json: remove redundant overrides
Some of the `overrides` specified in `format-request-map.json` were
redundant, because the same blueprint customizations were already
specified in the image compose-request. Thus these values had no
additional values.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-09-23 09:20:47 +02:00
Tomas Hozza
2d2d9fe7f9 generate-test-cases: check supported_arches from format-request-map.json
Some image type test cases require additional repositories, which are
not available for all architectures. However, when an image type test
case is specified in the `format-request-map.json`, it is generated on any
architecture.

This behavior is creating issues when generating `*edge-commit` image
type test cases. This is because the `format-request-map.json` contains one
additional definition for `*edge-commit-rt`, which includes `kernel-rt`
package. However repositories with this package are available only for
x86_64. Therefore, when generating image test cases for `*edge-commit`,
the `generate-test-cases` script always generates two test cases,
but the generation of `*edge-commit-rt` always fails on non-x86_64
architectures.

Add a new optional member to the image type test case object in
`format-request-map.json`, called `supported_arches`. Its value is a
list of strings, specifying the supported architectures of the image
type test case. In case the member is not specified, the image test
case is supported on any architecture.

Extend the `generate-test-cases` script to skip image type test case
generation in case the case has the `supported_arches` specified and the
requested architecture is not in the list.

Fix #1478

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-09-21 14:41:38 +02:00
Achilleas Koutsou
ab264abd76 distro/rhel85: tar-installer -> image-installer
Renamed tar-installer to image-installer.
This is a more appropriate name:
- It disassociates the image type from the "tar" image type. The two
  should not be perceived to be connected.
- It's more descriptive. The format of the payload (tar) isn't relevant
  to the purpose of the image type.
2021-08-11 01:31:47 +02:00
Achilleas Koutsou
7d08535232 test/data: Add tar-installer test manifest
Added to format-request-map and generated manifest.
No image-info since ISOs aren't supported by the tool. The manifest is
useful only for detecting changes in the image type definition.
2021-08-05 16:13:46 +02:00
Tomas Hozza
c97420e879 rhel85: add definitions of RHEL ec2 and ec2-ha images
Add new image type definitions `ec2` and `ec2-ha` representing the
official RHEL ec2 image types.

Add a `xzArchivePipeline()`, which returns a pipeline producing a XZ
archive from a file produced by a different pipeline.

Add rpmrepo snapshots for `rhui` and `ha` repositories used to generate
image test cases. `rhui` is used by the `ec2` image and it is available
on x86_64 and aarch64 architectures. `ha` is used by the `ec2-ha` image
and it is available only for x86_64.

The new image type definitions are currently not used by any
API test case.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-02 19:05:09 +02:00
Achilleas Koutsou
4651b8ba22 tools: add 8.5 edge types to format request map
For test case generation. These are the new names used by the 8.5 edge
image types.
2021-06-29 17:26:43 +01:00
Achilleas Koutsou
f317b0a3d9 test/data: test cases for rhel-edge-container 2021-03-17 18:12:17 +00:00
Tom Gundersen
167fdc44bc test/data/manifests: avoid duplicate booting
We have integration tests that boot most of the image types, let
the image tests focus on the actual content of the images, shaving
off considerable CI time.

The only missing one is OpenStack (which should be ported over) and
tar (which we need to define the integration test for).

Signed-off-by: Tom Gundersen <teg@jklm.no>
2021-03-08 13:22:26 +01:00
Achilleas Koutsou
8438078c50 tools: test cases for alt kernel selection
Two new test cases added to format-request-map and test cases are
generated.

1. kernel-rt for RHEL images:
Requires new package repositories for RHEL 8.3 and 8.4.
Creates an OSTree commit with the `kernel-rt` as a customization.

2. kernel-debug for Fedora images:
kernel-rt isn't included in the official fedora repositories.  Using
kernel-debug at least tests the feature with the fedora-iot-commit type.
2021-02-16 13:51:26 +00:00
Tomas Hozza
89df6ab328 image-tests: remove 'subscription' customization, update repos, regenerate
Remove 'subscription' customization from 'format-request-map.json',
because it currently has no effect on image test cases. The reason is
that this customization of image is possible only via Cloud API in
composer and setting imageOptions. However image test cases currently
support image customization only via Blueprint customizations.

Update repo links in 'repos.json' to the latest rpmrepo snapshots.

Regenerate all image test cases affected by updates to 'repos.json'
and 'format-request-map.json'. This includes all `rhel-8` and `rhel-84`
image test cases.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-02-01 23:20:01 +00:00
Ondřej Budai
8bbe2b9c0e test/image: regenerate the test cases
This commit does several things:

1) Changes the Fedora 33 repos in the test case generator from development
   to release ones.

2) Fixes format-request-map.json so we can generate fedora-iot-commit
   "images".

3) Regenerates all the cases.
2020-11-11 09:52:28 +01:00
sanne raymaekers
9404b0640a test: Regenerate the rhel-8 cases to add subscriptions 2020-09-22 11:38:28 +02:00
Alexander Todorov
0469be7a22 tests: Change boot typo to openstack. Refs #876
this will cause the images to be uploaded and booted in our
OpenStack cluster.
2020-08-07 19:58:37 +02:00
Major Hayden
0f32f35756 📦 Use raw image format for AWS
Although the vhdx format is smaller than raw, AWS often has some issues
booting instances from an imported vhdx snapshot. The raw format seems
to boot consistently at AWS.

Fixes #754.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-02 13:11:11 -05:00
Tom Gundersen
654eb9d280 tools/test-case-generator: add iot and edge test-case generation 2020-06-11 20:44:17 +02:00
Tom Gundersen
ab276bdb77 tools/test-case-generator: add more options
Allow individual test-cases or sub-sets of test-cases to be generated
more easily.

We allow explicit skipping of image-info generation (and hence the
osbuild run), and also individual image types to be specified.

Also drop distros and image types that are no longer supported.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-06-10 19:25:54 +02:00
Ondřej Budai
e235fdedb3 tests/image: boot the vhd images on Azure
Previously, vhd images were tested using QEMU. This commit changes that to
boot them in the actual Azure infrastructure.

Azure VMs have quite a lot of dependencies - a network interface, a virtual
network, a network security group, a public ip address and a disk. Azure CLI
and Azure Portal handle the creation of all these resources internally.
However, when using the API, the caller is responsible to create all these
resources before creating an actual VM.

To handle the creation of all the resources in the right order, a deployment
is used. A deployment is a set of resources defined in a JSON document.
It can optionally take parameters to customize each deployment. After the
deployment is finished, the VM is up and ready to be tested using SSH.

Sadly, the deployments are a bit hard to clean-up. One would expect that
deleting a deployment removes all the deployed resources. However, it doesn't
work this way and therefore it's needed to clean up all resources "manually".
For this reason, our deployment sets a unique tag on all the resources created
by the deployment. After this test is finished, the API is queried for all
the resources with the tag and then, they're deleted in the right order.
2020-04-27 20:34:20 +02:00
Ondřej Budai
83a3a8d821 change the format of the ami image type to vhdx
Prior this commit the ami image type produced raw.xz images. This was bad for
two reasons:

- The upload was broken because AWS doesn't support tar.xz format
- XZ compression is terribly slow

This commit changes the format to vhdx, which is supported by AWS and also
quite quick. See https://github.com/osbuild/osbuild-composer/issues/257
why vhdx was chosen.

Fixes #257
2020-04-24 15:27:39 +02:00
Ondřej Budai
7dd09443cf tests/image/ami: test ami images on AWS
Prior this commit the ami images were tested locally using qemu. This does
not reflect at all how they're used in practice. This commit introduces
the support for running them in the actual AWS. Yay!

The structure of code reflects that we want to switch to osbuild-composer
to build the images soon.
2020-04-06 16:38:28 +02:00