コンテナ化されたSUSE Multi-Linux Managerプロキシの設定

SUSE Multi-Linux Managerプロキシコンテナのコンテナホストが準備された後に、コンテナの設定では、設定を完了するための追加の手順がいくつか必要になります。

プロシージャ
  1. SUSE Multi-Linux Managerプロキシ設定アーカイブファイルを生成します

  2. インストールステップで準備したコンテナホストに設定アーカイブを転送し、抽出します

  3. Start the proxy sevices with mgrpxy

1. プロキシ設定の生成

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.

周辺機器サーバは常にサードパーティSSL証明書を使用しています。 ハブサーバが周辺機器サーバの証明書を生成している場合は、各プロキシの証明書も生成する必要があります。 ハブサーバで、次のコマンドを実行します。

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"

使用するファイルは、 * /root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT as the root CA, * /root/ssl-build/<hostname>/server.crt as the proxy certificate and * /root/ssl-build/<hostname>/server.key as the proxy certificate’s key.

1.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 new server certificate should be generated for SUSE Multi-Linux Manager Proxy or an existing one should be used. You can consider generated certificates as SUSE Multi-Linux Manager builtin (self signed) certificates.

+

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

+

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

+

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

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

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

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

You can generate a Proxy configuration using 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 .

1.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. 次のコマンドを実行してサーバとプロキシ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 .

2. SUSE Multi-Linux Managerプロキシ設定の転送

Both spacecmd command and generating via Web UI ways create a configuration archive. This archive needs to be made available on container host. Transfer this generated archive to the container host.

3. SUSE Multi-Linux Managerプロキシコンテナの起動

Container can be started with the mgrpxy command.

プロシージャ: SUSE Multi-Linux Managerプロキシコンテナの起動
  1. コマンドを実行します。

    mgrpxy start uyuni-proxy-pod
  2. 次のコマンドを呼び出して、すべてのコンテナが期待どおりに起動したかどうかを確認します。

    podman ps

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

  • proxy-salt-broker

  • proxy-httpd

  • proxy-tftpd

  • proxy-squid

  • proxy-ssh