SUSE Multi-Linux Manager Server Migration to a Containerized Environment

1. Requirements and considerations

1.1. General requirements

  • SUSE Multi-Linux Manager 4.3 서버를 컨테이너로 마이그레이션하려면 SL Micro 6.1 또는 SUSE Linux Enterprise Server 15 SP7 및 mgradm이 설치된 새 시스템이 필요합니다.

  • An in-place migration from SUSE Multi-Linux Manager 4.3 to 5.1 is not supported, regardless of whether the chosen host operating system is SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7.

Before migrating from SUSE Multi-Linux Manager 4.3 to 5.1, any existing traditional clients including the traditional proxies must be migrated to Salt. For more information about migrating traditional SUSE Multi-Linux Manager 4.3 clients to Salt clients, see Migrate Traditional Clients to Salt Clients.

  • Traditional contact protocol is no longer supported in SUSE Multi-Linux Manager 5.0 and later.

절차: SL Micro 및 SUSE Multi-Linux Manager 5.1 등록

Migrating an existing SUSE Multi-Linux Manager 5.1 instance to the same version while switching the host operating system from SL Micro 6.1 to SUSE Linux Enterprise Server 15 SP7, or vice versa, is not handled by the mgradm migrate command.

1.2. Hostnames

  • Current migration procedure does not include functionality for renaming hostnames. As a result, fully qualified domain name (FQDN) of the new server will remain the same as that of the old server.

  • The IP address must remain unchanged to ensure that the clients can contact the server.

After the migration, it is necessary to manually update the DHCP and DNS records to point to the new server.

1.3. GPG keys

  • Self-trusted GPG keys are not migrated.

  • GPG keys that are trusted in the RPM database only are not migrated. Thus, synchronizing channels with spacewalk-repo-sync can fail.

  • 관리자는 실제 서버 마이그레이션을 수행한 후 이러한 키를 4.3 설치에서 컨테이너 호스트로 수동으로 마이그레이션해야 합니다.

    Procedure: Manual migration of the 4.3 GPG keys to the new server
    1. 4.3 서버의 키를 새 서버의 컨테이너 호스트로 복사합니다.

    2. 그 후, mgradm gpg add <PATH_TO_KEY_FILE> 명령을 사용하여 마이그레이션된 서버에 각 키를 추가합니다.

1.4. SSL certificates

SSL 인증서는 후속 단계에서 필요합니다. 자체 서명 생성 CA 및 인증서를 사용하지 않는 경우 시작 전에 다음을 준비하십시오.

  • 인증 기관(CA) SSL 공개 인증서. CA 체인을 사용하는 경우 모든 중간 CA도 반드시 사용 가능해야 합니다.

  • SSL 데이터베이스 개인 키.

  • SSL 인증서

All files must be in PEM format.

SSL 서버 인증서의 호스트명은 해당 인증서를 배포하는 머신의 전체 호스트 이름과 일치해야 합니다. 인증서의 X509v3 Subject Alternative Name 섹션에서 호스트 이름을 설정할 수 있습니다. 환경에 따라 필요한 경우 여러 호스트 이름을 나열할 수도 있습니다. 지원되는 키 유형은 RSAEC(Elliptic Curve)입니다.

데이터베이스 SSL 인증서에는 reportdbdb가 필요하며, 보고서 데이터베이스에 액세스하는 데 사용되는 FQDN이 Subject Alternative Name으로 지정되어야 합니다.

마이그레이션 중에 서버 SSL 인증서와 CA 체인은 소스 서버에서 복사되므로, 데이터베이스 인증서만 필요합니다.

2. 마이그레이션

2.1. Prepare SUSE Multi-Linux Manager 5.1 server host

Do not pre-install SUSE Multi-Linux Manager on the prepared SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7 system.

The migration process is designed to perform the server installation automatically. Running mgradm install and then mgradm migrate is not supported and will lead to an unsupported system state.

In the following steps, we are only preparing the host system, not installing the actual SUSE Multi-Linux Manager 5.1 Server.

