SUSE Multi-Linux Manager 5.1プロキシの配備

This guide outlines the deployment process for the SUSE Multi-Linux Manager 5.1 Proxy container on SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7. This guide presumes you have already successfully deployed a SUSE Multi-Linux Manager 5.1 Server.

SL Micro is only supported as regular minion (default contact method) for the time being. We are working on managing it as Salt SSH client (salt-ssh contact method), too.

正常に配備するには、次のアクションを実行します。

プロシージャ: プロキシを配備する
  1. ハードウェア要件を確認します。

  2. Synchronize the SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7 parent channel and the proxy extension child channel on the server.

  3. Install SL Micro or SUSE Linux Enterprise Server on a bare-metal machine.

  4. During the installation, register SL Micro or SUSE Linux Enterprise Server along with the SUSE Multi-Linux Manager Proxy extension.

  5. Saltのアクティベーションキーを作成します。

  6. デフォルト接続メソッドを使用して、プロキシをクライアントとしてブートストラップします。

  7. プロキシ設定を生成します。

  8. サーバからプロキシにプロキシ設定を転送します。

  9. プロキシ設定を使用して、クライアントをSUSE Multi-Linux Managerにプロキシとして登録します。

プロキシコンテナホストでサポートされるオペレーティングシステム

The supported operating system for the container host are SL Micro 6.1 and SUSE Linux Enterprise Server 15 SP7.

コンテナホスト

コンテナホストは、コンテナを管理および配備できるPodmanなどのコンテナエンジンを搭載したサーバです。これらのコンテナは、アプリケーションと、ライブラリなどの重要な部品を保持していますが、完全なオペレーティングシステムは保持しないため軽量です。このセットアップにより、アプリケーションは異なる環境でも同じように動作します。CPU、メモリ、ストレージなど、これらのコンテナに必要なリソースはコンテナホストが提供します。

1. プロキシのハードウェア要件

SUSE Multi-Linux Managerプロキシを配備するためのハードウェア要件の詳細については、installation-and-upgrade:hardware-requirements.adoc#proxy-hardware-requirementsを参照してください。

2. 親とプロキシ拡張機能の子チャンネルの同期

This section presumes that you have already entered your organization credentials under the Admin  Setup Wizard  Organization Credentials in the server’s Web UI. Products are listed on the Admin  Setup Wizard  Products page. This channel must be fully synchronized on the server, with the child channel Proxy as an extension option selected.

Procedure: Synchronizing the Parent Channel and Proxy Extension
  1. SUSE Multi-Linux ManagerのWeb UIで、管理  製品を選択します。

  2. From the products page enter SL Micro or SUSE Linux Enterprise Server in the filter field.

  3. 続いて、ドロップダウンを使用して必要なアーキテクチャを選択します。この例では、[x86-64]を選択します。

  4. In the Product Description field select the SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7 checkbox then use the drop-down to select the SUSE Multi-Linux Manager Proxy Extension 5.1 x86_64 extension.

  5. 製品の追加をクリックします。

  6. 同期が完了するまで待ちます。

3. Prepare SUSE Multi-Linux Manager Proxy Host

3.1. Install SL Micro 6.1 and Deploy Proxy

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

  2. ISOをダウンロードするには、SUSE Customer Centerのアカウントが必要で、ログインしている必要があります。

  3. Download SL-Micro-6.1-DVD-x86_64-GM-Media1.iso.

  4. インストール用のUSBフラッシュディスクまたはDVDを準備します。

  5. Insert a DVD or a bootable USB stick containing the installation image for SL Micro 6.1.

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

For detailed documentation on preparing your machines OS (virtual or physical), see Introduction to SL Micro 6.1 Deployment.

Procedure: Installing SL Micro 6.1
  1. 矢印キーを使用してインストールを選択します。

  2. キーボードと言語を調整します。チェックボックスをクリックしてライセンス契約に同意します。

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

  4. 登録方法を選択します。この例では、SUSE Customer Centerでプロキシを登録します。

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

  6. Enter your registration code for SL Micro 6.1.

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

  8. SUSE Multi-Linux Manager 5.1プロキシ拡張機能のチェックボックスをオンにします。

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

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

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

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

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

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

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

3.1.1. システムの更新

プロシージャ: システムの更新
  1. rootとしてログインします。

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

    transactional-update
  3. システムを再起動します。

  4. rootとしてログインします。

  5. Install the container utilities (mgrpxy should already be installed automatically):

    transactional-update pkg install mgrpxy-bash-completion

    または、mgrpxy-zsh-completionまたはmgrpxy-fish-completionをインストールできます。

  6. システムを再起動します。

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

To continue with deployment, see カスタム永続ストレージの設定.

3.2. Install SUSE Linux Enterprise Server 15 SP7 and Deploy Proxy

