Spotlight - CentOS Stream

CentOS Stream is the new downstream distribution of Fedora and the new upstream distribution of Red Hat Enterprise Linux. In the article Future of CentOS I addressed the recent changes in the CentOS Project and the shift to CentOS Stream. This article shows what you can expect from it.

Spotlight - CentOS Stream

CentOS Stream is the new downstream distribution of Fedora and the new upstream distribution of Red Hat Enterprise Linux. In the article Future of CentOS I addressed the recent changes in the CentOS Project and the shift to CentOS Stream. This article shows what you can expect from it.

What is CentOS Stream?

CentOS Stream is the community enterprise OS, that tracks just ahead of Red Hat Enterprise Linux (RHEL). It provides a stable and reliable, but constantly updated operating system. It is positioned right between Fedora and RHEL as a "midstream" distribution. You can think of "RHEL development in public".

For me, CentOS is a more server-oriented OS, which can be used in many uncritical production systems. But I would avoid using it as a Desktop system or for mission critical "single-instance" systems.

Please also check out the FAQ for CentOS and CentOS Stream.

Release & Support

CentOS Stream is released as a "major version only" system. This means, you will download and install a major version (CentOS Stream 8, CentOS Stream 9), but that there are no minor versions. Instead, you will get a constant stream of patches, bug fixes and security fixes over time.

A major version of CentOS Stream will be supported for the lifetime of the RHEL "full support". For CentOS Stream 8, the support will end 31st May 2024.

© 2021, Daniel Schier, CC BY-SA 4.0

Support is provided from the community and there is no option to get enterprise level support for CentOS. But, since CentOS Stream is the upstream of RHEL, you can expect that bugs will be addressed quite fast and security issues will be handled as soon as possible.

Installation

CentOS Stream can be installed similar to other Linux derivates. You can install it in a VM, Bare Metal, as container or via Vagrant. It is also possible to live migrate an existing CentOS 8 installation to CentOS Stream 8.

Hint
The guide is tested with the CentOS Stream 8 DVD ISO (April 2021).

Fresh Installation

For VMs and Bare Metal installations, you can start by downloading the proper ISO image file from one of the available mirrors. For a VM installation, you can boot and install from the ISO file directly. If you want to install CentOS Stream on a Bare Metal server, you must create an installation media first.

After the initial boot of the created installation media you will be greeted by the Anaconda installer.

After choosing your language, you will get an overview of the possible configurations.

I will not go through all options, but focus on the most important ones. First, you should configure your network in the "Network & Host Name" dialog. The network must be enabled manually to be present on boot. You can also set a hostname here.

Afterwards, you should create a user. Setting a root password is not needed, if you set the checkmark "Make this user administrator" for your initial user.

Configuring a proper timezone is also recommended. For a server, I am using always UTC, so all of my servers are having the same timezone and I don't have to care about different time zones or daylight saving times.

The Installation Destination dialog provides many options to configure partitions and file system layouts to your liking. I am sticking with "automatic".

Lastly, you need to choose the desired packages in the "Software Selection" dialog. I am choosing "Minimal Install" and "Guest Agents", if I am running CentOS in a VM.

Hitting the big blue "Begin Installation" button will start the installation process.

After a brief wait time (depending on your software selection), the system will request a reboot. Just hit the "Reboot System" button, and you will be greeted with a fresh CentOS Stream 8 server.

After the first login, doing an update is strongly recommended.

# Update the system
$ sudo dnf update -y

# Reboot afterwards
$ sudo systemctl reboot

Convert from CentOS 8

Converting from an existing CentOS 8 installation is a simple process and fully supported from the CentOS project. You should make a full backup of your system beforehand.

# swap out the repositories
$ sudo dnf swap centos-linux-repos centos-stream-repos

# Update the system
$ sudo dnf distro-sync

# Reboot
$ sudo systemctl reboot

More options

There are also options to download CentOS as Container image to be used in Docker, Podman or Kubernetes. Furthermore, you can also run CentOS Stream in Vagrant with the provided Vagrant Box.

There are even more options documented on docs.centos.org.

Minimal System

