Commit graph

2591 commits

Author SHA1 Message Date
Achilleas Koutsou
62dcd99a9a distro/rhel8: update image installer to new definitions
Using the same pipeline functions as Fedora and RHEL 9 and copied the
image function from RHEL 9.  The most notable change is the replacement
of the deprecated bootiso.mono stage with the more granular stages.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
b888a170a2 distro/rhel8: update edge simplified installer to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
e2b1baf47c distro/rhel8: update edge raw image to new definitions
Using the same pipeline code as RHEL 9 and Fedora introduces the
following changes to the image:
- ostree.config: moved and uses the stage mount instead of the old
  stage-specific options.
- lock root password like we do in Fedora and RHEL 9.
- set keymap to us and locale to C.UTF-8 like in Fedora and RHEL 9.
- grub2 contains kernel options and unified set to true.  This stage
  also now uses the ostree mount options to set up the deployment when
  running.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
8fa3f6cc5c distro/rhel8: update tar image to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
97ed09cd69 distro/rhel8: update vmdk images to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
d3369d1c76 distro/rhel8: update gce images to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
8443464096 distro/rhel8: gce-specific platform override
The gceX86 platform embeds the X86 platform and overrides the
GetPackages() method to exclude the grub2-pc package.

The gce image is built as UEFI only, does not include 'grub2-pc', but we
enable BIOS in the platform config for all the other side-effects: grub
config options and grub2.inst stage.

See the image type documentation for more information:
d12d9674d6/image-types/rhel8/google-gce.md (rhel-8-byosrhui--rhel-9-byos-image-differences-compared-to-googles-image)
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
91e2a62654 distro/rhel8: make gce rhsm config conditional
We don't have distro-based conditions in the pipeline generator
functions anymore.  All config conditions must be defined at the distro
level.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
9af2b2accf distro/rhel8: update azure images to new definitions
Move image type definitions to the top of the file and convert them to
functions.
Replace the pipeline function with the liveImage image function.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
e1ebb55d0a distro/rhel8: update ami and ec2 images to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
0b263d5478 distro/rhel8: update qcow2 and openstack to new definitions
Copy osCustomizations() and liveImage() functions from RHEL 9.
Delete unused functions.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
f0b7528ab6 distro/rhel8: add support for imageFunc on image types
Add image, environment, and compression to the imageType struct.

Define two new methods: PackageSetsNew() and ManifestNew()

These get called by the corresponding base methods PackageSets() and
Manifest() when imageType.image is defined.  They will serve to
transition images to the new framework while also supporting the old
until all image types are updated.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
a0cf527716 distro/rhel8: image type separation: installer and tar 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
b00aaa06ea distro/rhel8: image type separation: gce 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
801affc26a distro/rhel8: image type separation: vmdk 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
fd93f47d3f distro/rhel8: image type separation: qcow2 and openstack
Continuing image type splitting.

Constructor for qcow2 type requires the distribution object to determine
whether to add RHSM to the image config (RHEL only).
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
8fd33b1590 distro/rhel8: image type separation: ami and edge
Start splitting image type definitions into separate files by logical
groups (mostly by footprint and cloud platform) for easier navigation,
like we did for rhel9.

Split AMI and Edge image types; the rest will follow in separate
commits.

Image specific package sets are defined in the file for the image type
grouping instead of the package_sets file.

A notable difference with the way it was done in rhel9 is that every
image type is defined in a function rather than a global where possible
and a function when distro version specific configuration is needed.
This is done for consistency and the change will likely be done in the
other distributions as well.
Also, instead of passing only required values to the image type
constructor (for example, osVersion and a RHEL boolean), we pass the
whole distribution object and each constructor can read whatever
information it needs.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
0f78b65e4e distro/rhel8: configure and add platforms to image types
Add platform attribute to imageType.
Create platform configurations for each image type, copied from RHEL 9.
Currently this has no effect on the image definition / manifest.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
abdc24a245 distro/rhel8: move imageType implementation to separate file 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
08b1876951 distro/rhel8: move architecture implementation to separate file 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
47f935f8b7 distro: remove HostDistro contructors
The host distro object was identical to the regular distro objects for a
while now.  The constructors in the registry have been aliases to the
base constructors for a long time.