Alternatively, you can install SUSE Multi-Linux Manager Proxy on SUSE Linux Enterprise Server 15 SP7. The following procedure describes the main steps of the installation process.

Procedure: Installing SUSE Multi-Linux Manager Proxy 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 the SCC code you plan to use has the Extensions enabled.

  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. Select the registration method.

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

  5. 拡張とモジュールの選択で、以下にチェックを付けます。

    • SUSE Multi-Linux Managerプロキシ拡張機能

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

    • Containersモジュール

      Enter the SUSE Multi-Linux Manager Extension regcode.

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

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

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

    zypper up
  9. 再起動します。

  10. Log in as root and install podman plus mgrpxy and mgrpxy-bash-completion (if not already automatically installed):

    zypper install podman mgrpxy mgrpxy-bash-completion
  11. Start the Podman service by rebooting the system, or running a command:

    systemctl enable --now podman.service

To continue with deployment, see カスタム永続ストレージの設定.

4. カスタム永続ストレージの設定

Configuring persistent storage is optional, but it is the only way to avoid serious trouble with container full disk conditions. If custom persistent storage is required for your infrastructure, use the mgr-storage-proxy tool.

  • 詳細については、mgr-storage-proxy --helpを参照してください。このツールを使用すると、コンテナストレージとSquidキャッシュボリュームの作成が容易になります。

このコマンドは次のように使用します。

mgr-storage-proxy <storage-disk-device>

例:

mgr-storage-proxy /dev/nvme1n1

このコマンドは、/var/lib/containers/storage/volumesに永続ストレージを作成します。

詳細については、以下を参照してください。

5. プロキシのアクティベーションキーの作成

プロシージャ: アクティベーションキーの作成
  1. Navigate to Systems  Activation Keys , and click Create key.

  2. SLE Micro 6.1を親チャンネルとして使用して、プロキシホストのアクティベーションキーを作成します。このキーには、推奨されるすべてのチャンネルと、拡張機能としてのプロキシの子チャンネルが含まれる必要があります。

  3. 続行して、プロキシホストをデフォルトクライアントとしてブートストラップします。

6. クライアントとしてのプロキシホストのブートストラップ

プロシージャ: プロキシホストのブートストラップ
  1. システム  ブートストラップを選択します。

  2. プロキシホストのフィールドに入力します。

  3. ドロップダウンから、前のステップで作成したアクティベーションキーを選択します。

  4. Click ブートストラップをクリックします。

  5. ブートストラッププロセスが完了するまで待ちます。Saltメニューをチェックし、Saltキーが一覧表示されていて受け入れられていることを確認します。

  6. プロキシホストを再起動します。

  7. すべてのイベントが終了したら、システムの一覧からホストを選択して2回目の再起動をトリガし、オンボーディングを完了します。

プロシージャ: プロキシホストの更新
  1. システムの一覧からホストを選択し、すべてのパッチを適用してホストを更新します。

  2. プロキシホストを再起動します。

7. Generate Proxy Configuration

SUSE Multi-Linux Managerプロキシの設定アーカイブはSUSE Multi-Linux Managerサーバによって生成されます。追加のプロキシごとに専用の設定アーカイブが必要です。

Podmanの配備では、このプロキシ設定を生成する前に、SUSE Multi-Linux ManagerプロキシのコンテナホストをSUSE Multi-Linux Managerサーバにクライアントとして登録する必要があります。

プロキシFQDNを使用して、登録済みのクライアントではないプロキシコンテナ設定を生成すると(Kubernetesのユースケースと同様)、新しいシステムエントリがシステム一覧に表示されます。この新しいエントリは、以前に入力されたプロキシFQDN値の下に表示され、外部システムタイプになります。

7.1. Web UIを使用したプロキシ設定の生成

Procedure: Generating a Proxy Container Configuration Using Web UI
  1. Web UIで、システム  プロキシの設定に移動し、必要なデータを入力します。

  2. プロキシFQDN]フィールドに、プロキシの完全修飾ドメイン名を入力します。

  3. 親FQDN]フィールドに、SUSE Multi-Linux Managerサーバまたは別のSUSE Multi-Linux Managerプロキシの完全修飾ドメイン名を入力します。

  4. プロキシSSHポート]フィールドに、SSHサービスがSUSE Multi-Linux ManagerプロキシでリスンしているSSHポートを入力します。デフォルトの8022を維持することをお勧めします。

  5. In the Max Squid cache size [MB] field type maximal allowed size for Squid cache. Recommended is to use at most 80% of available storage for the containers.

    2 GBはプロキシSquidのデフォルトのキャッシュサイズを表します。これは、環境に合わせて調整する必要があります。

  6. SSL証明書]選択リストで、SUSE Multi-Linux Managerプロキシ用に新しいサーバ証明書を生成するか、既存のサーバ証明書を使用するかを選択します。 生成された証明書は、SUSE Multi-Linux Manager組み込みの(自己署名)証明書とみなすことができます。

    選択に応じて、新しい証明書を生成するための署名CA証明書へのパス、またはプロキシ証明書として使用される既存の証明書とそのキーへのパスのいずれかを指定します。

    サーバによって生成されたCA証明書は、/var/lib/containers/storage/volumes/root/_data/ssl-buildディレクトリに保存されます。

    既存の証明書またはカスタム証明書、および企業証明書と中間証明書の概念の詳細については、SSL証明書のインポートを参照してください。

  7. 生成をクリックして、SUSE Multi-Linux Managerサーバに新しいプロキシFQDNを登録し、コンテナホストの詳細を含む設定アーカイブ(config.tar.gz)を生成します。

  8. しばらくすると、ダウンロードするファイルが表示されます。このファイルをローカルに保存します。

