SUSE Multi-Linux Manager Proxy Deployment

このガイドでは、SL Micro 6.2またはSUSE Linux Enterprise Server 15 SP7上のSUSE Multi-Linux Manager 5.2プロキシコンテナの配備プロセスについて説明します。このガイドでは、SUSE Multi-Linux Manager 5.2サーバが正常に配備済みであることを想定しています。

If you want to deploy SUSE Multi-Linux Manager Proxy on Kubernetes, see SUSE Multi-Linux Manager Proxy Deployment on Kubernetes.

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.

It is possible to convert existing client to proxy. For more information, see クライアントをMLMプロキシに変換する.

To successfully deploy a new proxy, follow the procedure:

Procedure: Deploying proxy
  1. ハードウェア要件を確認します。

  2. SL Micro 6.2またはSUSE Linux Enterprise Server 15 SP7親チャンネルとサーバ上のプロキシ拡張機能の子チャンネルを同期します。

  3. ベアメタルマシンにSL MicroまたはSUSE Linux Enterprise Serverをインストールします。

  4. Create a Salt activation key with Proxy Extension.

  5. Bootstrap the proxy as a client with the default connection method.

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

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

  8. プロキシにパッケージをインストールします。

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

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

コンテナホストでサポートされているオペレーティングシステムはSL Micro 6.2とSUSE Linux Enterprise Server 15 SP7です。

コンテナホスト

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

1. Hardware requirements for the proxy

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

2. Synchronize the parent and proxy extension child channels

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. [製品]ページから、フィルタフィールドに「SL Micro」または「SUSE Linux Enterprise Server」と入力します。

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

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

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

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

3. Prepare the SUSE Multi-Linux Manager proxy host

以下のサブセクションで、SLE MicroまたはSUSE Linux Enterprise Serverを使用してプロキシホストを準備します。

3.1. SL Micro 6.2ホストの準備

3.1.1. インストールメディアのダウンロード

プロシージャ: インストールメディアのダウンロード
  1. https://www.suse.com/download/sle-micro/でSL Micro 6.2のインストールメディアを見つけて、適切なメディアファイルをダウンロードします。

  2. Prepare a DVD or USB flash drive with the downloaded .iso image for installation.

3.1.2. SL Micro 6.2のインストール

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

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

  3. Use the arrow keys to select Installation.

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

  5. Click the checkbox to accept the license agreement.

  6. Click Next to continue.

  7. Skip the registration. The SL Micro 6.2 entitlement is included within the SUSE Multi-Linux Manager entitlement.

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

  9. On the NTP Configuration page click Next.

  10. On the Authentication for the System page enter a password for the root user. Click Next.

  11. On the Installation Settings page click Install.

これで、SL Micro 6.2と拡張機能としてのSUSE Multi-Linux Manager 5.2のインストールは完了です。マシン(仮想または物理)の準備の詳細については、SL Micro配備ガイドを参照してください。

3.1.3. システムの更新

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

配備を続行するには、Configure custom persistent storageを参照してください。

3.2. SUSE Linux Enterprise Server 15 SP7ホストの準備

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

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

3.2.1. SUSE Linux Enterprise ServerにSUSE Multi-Linux Manager拡張機能をインストールする

プロシージャ: SUSE Linux Enterprise ServerにSUSE Multi-Linux Manager拡張機能をインストールする
  1. Locate and download SUSE Linux Enterprise Server 15 SP7 .iso at https://www.suse.com/download/sles/.

  2. SUSE Linux Enterprise Server 15 SP7のインストールを開始します。

    1. On the Language, keyboard and product selection select the product to install.

    2. On the License agreement read the agreement and check I Agree to the License Terms.

  3. 登録はスキップします。

  4. Click Next to continue.

    SUSE Linux Enterprise Server 15 SP7には、有効なSUSE Linux Enterprise Serverサブスクリプションがサーバに設定されている必要があることに注意してください。

  5. In the screen Extensions and Modules Selection check the following:

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

    • Containersモジュール

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

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

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

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

    zypper up
  10. 再起動します。

配備を続行するには、Configure custom persistent storageを参照してください。

4. Configure custom persistent storage

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.

For more information, see mgr-storage-proxy --help. This tool simplifies creating the container storage and Squid cache volumes.

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

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

例:

mgr-storage-proxy /dev/nvme1n1

This command will create the persistent storage volumes at /var/lib/containers/storage/volumes.

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

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

プロシージャ: アクティベーションキーの作成
  1. システム  アクティベーションキーに移動し、キーの作成をクリックします。

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

  3. Proceed to boostrapping the proxy host as a default client.

Ensure the Proxy is assigned only to original vendor channels.

Assigning cloned channels is not supported at this moment.

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

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

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

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

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

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

  6. オペレーティングシステムがSL Microの場合はプロキシホストを再起動します。

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

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

  2. オペレーティングシステムがSL Microの場合はプロキシホストを再起動します。

7. プロキシ設定の生成

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

コンテナ化されたSUSE Multi-Linux Managerプロキシの場合、変更を有効にするには、新しいプロキシ設定ファイルを構築してから、コンテナを再配備する必要があります。 これは、SSL証明書を含む、設定を更新するためのプロセスです。

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

If a proxy FQDN is used to generate a proxy container configuration that is not a registered client (as in the Kubernetes use case), a new system entry will appear in system list. This new entry will be shown under previously entered Proxy FQDN value and will be of Foreign system type.

Peripheral servers are always using third-party SSL certificates. If the hub server has generated the certificates for the peripheral server, it needs to generate the certificate of each proxy too.

On the hub server, run the following command.