SL Micro 6.1 기반 VM 이미지를 마이그레이션 타겟으로 사용할 수 있습니다. 이러한 시나리오에서는 다음에 설명된 대로 호스트 시스템을 준비할 수 있습니다.

하지만 마지막 단계에서는 mgradm install <FQDN> 대신 mgradm migrate <FQDN> 명령을 실행합니다.

2.1.1. SL Micro 6.1 호스트 준비

2.1.1.1. Download the installation media
Procedure: Downloading the installation media
  1. Locate the SL Micro 6.1 installation media at https://www.suse.com/download/sle-micro/, and download the appropriate media file.

  2. 설치하기 위해 다운로드한 .iso 이미지가 들어 있는 DVD 또는 USB 플래시 드라이브를 준비합니다.

2.1.1.2. Install SL Micro 6.1

머신(가상 또는 물리) 준비에 대한 자세한 내용은 SL Micro 배포 가이드에서 확인할 수 있습니다.

Procedure: Installing SL Micro 6.1
  1. Insert the DVD or USB flash drive (USB disk or key) containing the installation image for SLE Micro 6.1.

  2. 시스템을 부팅하거나 재부팅합니다.

  3. 화살표 키를 사용하여 설치를 선택합니다.

  4. Adjust Keyboard and language.

  5. 확인란을 클릭하여 라이선스 계약에 동의합니다.

  6. 다음을 클릭하여 계속합니다.

  7. Select the registration method. For this example, we will register the server with SUSE Customer Center.

    The SUSE Multi-Linux Manager 5.1 containers are installed as extensions. Depending on the specific extension needed from the list below, additional SUSE Customer Center registration codes will be required for each.

    • SUSE Multi-Linux Manager 5.1 서버

    • SUSE Multi-Linux Manager 5.1 프록시

    • SUSE Multi-Linux Manager 5.1 Retail Branch Server

    The SL Micro 6.1 entitlement is included within the SUSE Multi-Linux Manager entitlement, so it does not require a separate registration code.

  8. Enter your SUSE Customer Center email address.

  9. Enter your registration code for SL Micro 6.1.

  10. 다음을 클릭하여 계속합니다.

  11. To install a proxy, select the SUSE Multi-Linux Manager 5.1 Proxy extension; to install a server, select the SUSE Multi-Linux Manager 5.1 Server extension Checkbox.

  12. 다음을 클릭하여 계속합니다.

  13. Enter your SUSE Multi-Linux Manager 5.1 extension registration code.

  14. 다음을 클릭하여 계속합니다.

  15. NTP 구성 페이지에서 다음을 클릭합니다.

  16. 시스템 인증 페이지에서 루트 사용자의 비밀번호를 입력합니다. 다음을 클릭합니다.

  17. 설치 설정 페이지에서 설치를 클릭합니다.

This concludes installation of SL Micro 6.1 and SUSE Multi-Linux Manager 5.1 as an extension.

2.1.1.3. OPTIONAL: Registration from the command line

If you added SUSE Multi-Linux Manager 5.1 as an extension during SL Micro 6.1 installation then you can skip this procedure. However, optionally you may skip registration during SL Micro 6.1 installation by selecting the Skip Registration button. This section provides steps on registering your products after SL Micro 6.1 installation.

The following steps register a SUSE Multi-Linux Manager 5.1 extension with the x86-64 architecture and thus require a registration code for the x86-64 architecture. To register ARM or s390x architectures use the correct registration code.

Procedure: Registering from the command line
  1. List available extensions with the following command:

    transactional-update --quiet register --list-extensions
  2. From the list of available extensions, select the one you wish to install:

    1. If installing the Server, use your SUSE Multi-Linux Manager Server Extension 5.1 x86_64 registration code with following command:

      transactional-update register -p Multi-Linux-Manager-Server/5.1/x86_64 -r <reg_code>
    2. If installing the Proxy, use your SUSE Multi-Linux Manager Proxy Extension 5.1 x86_64 registration code with following command:

    transactional-update register -p Multi-Linux-Manager-Proxy/5.1/x86_64 -r <reg_code>
  3. 재부팅합니다.