- Deleted all HostDistro constructors from the distributions.
- Changed the supported distro list to only contain base constructor
  functions.
- The host distro in the distro registry is a copy of the base distro
  that matches the host and does not call a separate constructor.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
fcc8437b22 distro/rhel9: inline distribution structs
Inline the distribution structs in the common constructor.
Make the same changes that were made to RHEL 8:
- Remove major version argument: it's always 9
- Make the default constructor New() create the default minor version
  and rename it to plain RHEL 9.

The distroregistry now contains both rhel-9 and rhel-90, which point to
the same configuration but with different names.
The default rhel-9 should be updated to be an alias to rhel-91, the
current GA.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
1a73e08905 distro/rhel8: update distribution implementation
Update the implementation of the distro.Distro interface to match the
one in RHEL 9 and Fedora.  The main change is that the runner is a
runner.Runner and not a string.

The distroMap is replaced by a switch that initialises the distribution
struct strings based on the minor version number.

The default minor version, created with rhel8.New(), creates a copy of
RHEL 8.6 and renames it to "rhel8".
2023-01-18 11:50:35 +01:00
Antonio Murdaca
1672fb1cf6 wire ignition bp customization to simplified-installer and raw image
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-01-17 14:02:02 +01:00
Antonio Murdaca
5c7d43c9a0 gate ignition behind el92/c9s
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-01-17 14:02:02 +01:00
Antonio Murdaca
feec6ce63e inject blueprint's kargs into edge raw image
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-01-17 14:02:02 +01:00
Antonio Murdaca
cca0e773f6 support ignition in edge simplified-installer and raw-image
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
Signed-off-by: Irene Diez <idiez@redhat.com>
Co-authored-by: Irene Diez <idiez@redhat.com>
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-01-17 14:02:02 +01:00
Antonio Murdaca
c2b4caaa66 support kargs in edge blueprint
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-01-17 14:02:02 +01:00
Gianluca Zuccarelli
25faf5ab60 internal/prometheus: remove compose fail metrics
We have switched how 5xx errors are being recorded
internally and we are now recording all failures
for all endpoints. As a result, a dedicated metric
only for compose failures is no longer required.
2023-01-12 12:55:01 +01:00
Gianluca Zuccarelli
08aa1e99a1 worker/server: log unresponsive job removal
Re-add the logging for when unresponsive heartbeats
are being removed so we can verify that they
are correctly being logged as 5xx errors.
2023-01-10 09:29:33 +01:00
Ondřej Budai
b997142db0 common: merge all *ToPtr methods to one generic ToPtr
After introducing Go 1.18 to a project, it's required by law to convert at
least one method to a generic one.

Everyone hates IntToPtr, StringToPtr, BoolToPtr and Uint64ToPtr, so let's
convert them to the ultimate generic ToPtr one.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-09 14:03:18 +01:00
Ondřej Budai
0359647a82 go.mod: update to Go 1.18
Fedora 35 support was dropped, so we can update to a newer Go.

Stable RHEL 8 and 9 and Fedora 36 ships Go 1.18, so let's switch to it.

"//go:build" directives are now apparently enforced by go fmt, so that's why
there were added.

Also, all the github actions were adjusted to use Go 1.18.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-09 14:03:18 +01:00
Ondřej Budai
4bafe1ead9 remove Fedora 35 support
Fedora 35 is going EOL on Tue 2022-12-13. At the time of writing this commit
message, that's the next day. As we do releases on Wednesdays, the next
release will never find its way to F35 and thus, there's no point in keeping
support for it.

Let's delete everything that relates to Fedora 35. If there's something that
cannot be deleted (e.g. CI containers based on F35), let's upgrade it to F37.

