Documentation survey

コンテナ化された環境へのSUSE Multi-Linux Managerサーバの移行

1. 要件と考慮事項

1.1. 全般

  • To migrate a SUSE Multi-Linux Manager 4.3 Server to a container, you require a new machine with SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7 and mgradm installed.

  • 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 https://documentation.suse.com/suma/4.3/en/suse-manager/client-configuration/contact-methods-migrate-traditional.html.

  • 従来の接続プロトコルは、SUSE Multi-Linux Manager 5.0以降ではサポートされなくなりました。

This guide only covers the migration from SUSE Multi-Linux Manager 4.3 to 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. ホスト名

  • 現在、この移行手順にはホスト名の名前変更機能が含まれていません。そのため、新しいサーバの完全修飾ドメイン名(FQDN)は古いサーバのFQDNと同じままです。

  • クライアントがサーバに確実に接続できるよう、IPアドレスは変更しないままにする必要があります。

    移行後、新しいサーバを指すようにDHCPおよびDNSレコードを手動で更新する必要があります。

1.3. GPGキー

  • 自己信頼GPGキーは移行されません。

  • RPMデータベースで信頼されているGPGキーのみが移行されます。したがって、spacewalk-repo-syncでチャンネルを同期すると失敗する可能性があります。

  • 管理者は、サーバを実際に移行した後にこれらのキーを4.3のインストールからコンテナホストに手動で移行する必要があります。

    プロシージャ: 4.3 GPGキーの新しいサーバへの手動移行
    1. 4.3サーバから新しいサーバのコンテナホストにキーをコピーします。

    2. その後、コマンドmgradm gpg add <PATH_TO_KEY_FILE>を使用して、移行したサーバに各キーを追加します。

2. 移行

2.1. SUSE Multi-Linux Manager 5.1サーバホストの準備

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.

以下のステップでは、ホストシステムの準備のみを行い、実際のSUSE Multi-Linux Manager 5.1サーバーのインストールは行いません。

2.1.1. Prepare SL Micro 6.1 Host

2.1.1.1. インストールメディアのダウンロード
プロシージャ: インストールメディアのダウンロード
  1. Locate the SL Micro 6.1 installation media at https://www.suse.com/download/sle-micro/, and download the appropriate media file.

  2. インストール用のDVDまたはUSBフラッシュドライブ(ダウンロードした.isoイメージを含む)を準備します。

2.1.1.2. Install SL Micro 6.1

For more information about preparing your machines (virtual or physical), see the SL Micro Deployment Guide.

Procedure: Installing SL Micro 6.1
  1. SLE Micro 6.1のインストールイメージを含むDVDまたはUSBフラッシュドライブ(USBディスクまたはキー)を挿入します。

  2. システムをブートまたは再起動します。

  3. 矢印キーを使用してインストールを選択します。

  4. キーボードと言語を調整します。

  5. チェックボックスをクリックしてライセンス契約に同意します。

  6. 次へをクリックして続行します。

  7. 登録方法を選択します。この例では、SUSE Customer Centerを使用してサーバを登録します。

    SUSE Multi-Linux Manager 5.1コンテナは拡張機能としてインストールされます。以下のリストから必要な特定の拡張機能に応じて、それぞれに追加のSUSE Customer Center登録コードが必要です。

    • 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. SUSE Customer Centerの電子メールアドレスを入力します。

  9. Enter your registration code for SL Micro 6.1.

  10. 次へをクリックして続行します。

  11. プロキシをインストールするにはSUSE Multi-Linux Manager 5.1プロキシ拡張機能、サーバをインストールするにはSUSE Multi-Linux Manager 5.1サーバ拡張機能のチェックボックスを選択します。

  12. 次へをクリックして続行します。

  13. SUSE Multi-Linux Manager 5.1拡張機能の登録コードを入力します。

  14. 次へをクリックして続行します。

  15. NTP設定ページで、次へをクリックします。

  16. Authentication for the System (システムの認証)ページで、rootユーザのパスワードを入力します。Click 次へをクリックします。

  17. インストール設定ページで、インストールをクリックします。

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

2.1.1.3. オプション: コマンドラインからの登録

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.

