Commit graph

30 commits

Author SHA1 Message Date
Tomas Hozza
8420f34b7a RHEL-9.0: install and enable TuneD by default on all EC2 images
Add TuneD package to the base package set for all EC2 image types,
including the `ami` image type. In addition to installing the package,
also enable the service by default. TuneD will by default auto-detect
the environment in which the image is running and set the most
appropriate TuneD profile, with exception of the `ec2-sap` image, which
explicitly sets a specific TuneD profile.

This change affects the `ami`, `ec2`, and `ec2-ha` image types on all
supported architectures.

Regenerate affected image test cases.

Related to RHELPLAN-102615
Fix #1972

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-11-24 08:51:52 +01:00
Antonio Murdaca
5005ff6184 internal: mandate installation device for the simplified installer
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2021-11-18 18:10:09 +01:00
Achilleas Koutsou
6731984326 distro: ImageType build and payload pipeline names
Each image type now implements BuildPipelines(), which returns a list of
pipeline names that set up the build environment, and
PayloadPipelines(), which returns a list of pipeline names that create
the OS image (all non-build pipeline names).

Older distros that produce v1 manifests should call the distro Fallback
functions to return the common defaults.

A Fallback function for the Exports() method is also added and called by
older distros.

All image types that produce v2 manifests (distros after RHEL 8.4)
should include the information in the image type definition and should
not rely on fallbacks for default values.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-11-16 09:49:37 +01:00
Achilleas Koutsou
a8eb58bc62 distro/rhel90: disable edge-simplified-installer image type
Critical dependency is not available yet
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
5765d5af9a rhel90: drop -ga suffix and alias from beta
`rhel-90` now refers to the RHEL 9.0 distro (rhel90 package) and the
beta is only referred to by `rhel-90-beta`.
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
6b73dc5a92 distro/rhel90: update to match 8.6 and add centos-9 alias
- Copied distro and image definitions from RHEL 8.6
    - New package set handling
    - Distribution-specific strings
    - New image types: edge-raw and edge-simplified-installer
    - Edge container with nginx
    - Removed greenboot services from edge enabled services (enabled
      automatically)
- Adapted to required changes from RHEL 9.0 Beta
- Added CentOS 9 (centos-9) alias

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
d290ff5923 distro: copy rhel90beta to rhel90
- Start of RHEL 9.0 GA definition
- Initial distro name: rhel-90-ga
- rhel-90 alias remains for rhel-90-beta for now

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
cac3fa10db distro/rhel90 -> distro/rhel90beta: rename package
- Rename rhel90 package to rhel90beta.
- Adjust all imports
- Adjust tests
2021-10-11 13:29:57 +02:00
Achilleas Koutsou
972b9ee14e distro/rhel90: rename to rhel-90-beta and alias base name 2021-10-11 13:29:57 +02: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
Achilleas Koutsou
5368ecf7fe distro/rhel90: explicitly enable greenboot services for edge
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-09-24 13:27:21 +02:00
Gianluca Zuccarelli
e41e82935d rhel90: enable multi-level mountpoints
Previously it was only possible to configure separate partitions
for mountpoints in the allow list and their immediate subdirectories
only i.e. /var & /var/log
This fix allows for an arbitrary level of mountpoints, i.e. /var/log/audit,
/var/a/b/c/d/e and so on
2021-09-15 10:46:55 +02:00
Diaa Sami
20501f4e58 Fix package sets for tar installer image type 2021-09-10 15:17:54 +02:00
Gianluca Zuccarelli
78e042b47a distro: rhel90 tar-installer image type 2021-08-26 01:52:03 +02:00
Gianluca Zuccarelli
8374af3e6d distro: rhel90 custom filesystem support 2021-08-25 13:18:12 +02:00
Gianluca Zuccarelli
382b5370c0 distro: export common types
squash

