Commit graph

352 commits

Author SHA1 Message Date
Tomas Hozza
795294d98f RHEL-84: 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
Tomas Hozza
77b5ef459d RHEL-85: 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
6ffe63442e RHEL-85: 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
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
db75c39c4d RHEL-86: 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
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
Tomas Hozza
46e15794f0 image-info: support analyzing gce image type
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-04-14 19:07:31 +01:00
Tomas Hozza
bd81506831 image-info: read the firewall default zone
Modify affected image manifests.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-04-14 19:07:31 +01:00
Ygal Blum
bee14bf392 OSBuild - add support for generic S3 services
jobimpl-osbuild
---------------
Add GenericS3Creds to struct
Add method to create AWS with Endpoint for Generic S3 (with its own credentials file)
Move uploading to S3 and result handling to a separate method (along with the special VMDK handling)
adjust the AWS S3 case to the new method
Implement a new case for uploading to a generic S3 service

awscloud
--------
Add wrapper methods for endpoint support
Set the endpoint to the AWS session
Set s3ForcePathStyle to true if endpoint was set

Target
------
Define a new target type for the GenericS3Target and Options
Handle unmarshaling of the target options and result for the Generic S3

Weldr
-----
Add support for only uploading to AWS S3
Define new structures for AWS S3 and Generic S3 (based on AWS S3)
Handle unmarshaling of the providers settings' upload settings

main
----
Add a section in the main config for the Generic S3 service for credentials
If provided pass the credentials file name to the osbuild job implementation

Upload Utility
--------------
Add upload-generic-s3 utility

Makefile
------
Do not fail if the bin directory already exists

Tests
-----
Add test cases for both AWS and a generic S3 server
Add a generic s3_test.sh file for both test cases and add it to the tests RPM spec
Adjust the libvirt test case script to support already created images
GitLabCI - Extend the libvirt test case to include the two new tests
2022-04-07 15:01:01 +02: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
0554da5a4d distro-arch-imagetype-map: change indent to 2 spc
Change indent to match the rest of the json files in the project.
2022-04-06 12:09:09 +02:00
Jakub Rusz
b782b6cced tools/define-compose-url: change url back to nightly
The latest nightly link for 8.6 was missing only by accident, changing
back as it's fixed already.
2022-04-04 12:11:59 +02:00
Ondřej Budai
fd49ed9a07 repositories: update key for RHEL 9.0
RHEL 9.0 will ship a brand new auxiliary key. Let's use it everywhere in our
RHEL 9 stuff. Taken from current RHEL 9.0's redhat-release package.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-04-01 19:22:23 +02:00
Christian Kellner
45b1fc3cd1 osbuild2: honor GPG key setting for rpm inputs
We should honour `pkg.CheckGPG` when creating the file inputs for the
rpm stage. This was lost in the transition from v1 to v2 manifests.

Regenerate image test manifests.

Co-authored-by: Tomas Hozza <thozza@redhat.com>
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-03-30 14:32:28 +02:00
Achilleas Koutsou
5261987726 define-compose-url: change to development for 8.x
The nightly compose (currently) only has a 'latest' directory for 8.7.
Switching to the development composes which have 'latest' for 8.4
onwards.

Enable -x in script for easier troubleshooting.
2022-03-28 14:08:57 +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
Tomas Hozza
60db6ad06f image tests: update GPG keys used for RHEL-9.0 repos
SHA-1 key is no longer supported, update it with a new one from
redhat-release.

Related rhbz#2058497

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-03-23 13:22:13 +01:00
Antonio Murdaca
b2d18166de test/data/manifests: regenerate
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2022-03-14 17:31:40 +01:00
Ondřej Budai
72de1b3bbe packer: don't save the AMIs on PRs
This should save us a ton of resources as we don't use AMIs from PRs.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-11 09:06:43 +01:00
Ondřej Budai
ad15179faf packer: build Fedora images
The decision logic which jobs to run is quite confusing but that's how we
roll for now:

Jenkins builds RHEL images only on main
Schutzbot builds RHEL images only in PRs
Schutzbot builds Fedora images on both PRs and on main

To achieve this, the commit re-enables running Packer on main on Schutzbot.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-11 09:06:43 +01:00
Ondřej Budai
ec070612ff packer: remove RHEL and x86_64-specific bits
Arch was easy.

For passing the repository distribution and osbuild_commit (it can be
different for each distro), I decided to go in the way of ansible
inventory directories. It adds a bit of structure but I think it's
the most clean solution.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-11 09:06:43 +01:00
Ondřej Budai
e45578d3b0 packer: remove the ami_id variable
We want to build multiple images at once so they have to be defined elsewhere.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-11 09:06:43 +01:00
Juan Abia
4c5de045ff test: add test purpose
Most test scripts don't have any documentation regarding it's purpose,
although it can be guessed by the code. There's value in adding this
small comment.