TestCrossArchDepsolve now uses CentOS Stream 8 because RHEL 8.4 cannot read
F37 repository metadata. This is a similar issue to
https://bugzilla.redhat.com/show_bug.cgi?id=2004853 . Basically, newer
repositories can be only read by libmodulemd >= 2.11.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-06 11:34:50 +01:00
Achilleas Koutsou
e217c6069e distro/rhel9: update image type lists in tests 2022-12-16 15:40:09 +01:00
Achilleas Koutsou
d3b0b2218b distro/rhel9: add Azure aarch64 platform and include image types
Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
2a0e935fc3 distro/rhel9: add partition table for aarch64 azure-rhui
Copy of the x86_64 partition table with BIOS partition removed.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
617ec35c57 distro/rhel9: clarify partition table error message
The previous error didn't make it clear where the issue was coming from.
Now it explains that the problem is that a partition table for a given
architecture isn't specified on the image type.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
ee7429880f distro/rhel9: remove arch-dependent packages from Azure common
These are already added by the platform.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Irene Diez
76728818c9 internal/distro/rhel9: handle ignition.embedded for edge
Signed-off-by: Irene Diez <idiez@redhat.com>
2022-12-15 11:34:17 +00:00
Irene Diez
428dd169e4 internal/distro/rhel9: handle ignition.firstboot for edge
Signed-off-by: Irene Diez <idiez@redhat.com>
2022-12-15 11:34:17 +00:00
Irene Diez
2f2ef709cd internal/blueprint: add ignition customizations
This allows a user to configure the system via `edge-simplified-installer`
using an ignition configuration specified in the blueprint.

This ignition config can be embedded in the ISO as a Base64
encoded file (ignition.embedded.data) or as a file
containing the URL where the ignition config file is served
(ignition.embedded.url).

The user can also instead specify an URL serving an ignition
config file that will passed as a karg and be fetched at first
boot (ignition.firstboot.url).

Signed-off-by: Irene Diez <idiez@redhat.com>
2022-12-15 11:34:17 +00:00
Achilleas Koutsou
83cb043daa distro/rhel9: conditionally enable users module for edge installer
In RHEL 9, for the edge installer, only enable the users module when it
is required for creating a user specified in the blueprint or request.
2022-12-13 20:33:27 +00:00
Achilleas Koutsou
a0528d2e53 osbuild: remove 'users' boolean argument from NewAnacondaStageOptions()
Drop the argument altogether.
2022-12-13 20:33:27 +00:00
Achilleas Koutsou
a63fe649cb manifest: don't use the users flag in NewAnacondaStageOptions()
Before we only had one optional kickstart module we would enable that
was Users, so we just had a single boolean for adding it.  Now that we
often need to add multiple modules, keep the default ones in the
NewAnacondaStageOptions() function, but only have a single argument for
adding additional, optional modules.  If the user module needs to be
enabled, add it to the list of additional ones.
2022-12-13 20:33:27 +00:00
Achilleas Koutsou
6bfa3dd366 image: add ISOLinux stage only for x86_64
The previous fix (9e66ee13e7) only fixed
half the problem with this bug.  The ISOLinux stage was still added to
the iso-tree pipeline for Anaconda builds.

This is now removed.
2022-12-13 21:14:55 +01:00
Antonio Murdaca
6d15dc144c distro/rhel: make edge images properly sysroot.readonly=true
Make edge raw images (both the raw image type and the same in the edge
simplified installer) mount the /sysroot as read-only.  This was already
done in Fedora 37+ (547f7a66b3).

Copied commit message from 6f89e9d499 to a
comment in all places where the accompanying "rw" kernel option is set
explaining the requirement, since the option is counter-intuitive.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
Co-Authored-By: Achilleas Koutsou <achilleas@koutsou.net>
2022-12-13 13:24:20 +01:00
Achilleas Koutsou
eaf3dc2ecc manifest: always add inst.stage2 kernel option for Anaconda
The bootiso.mono stage in osbuild that we used until recently adds the
inst.stage2 option unconditionally [1] whereas the current grub2.iso
stage that we use now doesn't.

[1] 8511add169/stages/org.osbuild.bootiso.mono (L369)
2022-12-13 07:49:32 +00:00
Sanne Raymaekers
369f237d89 gen-manifests: add ostree rhsm option 2022-12-12 13:42:52 +01:00
Sanne Raymaekers
cb127cd1b0 distro/rhel9: add consumer certificates when ostree rhsm is true 2022-12-12 13:42:52 +01:00
Achilleas Koutsou
19ec3be6bd manifest: return inline FDO cert from CoreOSInstaller pipeline
The CoreOSInstaller pipeline supports adding inline data to the tree for
the FDO cert.  This needs to be returned by the pipeline object via the
getInline() method to attach the necessary data to the Sources array in
the manifest.
2022-12-11 12:37:37 +00:00