7.2. Generate Proxy Configuration With spacecmd and Self-Signed Certificate

spacecmdを使用してプロキシ設定を生成できます。

プロシージャ: spacecmdと自己署名証明書を使用してプロキシ設定を生成する
  1. SSHでコンテナホストに接続します。

  2. 次のコマンドを実行してサーバとプロキシFQDNを置き換えます。

    mgrctl exec -ti 'spacecmd proxy_container_config_generate_cert -- dev-pxy.example.com dev-srv.example.com 2048 email@example.com -o /tmp/config.tar.gz'
  3. 生成された設定をサーバコンテナからコピーします。

    mgrctl cp server:/tmp/config.tar.gz .

7.3. Generate Proxy Configuration With spacecmd and Custom Certificate

デフォルトの自己署名証明書ではなくカスタム証明書に対してspacecmdを使用して、プロキシ設定を生成できます。

プロシージャ: spacecmdとカスタム証明書を使用してプロキシ設定を生成する
  1. サーバコンテナホストにSSHで接続します。

  2. 次のコマンドを実行してサーバとプロキシFQDNを置き換えます。

    for f in ca.crt proxy.crt proxy.key; do
      mgrctl cp $f server:/tmp/$f
    done
    mgrctl exec -ti 'spacecmd proxy_container_config -- -p 8022 pxy.example.com srv.example.com 2048 email@example.com /tmp/ca.crt /tmp/proxy.crt /tmp/proxy.key -o /tmp/config.tar.gz'
  3. 生成された設定をサーバコンテナからコピーします。

    mgrctl cp server:/tmp/config.tar.gz .

8. プロキシ設定の転送

Web UIによって設定アーカイブが生成されます。このアーカイブをプロキシコンテナホストで利用できるようにする必要があります。

プロシージャ: プロキシ設定をコピーする
  1. まだ実行していない場合は、前のステップで生成された設定アーカイブ (config.tar.gz)をサーバコンテナからサーバホストにコピーします。

    mgrctl cp server:/root/config.tar.gz .
  2. まだ実行していない場合は、サーバホストからプロキシホストにファイルをコピーします。

    scp config.tar.gz <proxy-FQDN>:/root
  3. プロキシホストで、次のコマンドを使用してプロキシをインストールします。

    mgrpxy install podman config.tar.gz

9. SUSE Multi-Linux Managerプロキシの起動

mgrpxyコマンドを使用してコンテナを起動できます。

プロシージャ: プロキシを起動してステータスを確認する
  1. 次のコマンドを呼び出してプロキシを起動します。

    mgrpxy start
  2. 次のコマンドを呼び出してコンテナのステータスを確認します。

    mgrpxy status

    5つのSUSE Multi-Linux Managerプロキシコンテナが存在し、また、proxy-podコンテナポッドの一部である必要があります。

    • proxy-salt-broker

    • proxy-httpd

    • proxy-tftpd

    • proxy-squid

    • proxy-ssh

10. Use a Custom Container Image for a Service

デフォルトでは、SUSE Multi-Linux Managerプロキシスイートは、そのサービスごとに同じイメージバージョンとレジストリパスを使用するように設定されています。ただし、-tagおよび-imageで終わるインストールパラメータを使用して、特定のサービスのデフォルト値を上書きすることは可能です。

例:

mgrpxy install podman --httpd-tag 0.1.0 --httpd-image registry.opensuse.org/uyuni/proxy-httpd /path/to/config.tar.gz

これは、httpdサービスの設定ファイルを調整してから再起動します。registry.opensuse.org/uyuni/proxy-httpdsは使用するイメージ、0.1.0はバージョンタグです。

値をデフォルトにリセットするには、これらのパラメータを指定せずにもう一度installコマンドを実行します。

mgrpxy install podman /path/to/config.tar.gz

このコマンドは、すべてのサービスの設定をグローバルデフォルトにリセットして再ロードします。