Starting with a minimal system is recommended for most use cases. You can add software later on and even automate this process properly, for example with Ansible. The minimal system of CentOS Stream provides some important base packages, which includes:

  • Linux Kernel 4.18.0 which will stay the same for the whole lifetime of CentOS Stream 8. For me a quite interesting decision, since it is not a Longterm Kernel.
  • CentOS Stream includes systemd in version 239 as the init and system management software.
  • Like Fedora and RHEL, CentOS also includes firewalld as the firewall management software. Firewalld provides an easy-to-use interface to create, check and persist firewall rules on your Linux system.
  • SELinux is pre-installed, too. It provides additional security policies for files, processes and applications. These policies allow to have additional protection and isolation for processes on your machine.

You will also get some well known tools like Bash, OpenSSH server or vim. But that's basically it. In the repositories, you will find more software.

Modular Repositories

A Linux distribution, that spans over a lifetime of five or more years has some serious issues with software updates. Sometimes the tools one needs are updating way faster or can become EOL before the OS itself can be upgraded. Sometimes one wants to stick to a specific version of a software or one needs different software versions for different tool stacks.

CentOS, Fedora and Red Hat try to address these issues with  a concept, called "modular repositories". It is a way to provide supported software in different versions for the same base OS.

Listing all available modular repositories can be done via DNF.

# List all modules
$ dnf module list

# List only redis modules
$ dnf module list redis

You can read more about modularity/modules here.

Available Software

Now, lets dig into the available Software. You can find a good deal of software, you expect from a server OS.

Web Stack

As web servers, you can choose between Apache httpd or Nginx. For database servers, you will find different versions of MariaDB, PostgreSQL and MySQL out of the box. You will also get different versions of Python, NodeJS, Java, PHP and more. Lastly, Redis and memcached are on board for caching.

Virtualization / Container

When it comes to virtualization, CentOS is very KVM focused. You can find lots of tooling for a KVM hypervisor. The container engine on board is Podman, which I addressed in my articles already.

More ...

In addition, you can also find Go, Ruby, Perl, 389-ds, Open LDAP and many more. If these are not fulfilling your needs, just have a look at the additional repositories.

Additional Repositories

In case, some software is missing for your use case, you might want to have a look in the below repositories. These are providing additional software for different reasons.

PowerTools

The PowerTools repository is officially maintained from the CentOS Project and provides additional resources mostly for developers. You can find many "*-devel"-Packages here. The repository will be present in CentOS installations, but is disabled by default. You just need to enable it.

# Enable PowerTools repository
$ sudo dnf config-manager --set-enabled powertools

# Update Package cache
$ sudo dnf makecache

EPEL

The Extra Packages for Enterprise Linux (EPEL) repository provides many packages not available in the default CentOS repositories. EPEL packages are usually based on their Fedora counterparts and will never conflict with or replace packages in the base Enterprise Linux distributions. You can find some interesting packages like Zabbix or Ansible here. You can install and enable the EPEL repository with the below command.

# Enable EPEL
$ sudo dnf install epel-release

Since many packages in EPEL require software from the PowerTools repository, it is recommended to activate it, too.

Upstream Repositories

Many vendors provide dedicated repositories for CentOS/RHEL based systems. This can be very useful, if you want to be in sync with the upstream developers or use a version not represented in CentOS. Some examples for these repositories are Docker, PostgreSQL, MariaDB or Elasticsearch.

More ...

There are even more resources to get additional packages from. Please have a look at the official documentation to get an overview.

Documentation

Getting into CentOS is quite easy, since you can apply lots of knowledge from Fedora and RHEL. CentOS also provides a very nice documentation, a wiki and lots of FAQs.

Conclusion

CentOS Stream provides a Linux experience which should handle the "deliver" part in CI/CD. The constant stream of bug fixes and patches makes it easy to detect issues fast and report bugs. It is also intended, that these reports will be addressed and handled fast.

I am using CentOS for quite some time now, and I am happy to see the project evolving. Let's see how CentOS Stream will compare to CentOS Linux. In any case, we are having some nice alternatives in place as stated in my "Future of CentOS" article.