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

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がインストールされた新しいマシンが必要です。

  • 選択したホストオペレーティングシステムがSL Micro 6.1またはSUSE Linux Enterprise Server 15 SP7のいずれであっても、SUSE Multi-Linux Manager 4.3 から5.1へのインプレース移行はサポートされていません。

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.

  • 従来の接続プロトコルは、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. ホスト名

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

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

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 certificates are needed at a later stage. If not using the self-signed generated CA and certificates, ensure you have the following before starting:

  • 認証局(CA) SSLパブリック証明書。 CAチェーンを使用している場合は、すべての中間CAも使用できる必要があります。

  • An SSL database private key.

  • An SSL database certificate.

すべてのファイルがPEM形式である必要があります。

SSLサーバ証明書のホスト名は、配備先マシンの完全修飾ホスト名と一致している必要があります。 ホスト名は、証明書のX509v3 Subject Alternative Nameセクションで設定できます。 環境で必要な場合は、複数のホスト名を一覧にすることもできます。 サポートされているキーの種類は、RSAEC (Elliptic Curve)です。

Database SSL certificate requires reportdb and db and the FQDN used to access the report database as Subject Alternative Name.

During a migration the server SSL certificate and CA chain are copied from the source server, meaning that only the database certificates are required

2. 移行

2.1. Prepare SUSE Multi-Linux Manager 5.1 server host

準備されたSL Micro 6.1またはSUSE Linux Enterprise Server 15 SP7システムにSUSE Multi-Linux Managerを事前にインストールしないでください。

移行プロセスは、サーバのインストールを自動的に実行するように設計されています。mgradm installを実行してからmgradm migrateを実行することはサポートされておらず、サポートされていないシステム状態を引き起こします。

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

You can use VM images based on SL Micro 6.1 as a migration target. In such a scenario, you can prepare the host system as described in

However, at the end the last step is executing the command mgradm migrate <FQDN> instead of mgradm install <FQDN>.

2.1.1. SLE Micro 6.1ホストの準備

2.1.1.1. インストールメディアのダウンロード
Procedure: Downloading the installation media
  1. https://www.suse.com/download/sle-micro/でSL Micro 6.1のインストールメディアを見つけて、適切なメディアファイルをダウンロードします。

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

2.1.1.2. SL Micro 6.1のインストール

マシン(仮想または物理)の準備の詳細については、SL Micro配備ガイドを参照してください。

プロシージャ: 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

    SL Micro 6.1エンタイトルメントは、SUSE Multi-Linux Managerエンタイトルメント内に含まれているため、別途登録コードは必要ありません。

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

  9. 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. インストール設定ページで、インストールをクリックします。

これで、拡張機能としてのSL Micro 6.1とSUSE Multi-Linux Manager 5.1のインストールが完了しました。

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

SL Micro 6.1のインストール中にSUSE Multi-Linux Manager 5.1を拡張機能として追加した場合は、このプロシージャはスキップして構いません。ただし、オプションで、登録を行なわずに次へ進むボタンを選択することにより、SL Micro 6.1のインストール中に登録をスキップできます。このセクションでは、SL Micro 6.1のインストール後に製品を登録するステップについて説明します。

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

Procedure: Registering from the command line
  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. システムの更新
Procedure: Updating the system
  1. rootとしてログインします。

  2. transactional-updateを実行します。

    transactional-update
  3. 再起動します。

SL Microはデフォルトで自己更新するように設計されており、更新を適用すると再起動します。ただし、SUSE Multi-Linux Manager環境ではこの動作は望ましくありません。サーバの自動更新を防ぐには、SUSE Multi-Linux Managerでブートストラッププロセス中にtransactional-updateのタイマを無効にします。

SL Microのデフォルトの動作を使用したい場合は、次のコマンドを実行してタイマを有効にします。

systemctl enable --now transactional-update.timer

2.1.2. Prepare SUSE Linux Enterprise Server 15 SP7 host

または、SUSE Linux Enterprise Server 15 SP7にSUSE Multi-Linux Managerを配備することもできます。

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. 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. SUSE Linux Enterprise Server 15 SP7の登録コードを入力します。

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

    SUSE Linux Enterprise Server 15 SP7には、有効なSUSE Linux Enterprise Serverサブスクリプションと対応する登録コードが必要であり、この画面で入力する必要があることに注意してください。以下でSUSE Multi-Linux Manager拡張機能の登録コードを入力する必要があります。

  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. 再起動します。

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

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. 次のコマンドで利用可能な拡張機能を一覧表示します。

    SUSEConnect --list-extensions

    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. Install and enable 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
    • On the proxies:

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

      Make sure that package podman is installed. Additionally, on the server mgradm and mgradm-bash-completion or on the proxies, mgrpxy and mgrpxy-bash-completion also need to be installed.

  2. システムを再起動するか、次のコマンドを実行してPodmanサービスを起動します。

    systemctl enable --now podman.service

2.2. SSH connection preparation

このステップを使用すると、新しいSUSE Multi-Linux Manager 5.1サーバが既存の4.3サーバにパスワードを必要とせずにSSH経由で接続できるようになります。このステップには、SSHキーの生成と設定、SSHエージェントのセットアップ、および公開鍵の古いサーバへのコピーが含まれます。このセットアップは、手動による介入なしに移行プロセスを実行するために必要です。

プロシージャ: 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. 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.

これには、メモリ(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.

例:

export TMPDIR=/path/to/other/tmp

SUSE Multi-Linux Managerの更新では、この回避策が不要になるようにツールが変更されます。

When migrating from SUSE Manager 4.3, you will be prompted for the Password for the CA key to generate. It is essential to enter the same CA password that was used in your SUSE Manager 4.3 installation.

Entering the wrong password will result in a failure to generate the database certificate and will cause the migration to abort with the following error:

Error: cannot configure db container: Cannot generate database certificate: CA validation failed!

Make sure the correct CA password is available before starting the migration process.

Procedure: Performing the migration
  1. このステップはオプションです。ご使用のインフラストラクチャにカスタム永続ストレージが必要な場合は、mgr-storage-serverツールを使用します。mgr-storage-serverの詳細については、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:

    移行プロセスを開始する前に、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 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.

    For all non-final replications add the parameter --prepare to prevent the automatic stopping of services on the old 4.3 server.

    mgradm migrate podman <oldserver.fqdn> --prepare
Procedure: Final migration
  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サーバを指したままです。

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

クライアントにminionの最新バージョンがインストールされている場合、IPアドレスの調整は不要です。新しいバージョンではFQDNのみを使用してサーバに自動的に再接続できるためです。

3. Client tools rebranding

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.

移行後もレガシチャンネルは既存のクライアントに割り当てられたままですが、対応するリポジトリは削除されています。

継続的な更新を確実に行うには、ユーザは以下の操作を実行する必要があります。

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

これにより、古いクライアントツールに基づくCLMプロジェクトも適宜調整する必要があります。

For example workflow, see Switch to new client tools channels.