mgrctl exec -ti -- rhn-ssl-tool --gen-server --dir="/root/ssl-build" --set-country="COUNTRY" \
  --set-state="STATE" --set-city="CITY" --set-org="ORGANIZATION" \
  --set-org-unit="ORGANIZATION UNIT" --set-email="name@example.com" \
  --set-hostname=PROXY --set-cname="proxy.example.com"

使用するファイルは、

  1. /root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT as the root CA,

  2. /root/ssl-build/<hostname>/server.crt as the proxy certificate and

  3. /root/ssl-build/<hostname>/server.key as the proxy certificate’s key.

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

プロシージャ: Web UIを使用してプロキシコンテナ設定を生成する
  1. Web UIで、システム  プロキシの設定に移動し、必要なデータを入力します。

  2. In the Proxy FQDN field type fully qualified domain name for the proxy.

  3. In the Parent FQDN field type fully qualified domain name for the SUSE Multi-Linux Manager Server or another SUSE Multi-Linux Manager Proxy.

  4. In the Proxy SSH port field type SSH port on which SSH service is listening on SUSE Multi-Linux Manager Proxy. Recommended is to keep default 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のデフォルトのキャッシュサイズを表します。これは、環境に合わせて調整する必要があります。

    In the SSL certificate selection list choose if a new server certificate should be generated for SUSE Multi-Linux Manager Proxy, an existing one should be used, or the SSL part should be skipped entirely. You can consider generated certificates as SUSE Multi-Linux Manager builtin (self signed) certificates. If SUSE Multi-Linux Manager server runs on Kubernetes, the generated certificate option is not possible and replaced with no SSL certificate as they are managed outside the containers.

    Depending on the choice then provide either path to signing CA certificate to generate a new certificate or path to an existing certificate and its key to be used as proxy certificate. If the SSL part is skipped, the resulting configuration archive does not carry server_crt, server_key or ca_crt; the deployment is then responsible for providing the proxy certificate and root CA out-of-band (for Kubernetes deployments this means creating proxy-cert and uyuni-ca manually — see the TLS setup section of the Kubernetes proxy deployment page).

    The CA certificates generated by the server are stored in the /var/lib/containers/storage/volumes/root/_data/ssl-build directory.

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

  6. Click Generate to register a new proxy FQDN in the SUSE Multi-Linux Manager Server and generate a configuration archive (config.tar.gz) containing details for the container host.

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

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

You can generate a Proxy configuration using spacecmd. This is only possible if SUSE Multi-Linux Manager server runs on podman and has a self-signed root CA certificate.

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

You can generate a Proxy configuration using spacecmd for custom certificates rather than the default self-signed certificates.

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

  2. Execute the following commands, replacing the Server and Proxy 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. 設定で中間CAを使用する場合は、それもコピーし、-iオプション付きでコマンドに含めます(必要に応じて複数回指定できます)。

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

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

7.4. Generate Proxy Configuration With spacecmd and no Certificate

You can generate a Proxy configuration using spacecmd with no TLS certificates. This is needed for SUSE Multi-Linux Manager running on Kubernetes as the certificates are handled outside of the containers.

Procedure: Generating Proxy Configuration with spacecmd and no Certificate
  1. サーバコンテナホストにSSHで接続します。

  2. Execute the following commands, replacing the Server and Proxy 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_nossl -- -p 8022 pxy.example.com srv.example.com 2048 email@example.com -o /tmp/config.tar.gz'
  3. 生成された設定をサーバコンテナからコピーします。

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

8. プロキシ設定の転送

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

プロシージャ: プロキシ設定をコピーする
  1. If not already done, copy the configuration archive (config.tar.gz) generated in the previous step from the server container to the server host:

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

    scp config.tar.gz <proxy-FQDN>:/root

9. パッケージをインストールし、podmanを有効にする

Before using proxy, some packages need to be present on host and podman needs to be running.

プロシージャ: 前提条件の準備
  1. プロキシホストで、以下のパッケージがインストールされていることを確認します。

    • podman

    • mgrpxy-bash-completion

    • suse-multi-linux-manager-<version>-<arch>-proxy-httpd-image

    • suse-multi-linux-manager-<version>-<arch>-proxy-salt-broker-image

    • suse-multi-linux-manager-<version>-<arch>-proxy-squid-image

    • suse-multi-linux-manager-<version>-<arch>-proxy-ssh-image

    • suse-multi-linux-manager-<version>-<arch>-proxy-tftpd-image

      For example, for version 5.2 and architecture of x86_64, the package name would be suse-multi-linux-manager-5.1-x86_64-proxy-httpd-image.

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

    systemctl enable --now podman.service
  3. プロキシホストで、次のコマンドを使用してプロキシをインストールします。

    mgrpxy install podman config.tar.gz

10. Start the SUSE Multi-Linux Manager proxy

Container can now be started with the mgrpxy command:

Procedure: Starting and checking proxy status
  1. 次のコマンドを呼び出してプロキシを起動します。

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

    mgrpxy status

    Five SUSE Multi-Linux Manager Proxy containers should be present and should be part of the proxy-pod container pod:

    • proxy-salt-broker

    • proxy-httpd

    • proxy-tftpd

    • proxy-squid

    • proxy-ssh

11. Use a custom container image for a service

By default, the SUSE Multi-Linux Manager Proxy suite is configured to use the same image version and registry path for each of its services. However, it is possible to override the default values for a specific service using the install parameters ending with -tag and -image.

例:

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

It adjusts the configuration file for the httpd service, where registry.opensuse.org/uyuni/proxy-httpds is the image to use and 0.1.0 is the version tag, before restarting it.

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

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

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