2.1.1.4. 시스템 업데이트
Procedure: Updating the system
  1. root로 로그인합니다.

  2. transactional-update 실행:

    transactional-update
  3. 재부팅합니다.

SL Micro is designed to update itself automatically by default and will reboot after applying updates. However, this behavior is not desirable for the SUSE Multi-Linux Manager environment. To prevent automatic updates on your server, SUSE Multi-Linux Manager disables the transactional-update timer during the bootstrap process.

If you prefer the SL Micro default behavior, enable the timer by running the following command:

systemctl enable --now transactional-update.timer

2.1.2. Prepare SUSE Linux Enterprise Server 15 SP7 host

Alternatively, you can deploy SUSE Multi-Linux Manager on SUSE Linux Enterprise Server 15 SP7.

The following procedures describe the main steps of the installation process.

2.1.2.1. Install SUSE Multi-Linux Manager extensions on SUSE Linux Enterprise Server
Procedure: Installing SUSE Multi-Linux Manager Extensions on SUSE Linux Enterprise Server
  1. https://www.suse.com/download/sles/에서 SUSE Linux Enterprise Server 15 SP7 .iso를 찾아 다운로드합니다.

  2. 호스트 운영 체제(SUSE Linux Enterprise Server 15 SP7) 및 확장 기능 모두에 대한 등록 코드가 반드시 있어야 합니다.

  3. Start the installation of SUSE Linux Enterprise Server 15 SP7.

    1. On the Language, keyboard and product selection select the product to install.

    2. 라이선스 계약에서 계약서를 읽고 라이선스 약관에 동의합니다에 체크 표시합니다.

  4. Select the registration method. For this example, we will register the server with SUSE Customer Center.

  5. Enter your SUSE Customer Center email address.

  6. Enter your registration code for SUSE Linux Enterprise Server 15 SP7.

  7. 다음을 클릭하여 계속합니다.

    Please note that for SUSE Linux Enterprise Server 15 SP7, you are required to have a valid SUSE Linux Enterprise Server subscription and corresponding registration code, which you must provide on this screen. You will be required to enter the SUSE Multi-Linux Manager Extension registration code below.

  8. In the screen Extensions and Modules Selection check the following:

    • Select the SUSE Multi-Linux Manager Server Extension to install the Server, or the SUSE Multi-Linux Manager Proxy Extension to install the Proxy.

    • Basesystem Module

    • Containers Module

  9. 다음을 클릭하여 계속합니다.

  10. Enter your SUSE Multi-Linux Manager 5.1 extension registration code.

  11. 다음을 클릭하여 계속합니다.

  12. 설치를 완료합니다.

  13. When the installation completes, log in to the newly installed server as root.

  14. Update the System (optional, if the system was not set to download updates during install):

    zypper up
  15. 재부팅합니다.

2.1.2.2. OPTIONAL: Registration from the command line

If you added SUSE Multi-Linux Manager 5.1 as an extension during SUSE Linux Enterprise Server installation then you can skip this procedure.

However, optionally you may skip registration during SUSE Linux Enterprise Server installation by selecting the Skip Registration button. This section provides steps on registering your products after SUSE Linux Enterprise Server installation.

The following steps register a SUSE Multi-Linux Manager 5.1 extension with the x86-64 architecture and thus require a registration code for the x86-64 architecture.

To register ARM or s390x architectures use the correct registration code.

Procedure: Registering from the command line
  1. List available extensions with the following command:

    SUSEConnect --list-extensions
  2. From the list of available extensions, select the one you wish to install:

    If installing the Server, use your SUSE Multi-Linux Manager Server Extension 5.1 x86_64 registration code. For example for SUSE Linux Enterprise 15 SP7, use the following commands:

    +

    SUSEConnect -r <regcode>
    SUSEConnect -p sle-module-containers/15.7/x86_64
    SUSEConnect -p Multi-Linux-Manager-Server-SLE/5.1/x86_64 -r <regcode>
    • If installing the Proxy, use your SUSE Multi-Linux Manager Proxy Extension 5.1 x86_64 registration code with the following command:

      SUSEConnect -p Multi-Linux-Manager-Proxy-SLE/5.1/x86_64 -r <regcode>
