Migrating the SUSE Manager server to a containerized environment

To migrate a regular SUSE Manager server to a container, a new machine is required.

It is not possible to perform an in-place migration.

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 old server. Therefore, following migration, it will be necessary to manually adjust the DNS records to point to the new server.

Procedure: Initial preparation
  1. Stop the SUSE Manager services on the old server:

    spacewalk-service stop
  2. Stop the PostgreSQL service:

    systemctl stop postgresql
Procedure: Preparing the SSH connection
  1. The SSH configuration and agent should be ready on the new host for a passwordless connection to the oldserver.

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

  2. The migration script only uses the old server’s FQDN in the SSH command.

  3. This means that every other configuration required to connect needs to be defined in the ~/.ssh/config file.

1. Prepare for Kubernetes

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 for comprehensive guidance on preparing these volumes in List of persistent storage volumes.

2. Migrating

Execute the following command to install a new SUSE Manager server, replacing <oldserversource.fqdn> with the appropriate FQDN of the old server:

mgradm migrate podman <oldnserver.fqdn>

or

mgradm migrate kubernetes <oldnserver.fqdn>

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