[skip-ci]
2022-03-09 22:46:25 +01:00
Christian Kellner
98aba06ca5 tools/image-info: support inspecting LVM2 layouts
When encountering an LVM2 layout, activate all its logical volumes
so that they can be mounted.
NB: we need to pass "norecovery" to the mount options because LVM
does not setup the device mapper tables read-only even though the
underlying loopback device is and then xfs will try to write to
its journal and the kernel will panic. Attempts to reload the DM
tables as readonly didn't work.
NB: this will not work if we are trying to inspect an image that
has a volume group name that is also present on the host. We
could open the image file read-write and modify its vg name, but
that would mean modifying the image file and thus we would need
to copy it first.
Pass `-c /dev/null` to `blkid` to force it not to use its cache.
2022-02-28 17:09:30 +01:00
Christian Kellner
932a8a0333 tools/image-info: try simplifying device handling
When iterating over partitions, only record the ones that have a file-
system and save them in a filesystem to device map. Then use that for
mounting. This also prepares the way for LVM and LUKS where there is
not a 1:1 mapping between partition and filesystem.
2022-02-28 17:09:30 +01:00
Christian Kellner
1a6f5ff167 tools/image-info: don't crash on lvm layouts
Image info currently cannot handle LVM and will abort with something
like:
  mount: /tmp/tmpzwlch91r: unknown filesystem type 'LVM2_member'.
Detect LVM setup and just exit for now.
2022-02-27 22:03:36 +01: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
Christian Kellner
fc4b50e9db tools: handle container env in generate-test-cases
When we are running inside a container we generally wont be booted
with systemd and thus systemctl will fail. Fall back to check for
the dnf json socket by checking the path exists and bail otherwise.
2022-02-27 20:55:03 +00: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
Xiaofeng Wang
6c4e179171 test: Add work around for bug bz#2057769
bz#2057769 blocked UEFI vm test

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-26 00:27:21 +00:00
Jakub Rusz
3fb80d199d tests/libvirt: add some regression checks
This is just a simple check to verify rhbz#2004401 and
rhbz#2003038
2022-02-25 13:25:06 +02:00
Jakub Rusz
7006a53e71 tools/provision: use upstream EPEL-9
EPEL-9 now exists upstream, let's use it.
2022-02-24 17:54:30 +01:00
Achilleas Koutsou
eda78a9a99 Update CentOS Stream 8 repositories 2022-02-24 17:07:34 +01:00
Achilleas Koutsou
fa209fe747 test: generate aarch64 image installer manifests
Added to imagetype map for test case generators and generate new
manifests.
2022-02-24 16:30:04 +01:00
Xiaofeng Wang
8051ddced5 test: Remove "ansible-galaxy collection install"
Since "ANSIBLE_STDOUT_CALLBACK=yaml" has been removed from all
ostree test script, "ansible-galaxy collection install" should be
removed as well
2022-02-22 19:25:48 +00:00
Achilleas Koutsou
96e09e0322 Update cs9 test repos to latest snapshot 2022-02-18 10:39:08 +00:00
Achilleas Koutsou
f7d8535b16 tools/test-case-generators: add s390x for CS9 to test gen map 2022-02-18 10:39:08 +00:00
Achilleas Koutsou
6bc4afbcbd test,repositories: add cs9 repositories
Add rpmrepo repositories for testing.
Symlink centos-9 to centos-stream-9.
Add rpmrepo snapshot repositories to test and
test-case-generator repos.
Remove unused repositories from cs9 test repositories.
2022-02-18 10:39:08 +00:00
Achilleas Koutsou
e0822bff44 repos: update repos for test case generators
test/data/repositories:
    new snapshots for RHEL 8.6 (20220201) and 9.0 (20220208)

Switching RHEL 8.6 and RHEL 9.0 to the latest rpmrepo snapshots:
    We need updated packages for greenboot, used by edge image types, so
    we technically only need to change the architectures that are
    supported by edge, but let's update all of them for consistency.

test/data/repositories:
    Remove rhel-90 symlink to beta

Keep the rhel-90-beta.json repository definitions, but make rhel-90.json
a file that contains the previously named rhel-90-ga.json definitions.
2022-02-16 10:49:55 +01:00
Tomas Hozza
2182996aae tools/image-info: extend the gathered information
Extend the information gathered by `image-info`. This is needed to
properly inspect GCE images.

Enhancements:
 - read all ssh client configuration files
 - read all sshd configuration files
 - read all YUM / DNF repos
 - read DNF Automatic configuration
 - fix reading of DNF configuration

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-02-15 15:56:56 +01:00
Tomas Hozza
ece6452e2a Use the latest RPMRepo snapshot for RHEL-9.0 image tests
This is needed to satisfy RPM dependencies of GCP guest tools, which
will be installed on the `gce` image type.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-02-14 12:39:12 +01:00
Sanne Raymaekers
b3796a7319 tools/appsre-ansible: Explicitly specific mock config 2022-02-09 18:33:14 +01:00
Sanne Raymaekers
a173a3513d tools/appsre-build-worker-packer: Run on subscribed 8.5 machine 2022-02-09 16:54:22 +01: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
1401a7a659 test: add image test cases for Fedora 34 and 35
Delete Fedora 33 image test cases.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-02-08 10:19:52 +01:00
Achilleas Koutsou
93c0485531 tools/provision: remove json_query usage from ansible playbooks
`json_query` requires python3-jmespath which, while available in the
repos, it can sometimes cause issues when the ansible interpreter is
different from the system interpreter.
The `json_query` is only used in a handful of locations that can easily
be served by `jq`, which we use in other places already.
2022-02-03 00:24:59 +01:00
Tom Gundersen
11e2ae4528 cloudapi/v2: add koji-specific tests
These are based on the existing tests for the koji API, making sure the coverage is the same.
2022-02-01 20:28:40 +00:00
sanne
6b716a4bbc tools/appsre-build-worker-packer: Fix branch parsing on jenkins 2022-01-19 12:48:14 +01:00
sanne
a6f40f807d tools/appsre-build-worker-packer: Run entire workflow in container
Avoids the issue with artifacts that jenkins can't clean up.
2022-01-13 15:05:52 +01:00