2.1.2.3. podman을 설치하고 활성화합니다.
Procedure: Installing podman
  1. Log in as root and install the product package.

    • On the server:

      zypper in podman
      zypper in -t product SUSE-Multi-Linux-Manager-Server
    • 프록시에서:

      zypper in podman
      zypper in -t product SUSE-Multi-Linux-Manager-Proxy

      podman 패키지가 설치되어 있는지 확인합니다. 또한 서버에는 mgradmmgradm-bash-completion이 설치되고, 프록시 서버에는 mgrpxymgrpxy-bash-completion이 추가로 설치되어야 합니다.

  2. Start the Podman service by rebooting the system, or running a command:

    systemctl enable --now podman.service

2.2. SSH connection preparation

This step ensures that the new SUSE Multi-Linux Manager 5.1 Server can connect to the existing 4.3 Server over SSH without requiring a password. It involves generating and configuring SSH keys, setting up an SSH agent, and copying the public key to the old server. This setup is required for the migration process to run without manual intervention.

절차: SSH 연결 준비
  1. 새 5.1 서버에 root에 대한 SSH 키가 있는지 확인합니다. 키가 없는 경우 다음을 사용하여 키를 만듭니다.

    ssh-keygen -t rsa
  2. The SSH configuration and agent should be ready on the new server for a connection to the 4.3 server that does not prompt for a password.

    eval $(ssh-agent); ssh-add

    To establish a connection that does not prompt for a password, the migration script relies on an SSH agent running on the new server. If the agent is not active yet, initiate it by running eval $(ssh-agent). Then add the SSH key to the running agent with ssh-add followed by the path to the private key. You will be prompted to enter the password for the private key during this process.

  3. ssh-copy-id를 사용하여 SUSE Multi-Linux Manager 4.3 서버(<oldserver.fqdn>)에 공개 SSH 키를 복사합니다. <oldserver.fqdn>을 4.3 서버의 FQDN으로 바꿉니다.

    ssh-copy-id <old server.fqdn>

    The SSH key will be copied into the old server’s ~/.ssh/authorized_keys file. For more information, see the ssh-copy-id manpage.

  4. 새 서버에서 기존 SUSE Multi-Linux Manager 서버로 SSH 연결을 설정하여 비밀번호가 필요하지 않은지 확인합니다. 호스트 지문에도 문제가 없어야 합니다. 문제가 있는 경우 ~/.ssh/known_hosts 파일에서 기존 지문을 제거합니다. 그런 다음 다시 시도합니다. 지문은 로컬 ~/.ssh/known_hosts 파일에 저장됩니다.

2.3. Perform the migration

When planning your migration from SUSE Manager 4.3 to SUSE Multi-Linux Manager 5.1, ensure that your target instance meets or exceeds the specifications of the old setup.

This includes, but is not limited to, memory (RAM), CPU Cores, Storage, and Network Bandwidth.

보안을 위해 강화된 SUSE Multi-Linux Manager 서버 호스트는 /tmp 폴더의 파일 실행을 제한할 수 있습니다. 이러한 경우 해결 방법으로 TMPDIR 환경 변수를 다른 기존 경로로 내보낸 다음, mgradm을 실행합니다.

예:

export TMPDIR=/path/to/other/tmp

In SUSE Multi-Linux Manager updates, tools will be changed to make this workaround unnecessary.

SUSE Manager 4.3에서 마이그레이션할 때 CA 키 생성용 비밀번호를 입력하라는 메시지가 표시됩니다. SUSE Manager 4.3 설치 시 사용했던 것과 동일한 CA 비밀번호를 입력해야 합니다.

잘못된 비밀번호를 입력하면 데이터베이스 인증서 생성에 실패하며, 다음과 같은 오류로 마이그레이션이 중단됩니다.

오류: DB 컨테이너를 구성할 수 없음: 데이터베이스 인증서를 생성할 수 없음: CA 유효성 검사에 실패했습니다!

마이그레이션 프로세스를 시작하기 전에 올바른 CA 비밀번호가 준비되어 있는지 확인합니다.

