laitimes

Red Hat Chief Architect: Demystifying the code origin and migration details of the CentOS successor

Zhi DongXi (public number: zhidxcom)

Author | ZeR0

Edit | Desert Shadow

From this year, the well-known Linux distribution CentOS 8 has stopped changing, and CentOS Stream, which inherits the mantle of CentOS, will assume the functions of CentOS in the future.

CentOS Stream is Red Hat's upstream open source development platform for Enterprise Linux (RHEL), which was launched in September 2019. Red Hat says this release shortens the feedback loop for ecosystem developers, gives developers a sneak peek at a new version of RHEL, enhances iteration timeliness, and contributes to the next iteration of RHEL.

Recently, in the second issue of the live broadcast column "8:1 "Lessons", Red Hat Enterprise Open Source Lecture Hall", Zhang Jiaju, chief architect of Red Hat, interpreted many details such as CentOS Stream code sources, compilation and construction, continuous integration, and test verification, explained how to use container-based image RHUBI, and answered some CentOS-related questions that are generally concerned by the industry.

CentOS Stream: A continuous delivery version of RHEL

"CentOS Stream replacing CentOS is an inevitable trend in the development of technology, community and ecology." Zhang Jiaju, chief architect at Red Hat, said CentOS Stream is positioned as a continuous delivery version of RHEL.

Zhang Jiaju shared that Red Hat first proposed the concept of enterprise Linux, and a major feature of enterprise Linux is to achieve a long-life cycle maintenance management of an operating system, that is to say, in the upstream community, there is no historical burden, continuous development, can independently implement new features, without too much consideration of compatibility with the old version, enterprise products must not only ensure compliance with the upstream community, but also consider compatibility, long-term stable APPLICATION interface security and so on.

Red Hat Chief Architect: Demystifying the code origin and migration details of the CentOS successor

As shown in the figure, Fedora is upstream, more desktop or individual user scenarios, and the open source community has new features that will appear on Fedora first. RHEL is downstream, CentOS Stream is the continuous delivery version of RHEL, and the feature set of CentOS Stream and RHEL is the same, but CentOS Stream is open to the community, providing a path for the broad open source community to contribute to RHEL.

Full-time RHEL developers also submit code to CentOS Stream. Whether it is CentOS Stream or RHEL, it must go through the same quality assurance system before it can be released.

Red Hat Chief Architect: Demystifying the code origin and migration details of the CentOS successor

Zhang Believes that CentOS Stream is closer to downstream than midstream, and it is inaccurate to refer to it as a "rolling version."

Each rolling update may lead to incompatibilities between the new and old versions, such as secondary development based on open source, choosing a version as the baseline for the upstream version of the community, and then making some changes to customer needs if it is found that it does not meet business needs. And when a new version is to be released after a while, the upstream that was previously used as the baseline has changed a lot, and then a choice needs to be made, whether to throw away your own changes, based on the new upstream version to do the original good things again, or based on your own version, the upstream community new things backported back?

Red Hat's CentOS Stream and RHEL are the latter, while rolling updates are neither the former nor the latter, which is equivalent to taking the upstream version directly and using it.

Second, there is no supply interruption in CentOS, and the stability of CentOS Stream is not lost to RHEL

Regarding the question of whether there is a risk of "supply interruption" in CentOS that many users are concerned about, Zhang Jiaju responded: "There is no supply interruption. ”

"The stability of CentOS Stream is actually consistent with RHEL." He said that the CentOS Stream and RHEL code was originally taken from Fedora, and the two lines were interlaced in the early bootstrap stage, and became two parallel lines in the pre-release stage, at which point the code was exactly the same.

Red Hat Chief Architect: Demystifying the code origin and migration details of the CentOS successor

Entering the development process, RHEL and CentOS Stream use the same code. That is, the same code went into two different git, one is CentOS Stream, the other is RHEL, after a series of tests, and finally produces the finished product.

Red Hat Chief Architect: Demystifying the code origin and migration details of the CentOS successor

Before 2017, the RHEL R&D process was similar to waterfall development, the whole process may take 2 to 3 months, there are many drawbacks, and the developer often has to meet the collaboration of large versions, which affects some of the development work he is currently doing.

Red Hat introduced CI/CD and DevOps development into RHEL development. Red Hat has a DevOps team within R&D, which is responsible for building this platform and framework internally, so that it can well support the development of Red Hat's different product lines in a DevOps manner.

This rapid iterative development approach is also similar to the open source community's advocacy of diligent release and early release, as long as you make a submission, you can't just casually submit the code, but you have to go through a lot of rigorous, preset quality assurance testing, and constantly improve the test set.

Red Hat Chief Architect: Demystifying the code origin and migration details of the CentOS successor

Gate can be understood as a threshold of quality assurance, only through the gate, the quality to meet the RHEL product release requirements, only meet the RHEL quality standards, the code can be submitted to the CentOS Stream git tree.

As you can see, CentOS Stream and RHEL go through the same quality assurance steps, so their quality, stability, and reliability are consistent.

Red Hat Chief Architect: Demystifying the code origin and migration details of the CentOS successor

CentOS Stream is not a beta beta of RHEL, and its development approach has shifted from traditional to agile. If some of the features in the beta version are unstable, these features will be eventually removed. The things in the CentOS Stream have to go through RHEL's CI/CD, which is developed simultaneously with RHEL, and every update and version iteration of RHEL is open to everyone through CentOS Stream.

The RHEL-based UBI container base image is free, and when using the base image to package applications, the base image has been configured with a default free-to-use package source, and the packages in it are derived from RHEL instead of CentOS.

Conclusion: Migration is low-threshold, and two commands can smooth the migration

CentOS 8 is stopped, what to do? In this regard, Zhang Jiaju showed two orders. Just by tapping these two commands, you can achieve a seamless migration, turning the CentOS operating system into CentOS Stream 8.

Red Hat Chief Architect: Demystifying the code origin and migration details of the CentOS successor

Of course, if the system was running a very critical enterprise-level application before, it is not too much to do backups, snapshots, and other operations before migration. For these customers, Red Hat also offers a complete migration plan. For example, if something goes wrong somewhere, the system can go back to the previous version.

As more users migrate to CentOS Stream, the platform will begin to inherit the mantle of CentOS, providing continued innovation for the RHEL ecosystem.

Read on