次のステップでは、SUSE Multi-Linux Manager 5.1拡張機能をx86-64アーキテクチャに登録します。そのため、x86-64アーキテクチャの登録コードが必要になります。ARMまたはs390xアーキテクチャを登録する場合は、正しい登録コードを使用してください。

プロシージャ: コマンドラインからの登録
  1. 次のコマンドで利用可能な拡張機能を一覧表示します。

    transactional-update --quiet register --list-extensions
  2. 利用可能な拡張機能のリストから、インストールしたい拡張機能を選択します。

    1. サーバをインストールする場合は、次のコマンドで SUSE Multi-Linux Manager Server Extension 5.1 x86_64の登録コードを使用します。

      transactional-update register -p Multi-Linux-Manager-Server/5.1/x86_64 -r <reg_code>
    2. プロキシをインストールする場合は、次のコマンドでSUSE Multi-Linux Manager Proxy Extension 5.1 x86_64の登録コードを使用します。

      transactional-update register -p Multi-Linux-Manager-Proxy/5.1/x86_64 -r <reg_code>
  3. 再起動します。

2.1.1.4. システムの更新
プロシージャ: システムの更新
  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.

次のプロシージャでは、インストールプロセスの主なステップについて説明します。

Procedure: Installing SUSE Multi-Linux Manager Extensions on SUSE Linux Enterprise Server 15 SP7
  1. Locate and download SUSE Linux Enterprise Server 15 SP7 .iso at https://www.suse.com/download/sles/.

  2. Make sure that you have regsistration codes both for the host operating system (SUSE Linux Enterprise Server 15 SP7) and extensions

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

    1. Language, Keyboard and Product Selection(言語、キーボードおよび製品の選択)で、インストールする製品を選択します。

    2. ライセンス契約で契約を読み、[I Agree to the License Terms( ライセンス条項に同意します)にチェックを付けます。

  4. 登録方法を選択します。この例では、SUSEカスタマーセンターにサーバを登録します。

  5. SUSE Customer Centerの電子メールアドレスを入力します。

  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. 拡張とモジュールの選択で、以下にチェックを付けます。

    • サーバをインストールするにはSUSE Multi-Linux Managerサーバ拡張機能を選択し、プロキシをインストールするにはSUSE Multi-Linux Managerプロキシ拡張機能を選択します。

    • ベースシステムモジュール

    • Containersモジュール

  9. 次へをクリックして続行します。

  10. SUSE Multi-Linux Manager 5.1拡張機能の登録コードを入力します。

  11. 次へをクリックして続行します。

  12. インストールを完了します。

  13. インストールが完了したら、rootとして新しくインストールしたサーバにログインします。

  14. システムを更新します(オプション。インストール時にシステムが更新をダウンロードするように設定されていない場合)。

    zypper up
  15. 再起動します。

  16. rootとしてログインし、podmanmgradm、およびmgradm-bash-completionをインストールします(まだ自動的にインストールされていない場合)。

    zypper install podman mgradm mgradm-bash-completion
  17. システムを再起動するか、次のコマンドを実行してPodmanサービスを起動します。

    systemctl enable --now podman.service

2.2. SSH接続の準備

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. rootに対して、新しい5.1サーバ上にSSHキーが存在することを確認します。存在しない場合は、次のコマンドを使用して作成します。

    ssh-keygen -t rsa
  2. パスワードを要求しない4.3サーバへの接続のために、新しいサーバ上でSSH設定とエージェントを準備する必要があります。

    eval $(ssh-agent); ssh-add

    パスワードを要求しない接続を確立するために、移行スクリプトは新しいサーバで実行されているSSHエージェントに依存します。このエージェントがまだアクティブではない場合は、eval $(ssh-agent)を実行して開始します。その後、ssh-addに続けて機密鍵へのパスを指定し、実行中のエージェントにSSHキーを追加します。このプロセス中に、機密鍵のパスワードの入力を求められます。

  3. ssh-copy-idを使用して、SSH公開鍵をSUSE Multi-Linux Manager 4.3サーバ(<oldserver.fqdn>)にコピーします。<oldserver.fqdn>は、4.3サーバのFQDNに置き換えてください。

    ssh-copy-id <old server.fqdn>

    SSHキーは、古いサーバの~/.ssh/authorized_keysファイルにコピーされます。 詳細については、ssh-copy-idのマニュアルページを参照してください。

  4. 新しいサーバから古いSUSE Multi-Linux ManagerサーバへのSSH接続を確立し、パスワードが不要であることを確認します。また、ホストの指紋に問題がないことも確認します。問題がある場合は、古い指紋を~/.ssh/known_hostsファイルから削除して、もう一度実行します。指紋はローカルの~/.ssh/known_hostsファイルに保存されます。

2.3. 移行の実行

SUSE Multi-Linux Manager 4.3からSUSE Multi-Linux Manager 5.1への移行を計画する際は、ターゲットのインスタンスが古い設定の仕様を満たしているか、上回っていることを確認します。

これには、メモリ(RAM)、CPUコア、ストレージ、ネットワーク帯域幅が含まれますが、これらに限定されません。

SUSE Multi-Linux Manager server hosts that are hardened for security may restrict execution of files from the /tmp folder. In such cases, as a workaround, export the TMPDIR environment variable to another existing path before running mgradm. For example:

export TMPDIR=/path/to/other/tmp

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

プロシージャ: 移行を実行する
  1. このステップはオプションです。ご使用のインフラストラクチャにカスタム永続ストレージが必要な場合は、mgr-storage-serverツールを使用します。mgr-storage-serverの詳細については、installation-and-upgrade:hardware-requirements.adoc#install-hardware-requirements-storageを参照してください。

  2. 次のコマンドを実行して、新しいSUSE Multi-Linux Managerサーバをインストールします。<oldserver.fqdn>は4.3サーバのFQDNに置き換えてください。

    移行プロセスを開始する前に、4.3サーバを必ずアップグレードして、利用可能なすべての更新を適用してください。 また、不要なチャンネルを削除すると、全体的な移行時間を短縮できます。

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

    最終移行時のみ、古いサーバ上のプロセスを停止する必要があります。

    最終複製以外のすべての複製については、古いサーバ上のサービスを自動的に停止しないように、パラメータ--prepareを追加します。たとえば、SUSE Multi-Linux Managerサーバ上では、次のようになります。

    mgradm migrate podman <oldserver.fqdn> --prepare
プロシージャ: 最終移行
  1. 4.3サーバ上のSUSE Multi-Linux Managerサービスを停止します。

    spacewalk-service stop
  2. 4.3サーバ上のPostgreSQLサービスを停止します。

    systemctl stop postgresql
  3. SUSE Multi-Linux Managerサーバで移行を実行します。

    mgradm migrate podman <oldserver.fqdn>
  4. 信頼されているSSL CA証明書を移行します。

2.3.1. 証明書の移行

RPMの一部としてインストールされ、SUSE Multi-Linux Manager 4.3の/usr/share/pki/trust/anchors/ディレクトリに保存されている信頼済みSSL CA証明書は移行されません。SUSEはRPMパッケージをコンテナ内にインストールしないため、管理者は移行後にこれらの証明書ファイルを4.3のインストールから手動で移行する必要があります。

プロシージャ: 証明書の移行
  1. 4.3サーバから新しいサーバにファイルをコピーします。 たとえば、/local/ca.fileです。

  2. 次のコマンドを使用してファイルをコンテナにコピーします。

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

mgradm migrateコマンドの実行が正常に完了した後も、すべてのクライアント上のSaltセットアップはまだ古い4.3サーバを指したままです。

これらを5.1サーバにリダイレクトするために、新しいサーバの名前をインフラストラクチャレベル(DHCPおよびDNS)で変更し、4.3サーバと同じFQDNとIPアドレスを使用する必要があります。

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.

SUSE Multi-Linux Manager 5.1 introduces a rebranded set of client tools for all supported operating systems. This transition is seamless, and users performing a new product synchronization should only notice the updated channel names.

Channels named SUSE Manager Client Tools for XYZ, used by clients previously registered with SUSE Multi-Linux Manager 4.3 or 5.0, are no longer available in version 5.1 and will no longer receive updates in 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:

  • Mirror the new SUSE Multi-Linux Manager Client Tools for XYZ channels for the relevant products and assign them to the appropriate clients.

  • Unassign the outdated SUSE Manager Client Tools for XYZ channels.

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