Legacy SUSE Multi-Linux Manager Server Migration to Container

To migrate a legacy SUSE Multi-Linux Manager Server to a container, a new machine is required.

In the context of this migration, the legacy SUSE Multi-Linux Manager Server (RPM installation) is sometimes also called old server.

1. Requirements and Considerations

1.1. General

  • An in-place migration is not possible.

1.2. Hostnames

  • The migration procedure currently does not include any hostname renaming functionality. The fully qualified domain name (FQDN) on the new server will remain identical to that on the legacy server.

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

2. 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.

  • The administrator must migrate these keys manually from the legacy SUSE Multi-Linux Manager installation to the container host after the actual server migration.

    Procedure: Manual Migration of the GPG Keys to New Server
    1. Copy the keys from the legacy Uyuni server to the container host of the new server.

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

2.1. Initial Preparation on the Legacy Server

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 legacy server can stay up and running.

Only during the final migration the processes on the legacy server need to be stopped.

For all non-final replications add the parameter --prepare to prevent the automatic stopping the services on the legacy server. For example:

mgradm migrate podman <oldserver.fqdn> --prepare
Procedure: Initial Preparation on the Legacy Server
  1. SUSE Multi-Linux Manager 서비스를 중지합니다.

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

    systemctl stop postgresql

2.2. SSH Connection Preparation

절차: SSH 연결 준비
  1. Ensure that for root an SSH key exists on the new 5.1 server. If a key does not exist, create it with the command:

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

    eval $(ssh-agent); ssh-add

    To establish a connection without prompting 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. Copy the public SSH key to the legacy SUSE Multi-Linux Manager Server (<oldserver.fqdn>) with ssh-copy-id. Replace <oldserver.fqdn> with the FQDN of the legacy server:

    ssh-copy-id <oldserver.fqdn>

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

  4. Establish an SSH connection from the new server to the legacy SUSE Multi-Linux Manager Server to check that no password is needed. Also there must not by any problem with the host fingerprint. In case of trouble, remove old fingerprints from the ~/.ssh/known_hosts file. Then try again. The fingerprint will be stored in the local ~/.ssh/known_hosts file.

2.3. 마이그레이션 수행

When planning your migration from a legacy SUSE Multi-Linux Manager to a containerized SUSE Multi-Linux Manager, ensure that your target instance meets or exceeds the specifications of the legacy setup. This includes, but is not limited to, memory (RAM), CPU Cores, Storage, and Network Bandwidth.

절차: 마이그레이션 수행
  1. 이 단계는 선택적 단계입니다. 인프라에 사용자 지정 영구 스토리지가 필요한 경우 mgr-storage-server 도구를 사용하십시오.

    • 자세한 내용은 mgr-storage-server --help를 참조하십시오. 이 도구는 컨테이너 스토리지 및 데이터베이스 볼륨 생성을 간소화합니다.

    • 다음 방법으로 명령 사용:

      mgr-storage-server <storage-disk-device> [<database-disk-device>]

      예:

      mgr-storage-server /dev/nvme1n1 /dev/nvme2n1

      이 명령은 /var/lib/containers/storage/volumes에 영구 스토리지 볼륨을 생성합니다.

      자세한 내용은 Persistent Container Volumes에서 확인할 수 있습니다.

  2. Execute the following command to install a new SUSE Multi-Linux Manager server. Replace <oldserver.fqdn> with the FQDN of the legacy server:

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

2.3.1. Migration of the Certificates

Trusted SSL CA certificates that were installed as part of an RPM and stored on a legacy SUSE Multi-Linux Manager 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 legacy installation after migration:

Procedure: Migrating the Certificates
  1. Copy the file from the legacy server to the new server. 예를 들어 /local/ca.file일 수 있습니다.

  2. Copy the file into the container with the command:

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

After successfully running the mgradm migrate command, the Salt setup on all clients will still point to the legacy server.

To redirect them to the new 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 legacy server.

3. Kubernetes Preparations

Before executing the migration with mgradm migrate command, it is essential to predefine Persistent Volumes, especially considering that the migration job initiates the container from scratch.

For more information, see the installation section on preparing these volumes in Persistent Container Volumes.

4. 마이그레이션

Execute the following command to install a new SUSE Multi-Linux Manager server, replacing <oldserver.fqdn> with the appropriate FQDN of the legacy server:

mgradm migrate podman <oldserver.fqdn>

또는

mgradm migrate kubernetes <oldserver.fqdn>

After successfully running the mgradm migrate command, the Salt setup on all clients will still point to the legacy server. To redirect them to the new 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 the legacy server.