Procedure: Performing the migration
  1. This step is optional. If custom persistent storage is required for your infrastructure, use the mgr-storage-server tool. For more information about mgr-storage-server, see installation-and-upgrade:hardware-requirements.adoc#install-hardware-requirements-storage.

  2. Execute the following command to migrate and set up a new SUSE Multi-Linux Manager 5.1 server. Replace <oldserver.fqdn> with the FQDN of the 4.3 server:

    Make sure to upgrade your 4.3 server and apply all available updates before starting the migration process. Additionally, remove any unnecessary channels to help reduce the overall migration time.

    The migration can take a very long time depending on the amount of data that needs to be replicated. To reduce downtime it is possible to run the migration multiple times in a process of initial replication, re-replication, or final replication and switch over while all the services on the old 4.3 server can stay up and running.

    Only during the final migration, the processes on the old 4.3 server need to be stopped.

    최종 복제가 아닌 모든 복제에 대해 이전 서버의 서비스가 자동으로 중지되지 않도록 --prepare 파라미터를 추가합니다. 예를 들어, SUSE Multi-Linux Manager 서버에서:

    mgradm migrate podman <oldserver.fqdn> --prepare
절차: 최종 마이그레이션
  1. Stop the SUSE Manager services on 4.3 Server:

    spacewalk-service stop
  2. 4.3 서버에서 PostgreSQL 서비스를 중지합니다.

    systemctl stop postgresql
  3. Perform the final migration on SUSE Multi-Linux Manager 5.1 Server

    mgradm migrate podman <oldserver.fqdn>
  4. 신뢰할 수 있는 SSL CA 인증서를 마이그레이션합니다.

2.3.1. Migration of the certificates

Trusted SSL CA certificates that were installed as part of an RPM and stored on SUSE Multi-Linux Manager 4.3 in the /usr/share/pki/trust/anchors/ directory will not be migrated. Because SUSE does not install RPM packages in the container, the administrator must migrate these certificate files manually from the SUSE Manager 4.3 server after the migration.

Procedure: Migrating the certificates
  1. Copy the file from the SUSE Manager 4.3 Server to the new SUSE Multi-Linux Manager 5.1 Server. 예를 들어 /local/ca.file일 수 있습니다.

  2. 다음을 사용하여 파일을 컨테이너에 복사합니다.

    mgrctl cp /local/ca.file server:/etc/pki/trust/anchors/

mgradm migrate 명령을 성공적으로 실행한 후에도 모든 클라이언트의 Salt 설정은 계속해서 기존 4.3 서버를 가리킵니다.

To redirect them to the 5.1 server, it is required to rename the new server at the infrastructure level (DHCP and DNS) to use the same FQDN and IP address as 4.3 server.

Adjusting the IP address can be avoided if the latest version of the minion is installed on the clients, as the newer version can automatically re-connect with the server using only the FQDN.

3. 클라이언트 도구 리브랜딩

SUSE Multi-Linux Manager 5.1은(는) 지원되는 모든 운영 체제에 대한 일련의 클라이언트 도구를 리브랜딩했습니다. 이 전환은 원활하게 수행되며, 새 제품 동기화를 수행하는 사용자는 업데이트된 채널 이름만 확인할 수 있습니다.

버전 5.1에서는 SUSE Multi-Linux Manager 4.3 또는 5.0에 이전에 등록된 클라이언트가 사용하던 SUSE Manager Client Tools for XYZ 채널을 더 이상 사용할 수 없으며, 버전 5.1에서는 더 이상 업데이트를 수신하지 않습니다.

Although the legacy channels remain assigned to existing clients after migration, the corresponding repositories have been removed.

To ensure continued updates, users must:

  • 관련 제품의 새 SUSE Multi-Linux Manager Client Tools for XYZ 채널을 미러링하고 적절한 클라이언트에 할당합니다.

  • 사용 중지된 SUSE Manager Client Tools for XYZ 채널의 할당을 해제합니다.

This also means that any CLM projects based on the old client tools must be adjusted accordingly.

예시 워크플로는 Switch to new client tools channels에서 확인할 수 있습니다.