unused type
2021-08-25 13:18:12 +02:00
Ondřej Budai
7b03db05c3 distro/rhel90: drop rhel86 alias
It doesn't ever make sense to alias 90 as 86.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
6693ebc59b distro/rhel90: rename everything from 85 to 90
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
d6ade6386d distro/rhel90: copy everything from rhel85
rm internal/distro/rhel90/*
cp internal/distro/rhel85/* internal/distro/rhel90/

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Martin Sehnoutka
1ada606ed8 internal/rhsm: introduce package that handles subscriptions
The problem: osbuild-composer used to have a rather uncomplete logic for
selecting client certificates and keys while fetching data from
repositories that use the "subscription model". In this scenario, every
repo requires the user to use a client-side TLS certificate. The problem
is that every repo can use its own CA and require a different pair of
a certificate and a key. This case wasn't handled at all in composer.

Furthermore, osbuild-composer can use remote workers which complicates
things even more.

Assumptions: The problem outlined above is hard to solve in the general
case, but Red Hat Subscription Manager places certain limitations on how
subscriptions might be used. For example, a subscription must be tight to
a host system, so there is no way to use such a repository in osbuild-composer
without it being available on the host system as well.

Also, if a user wishes to use a certain repository in osbuild-composer it
must be available on both hosts: the composer and the worker. It will come
with different pair of a client certificate and a key but otherwise, its
configuration remains the same.

The solution: Expect all the subscriptions to be registered in the
/etc/yum.repos.d/redhat.repo file. Read the mapping of URLs to certificates
and keys from there and use it. Don't change the manifest format and let
osbuild guess the appropriate subscription to use.
2021-08-09 12:40:23 +02:00
Gianluca Zuccarelli
f4ee0bfabf distro: add root filesystem support 2021-07-28 21:44:03 +01:00
Ondřej Budai
9bcd219528 distro/rhel90: make selinux stage the last one
There are currently some context mismatches in the image because of the new
files from the sysconfig stage. Let's move the selinux stage to the end so
we fix them.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-06-29 13:56:26 +02:00
Ondřej Budai
c37705e7d5 distro/rhel90: move all package lists to a separate file
There's currently the Package Deletion Process going on in CentOS Stream 9.
When a maintainer wants to get rid of a package, several steps must be taken
before the package is completely removed from all places. We want to include
osbuild-composer in the process so packages that are used here are not deleted
without us noticing it. Thus, maintainers going through the process should be
able to easily see all packages that osbuild-composer includes in images.

This commit moves all package lists from rhel90/distro to rhel90/packages
to allow CentOS Stream maintainers to easily packages required by composer.

Not a functional change.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-06-29 13:56:26 +02:00
Martin Sehnoutka
71233fd860 distro: add fedora 34 and 35 aliases to f33
composer doesn't support f34 or f35, but it should be possible to build
these even with the f33 distro definition. Introduce f34 and f35 repos
and aliases for f33.
2021-06-05 20:31:45 +02:00
Ondřej Budai
a19b883727 distro/rhel90: enable cloud-init
cloud-init was enabled explicitly in the image-factory kickstart and thus we
need to explicitly enable it too.

Fixes: rhbz#1960309
Fixes: COMPOSER-920
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-05-17 14:55:50 +02:00
Tomas Hozza
fba9fe1072 Make the Distroregistry FromHost() return distro with correct name
Composer does not have 1:1 mapping of what can be the Host Distro name
and the names of supported distributions held in the Distroregistry.

The fact that the host distro `Name()` method as passed to the Weldr API
does not return the same name as what is used as distro name for
repository definitions. This makes it hard to use `distro.Distro` and
`distro.Arch` directly and rely on the values returned by them as their
name.

Add `New*HostDistro()` to all distro definitions, accepting the name
that should be returned by the distro's `Name()` method. This is useful
mainly if the host distro is Beta or Stream variant of the distro.

Change the distroregistry.Registry to contain host distro as a separate
value set when creating it using `New()` function. This value is
returned by `Registry.FromHost()` method. Determining the host distro is
handled by the `NewDefault()` function. Move the distro name mangling to
distroregistry package. Add relevant unit tests.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-05-14 15:43:00 +02:00
Martin Sehnoutka
9a0236eb09 distros but rhel84: exclude packages explicitly mentioned in a blueprint
see the previous commit for further explanation
2021-05-07 09:26:52 +02:00
Tomas Hozza
b7ceec4867 distro: remove unused field from distribution struct
The `distribution` struct defined in multiple distributions contained
unused `imageTypes` field. Remove it to simplify code.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-04-10 19:53:07 +01:00
Jozef Mikovic
295bc09592 osbuild: add support for resolv-conf stage 2021-03-26 14:05:20 +00:00
Jozef Mikovic
a9e8ea2a21 distro/rhel90: add RHEL9 support
osbuild-composer can now build rhel 9.0 images.
Added support is limited to qcow2 image type.
2021-03-26 14:05:20 +00:00