×
Community Blog OpenAnolis Whitepaper: A Smooth Migration Solution for CentOS

OpenAnolis Whitepaper: A Smooth Migration Solution for CentOS

This short article explains how OpenAnolis developed a set of effective migration methodologies to support users migrating operating systems, including CentOS.

1

By Weitao Zhou (SIG Owner of Anolis Migration)

Overview

Operating system migration is a complex project, and the migration of IaaS and PaaS is more complex and affects each other in the cloud-native era. Therefore, operating system migration is no longer an OS switching in a single-machine dimension but a systematic migration project. In response to this pain point, OpenAnolis has gradually developed a set of effective migration methodologies in the process of supporting users to migrate operating systems, and it provides CentOS users with a migration system called Anolis OS Migration System (AOMS) for the migration to Anolis OS.

Challenges

With the prosperity and development of various virtualization technologies and development languages, multiple development languages, middleware, databases, and virtualization means will be mixed together during the migration of operating systems, and the demands of different dimensions (such as platforms, businesses, and products) may overlap. In these scenarios, operating system migration is no longer an OS switching in a single-machine dimension but a system project that needs to be viewed from the perspective of cluster migration. Operating system migration requires making perfect plans for global evaluation, implementation, disaster recovery, canary release, rollback, and upper-layer business scheduling.

Features

Migration Methodology: Evaluation, Decision-Making, Implementation, and Optimization

2

The five dimensions of migration assessment and key decision-making information:

3

Migration implementation is also a key process for the smooth delivery of business migration. The detailed process of the migration includes six steps: implementation plan formulation, infrastructure preparation, business adaptation and transformation, migration pilot, batch migration implementation, cut-over assistance to ensure reliable and efficient delivery of the migration.

Verification

AOMS is applicable to the following three scenarios:

Migration from CentOS 8 to Anolis OS 8 and from CentOS 7 to Anolis OS 7

Anolis OS 8 remains compatible with CentOS 8 in ecology and dependency management while making a difference. AOMS makes full use of the compatibility feature and provides a one-click migration tool: centos2anolis.py.

CentOS 8 migration uses the package related to the Anolis release to replace the CentOS release and repackages all system software packages in the current system using yum distro-sync. The software reinstallation does not modify the basic configuration of the current system, so the system configuration, business configuration, and business data will not be cleared. After the migration, you do not need to reset the data above.

Pay attention to the following items before using the migration script:

  • The migration involves accessing the official repo of Anolis OS. Users need to ensure the network can access the Anolis OS repo normally.
  • Root user execution is needed. Currently, only the CentOS 8 system migration is supported, while the CentOS stream system migration is not supported.
  • The migration depends on yum/dnf. Thus, the two components must run properly. The migration script provides the Anolis OS repo access acceleration function. If the access speed of the Anolis OS official repo is slow, users can use -s option to accelerate the access.
  • Migration logs are saved in /var/log/centos2anolis.log.

Migration from CentOS 7 to Anolis OS 8

Migration from CentOS 7 to Anolis OS 8 has resulted in major changes in kernel, basic software package, and toolchain. Migration tools need to consider the compatibility issues that come with these changes. The migration tool, Leapp, provided by AOMS, provides services (such as migration assessment, migration implementation, and configuration restoration) to implement in-place migration from CentOS 7 to Anolis OS 8.

Migration Assessment

Leapp scans the system to be migrated, collects the basic information of kernel, software package, and system configuration, compares and analyzes it with the target system (Anolis OS 8 ), and provides impact analysis and solutions for incompatible items.

  • From the Kernel Perspective: Leapp lists kernel features and hardware drivers no longer supported in Anolis OS 8.
  • From the Software Perspective: Leapp lists the change items of system commands and prompts users to adapt business programs.

The migration assessment report shows all the items in the current system that may affect the migration. After these impact items are resolved, users can continue to implement the migration. At the same time, the business program can adapt to the migration business program according to the compatibility prompt in the assessment report.

Migration Implementation

Leapp collects the current system information and records the configuration that needs to be restored after the restart (such as the selinux status). During the migration process, Leapp downloads the software packages required for migration from the Anolis OS repo in advance according to the software packages installed in the current system and the software package mapping relationship between CentOS 7 and Anolis OS 8. Then, the tool creates upgrade-initramfs based on the software packages of Anolis OS 8. After the next restart, the system automatically enters the upgrade-initramfs and triggers the in-place upgrade of all software packages. After all software packages are upgraded in-place, the system automatically restarts to enter the system configuration restoration phase. After all the information is configured, the system restarts to enter the new OS, and the in-place migration of the OS is complete.

Summary

Based on the AOMS migration tool provided by OpenAnolis, users can solve the software supply chain risks caused by CentOS End Of Life (EOL), which significantly reduces the engineering difficulties of high-tech requirements and high-complex operations caused by operating system migration and helps users quickly implement operating system migration.

0 1 0
Share on

OpenAnolis

83 posts | 5 followers

You may also like

Comments

OpenAnolis

83 posts | 5 followers

Related Products