add package mangement on RHEL8

This commit is contained in:
2022-06-15 17:04:31 +02:00
parent ff895f6b3f
commit 3fdd6d4c85
4 changed files with 137 additions and 16 deletions

View File

@@ -31,5 +31,6 @@ parts:
- file: rhel8/index
sections:
- file: rhel8/installation
- file: rhel8/packages
- file: rhel8/vendor_documentation

View File

@@ -58,5 +58,5 @@ which is IMHO OK to not allow a normal user to do changes there.
## Documenatation
* [Installation (Alpha)](installation)
* [Repositories](repositories)
* [Package Management](packages)
* [Vendor Documentation](vendor_documentation)

135
rhel8/packages.md Normal file
View File

@@ -0,0 +1,135 @@
# Package Management for RHEL 8
How to add packages and package repositories and what repositories are available is documented here.
## Package Installation
### Install Packages with Hiera Package Groups
The packages automatically installed onto a system by Puppet are managed in the Hiera list `base::package_groups`. It contains the names of the package groups to be installed. Items can be added at all levels of the Hiera hierarchy and are merged.
The package groups itself are Hieara lists named `base::pkg_group::$USE_CASE`.
Here list all the packages you want to install.
Currently there exist the following package groups in the main [`common.yaml`](https://git.psi.ch/linux-infra/puppet/-/blob/preprod/data/common.yaml):
- `base::pkg_group::system_tools` (installed by default)
- `base::pkg_group::daq_buffer`
- `base::pkg_group::desktop_settings`
- `base::pkg_group::dev`
- `base::pkg_group::login_server`
- `base::pkg_group::qt5`
- `base::pkg_group::root`
but further ones can be created in Hiera at lower hierachies and added to `base::package_groups`, for example
```
base::pkg_group::java:
- 'java-1.8.0-openjdk'
- 'java-11-openjdk'
- 'java-17-openjdk'
base::package_groups:
- 'java'
```
### Install a Group of Packages
To add a RedHat predefined group of packages (checkout out `dnf grouplist --hidden`) prepend the name of it with a `@`, e.g. for "Java Platform" it would be `@Java Platform`:
```
base::pkg_group::java:
- '@Java Platform'
```
### Install Latest Package Version
To ensure that always the latest available package version is installed, append the `:latest` tag to the package name in the package group:
```
base::pkg_group::java:
- 'java-1.8.0-openjdk'
- 'java-11-openjdk'
- 'java-17-openjdk:latest'
```
### Install Packages only on Given OS Version
**to be implemented**
Certain packages are only used on a given OS Version, so
```
base::pkg_group::java:
- 'java-1.8.0-openjdk:redhat7'
- 'java-11-openjdk'
- 'java-17-openjdk:redhat8'
```
Note that this tag can be combine with the `latest` and `absent` tag.
### Remove Packages
To remove an already installed package, append the `:absent` tag to the package name in the package group:
```
base::pkg_group::java:
- 'java-1.8.0-openjdk:absent'
- 'java-11-openjdk'
- 'java-17-openjdk'
```
### Ignore Packages
To make packages unavailable for installation, even though provided by the package repositories, add them in Hiera to the list `base::package_exclude`:
```
base::package_exclude:
- 'epics-base-7.0.6*'
```
### Legacy Package Installation
The legacy Hiera lists for package groups is `yum_client::pkg_group::$USE_CASE` and supports the `latest` and `absent` tag, but not the filtering by operating system version.
Then `yum_client::package_groups` is the Hiera list to contain the package groups to be installed.
Please migrate them to the equivalent `base::*` list. You can have both of them available at the same time, with possibly the same content.
## Management of Package Repositories
TBD: rpm_repos::default
### Using Specific Package Repository Snapshot
TBD:
rpm_repos::repo::rhel8_codeready
yum_client::repo::rhel7_rhscl
### Package Repositories made Available by the Linux Group
Availabe on all systems are:
- RedHat [BaseOS](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/package_manifest/baseos-repository), [AppStream](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/package_manifest/appstream-repository) and [CodeReady](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/package_manifest/codereadylinuxbuilder-repository) repositories
- [Extra Packages for Enterprise Linux (EPEL) repositories](https://docs.fedoraproject.org/en-US/epel/)
- Puppet 7 repository
- Auristor repository for YFS and AFS related packages
- Google Chrome repository
- pli-misc
Predefined and used when needed are:
- Influx (`influxdb`, `telegraf`, ...)
To be added/defined in `common.yaml`?
- CUDA
- Epics (available for RHEL7)
- Code (Visual Studio Code from Microsoft)
- HashiCorp (`vault`, `terraform`, `vagrant`, ...)
### pli-misc Repository
A small list of packages managed by the Linux Team.
- make v4.3 from [CentOS](https://rpmfind.net/linux/RPM/centos-stream/9/baseos/x86_64/make-4.3-7.el9.x86_64.html) as v4.2.1 has been reported to to make trouble
- latest [Zoom client](https://zoom.us/download?os=linux)
- latest [Webex client](https://www.webex.com/downloads.html)

View File

@@ -1,15 +0,0 @@
# Package Repositories for RHEL 8
## RedHat Repositories
...
## EPEL Repositories
## pli-misc Repository
A small list of packages managed by the Linux Team.
- make v4.3 from [CentOS](https://rpmfind.net/linux/RPM/centos-stream/9/baseos/x86_64/make-4.3-7.el9.x86_64.html) as v4.2.1 has been reported to to make trouble
- latest [Zoom client](https://zoom.us/download?os=linux)
- latest [Webex client](https://www.webex.com/downloads.html)