From 3fdd6d4c85a0725fc5eeace95e443ea9349339a7 Mon Sep 17 00:00:00 2001 From: Konrad Bucheli Date: Wed, 15 Jun 2022 17:04:31 +0200 Subject: [PATCH] add package mangement on RHEL8 --- _toc.yml | 1 + rhel8/index.md | 2 +- rhel8/packages.md | 135 ++++++++++++++++++++++++++++++++++++++++++ rhel8/repositories.md | 15 ----- 4 files changed, 137 insertions(+), 16 deletions(-) create mode 100644 rhel8/packages.md delete mode 100644 rhel8/repositories.md diff --git a/_toc.yml b/_toc.yml index fb139dc5..51c2c280 100644 --- a/_toc.yml +++ b/_toc.yml @@ -31,5 +31,6 @@ parts: - file: rhel8/index sections: - file: rhel8/installation + - file: rhel8/packages - file: rhel8/vendor_documentation diff --git a/rhel8/index.md b/rhel8/index.md index 51be8ea5..3fd990b6 100644 --- a/rhel8/index.md +++ b/rhel8/index.md @@ -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) diff --git a/rhel8/packages.md b/rhel8/packages.md new file mode 100644 index 00000000..2a9d22a1 --- /dev/null +++ b/rhel8/packages.md @@ -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) + + diff --git a/rhel8/repositories.md b/rhel8/repositories.md deleted file mode 100644 index ec36407a..00000000 --- a/rhel8/repositories.md +++ /dev/null @@ -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)