4.4. カスタム SSL 証明書を使用する Capsule Server のロードバランシング用の設定 (Puppet を使用する)


Satellite 設定で Puppet を使用する場合は、次の手順を実行する必要があります。

4.4.1. Capsule Server のカスタム SSL 証明書の作成

以下の手順では、Certificate Signing Request (CSR) の設定ファイルを作成して、Subject Alternative Names (SAN) としてロードバランサーと Capsule Server を追加する方法を説明します。この手順は、ロードバランシング用に設定する Capsule Server ごとに実行します。

手順

  1. ソースの証明書ファイルすべてを保存するには、root ユーザーだけがアクセスできるディレクトリーを作成します。

    Copy to Clipboard Toggle word wrap
    # mkdir /root/capsule_cert
  2. 証明書署名要求 (CSR) に署名する秘密鍵を作成します。

    秘密鍵は暗号化する必要がないことに注意してください。パスワードで保護された秘密鍵を使用する場合は、秘密鍵のパスワードを削除します。

    この Capsule Server の秘密鍵がすでにある場合は、この手順を省略します。

    Copy to Clipboard Toggle word wrap
    # openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096
  3. CSR 用の /root/capsule_cert/openssl.cnf 設定ファイルを作成して、以下のコンテンツを追加します。

    Copy to Clipboard Toggle word wrap
    [ req ]
    req_extensions = v3_req
    distinguished_name = req_distinguished_name
    x509_extensions = usr_cert
    prompt = no
    
    [ req_distinguished_name ]
    commonName = capsule.example.com 
    1
    
    
    [ v3_req ]
    basicConstraints = CA:FALSE
    keyUsage = digitalSignature, keyEncipherment
    extendedKeyUsage = serverAuth, clientAuth
    subjectAltName = @alt_names
    
    [alt_names] 
    2
    
    DNS.1 = loadbalancer.example.com
    DNS.2 = capsule.example.com
    1
    証明書の共通名は、Capsule Server の FQDN と一致する必要があります。ロードバランシング用に設定する各 Capsule Server でコマンドを実行するたびに、必ず変更します。ワイルドカードの値 * を設定することもできます。ワイルドカードの値を設定しており、katello-certs-check コマンドを使用する場合には、-t capsule オプションを追加する必要があります。
    2
    [alt_names] で、ロードバランサーの FQDN は DNS.1、Capsule Server の FQDN は DNS.2 として追加します。

    [ v3_req ] パラメーターとその目的に関する詳細は、RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile を参照してください。

  4. オプション: CSR に識別名 (DN) の詳細を追加する場合は、[ req_distinguished_name ] セクションに次の情報を追加します。

    Copy to Clipboard Toggle word wrap
    [req_distinguished_name]
    CN = capsule.example.com
    countryName =My_Country_Name 
    1
    
    stateOrProvinceName = My_State_Or_Province_Name 
    2
    
    localityName = My_Locality_Name 
    3
    
    organizationName = My_Organization_Or_Company_Name
    organizationalUnitName = My_Organizational_Unit_Name 
    4
    1
    2 文字コード
    2
    Full name
    3
    フルネーム (例: ニューヨーク)
    4
    証明書を担当する部門 (例:IT 部門)
  5. CSR を生成します。

    Copy to Clipboard Toggle word wrap
    # openssl req -new \
    -key /root/capsule_cert/capsule_cert_key.pem \ 
    1
    
    -config /root/capsule_cert/openssl.cnf \ 
    2
    
    -out /root/capsule_cert/capsule_cert_csr.pem 
    3
    1
    秘密鍵へのパス
    2
    設定ファイルへのパス
    3
    生成する CSR へのパス
  6. 認証局 (CA) に証明書署名要求を送信します。Satellite Server と Capsule Server の証明書には同じ CA が署名する必要があります。

    要求を送信する場合は、証明書の有効期限を指定してください。証明書要求の送信方法にはさまざまなものがあるため、推奨される方法を CA にお問い合わせください。要求すると、CA バンドルと署名済み証明書を別々のファイルで受け取ることになります。

  7. 認証局バンドル、認証局から受け取る Capsule Server の証明書ファイル、Capsule Server の秘密鍵を、Satellite Server にコピーします。
  8. Satellite Server で、Capsule Server 証明書入力ファイルを検証します。
Copy to Clipboard Toggle word wrap
# katello-certs-check \
-c /root/{cert-name}_cert/{cert-name}_cert.pem \ 
1

-k /root/{cert-name}_cert/{cert-name}_cert_key.pem \ 
2

-b /root/{cert-name}_cert/ca_cert_bundle.pem 
3
1
認証局により提供された Capsule Server 証明書ファイル
2
証明書の署名に使用した Capsule Server の秘密鍵
3
認証局により提供された認証局バンドル

commonName= をワイルドカードの値 * に設定する場合には、-t capsule オプションを katello-certs-check コマンドに追加する必要があります。

katello-certs-check コマンドの出力である capsule-certs-generate コマンドの例をメモして、この Capsule Server の認証アーカイブファイルを作成します。

4.4.2. Puppet 証明書を生成および署名するためのカスタム SSL 証明書を使用した Capsule Server の設定

この手順は、ロードバランシング用に設定した他の Capsule Server すべてに、Puppet 証明書を生成するように Capsule Server を設定するシステムにのみ、実行してください。

手順

  1. katello-certs-check コマンドの出力から取得する capsule-certs-generate コマンドに次のオプションを追加します。

    Copy to Clipboard Toggle word wrap
    --foreman-proxy-cname loadbalancer.example.com
  2. Satellite Server で、capsule-certs-generate コマンドを入力して Capsule 証明書を生成します。

    Copy to Clipboard Toggle word wrap
    # capsule-certs-generate \
    --certs-tar /root/capsule_cert/capsule-ca.tar \
    --foreman-proxy-cname loadbalancer.example.com \
    --foreman-proxy-fqdn capsule-ca.example.com \
    --server-ca-cert /root/capsule_cert/ca_cert_bundle.pem \
    --server-cert /root/capsule_cert/capsule-ca.pem \
    --server-key /root/capsule_cert/capsule-ca.pem

    出力からの satellite-installer コマンド例のコピーを保持し、Capsule Server 証明書をインストールします。

  3. 証明書アーカイブファイルを Satellite Server から Capsule Server にコピーします。
  4. capsule-certs-generate コマンドの出力から取得する satellite-installer コマンドに次のオプションを追加します。

    Copy to Clipboard Toggle word wrap
    --enable-foreman-proxy-plugin-remote-execution-script \
    --foreman-proxy-puppetca "true" \
    --puppet-ca-server "capsule-ca.example.com" \
    --puppet-dns-alt-names "loadbalancer.example.com" \
    --puppet-server-ca "true"
  5. Capsule Server で、satellite-installer コマンドを入力します。

    Copy to Clipboard Toggle word wrap
    # satellite-installer --scenario capsule \
    --certs-cname "loadbalancer.example.com" \
    --certs-tar-file "certs.tgz" \
    --enable-foreman-proxy-plugin-remote-execution-script \
    --enable-puppet \
    --foreman-proxy-foreman-base-url "https://satellite.example.com" \
    --foreman-proxy-oauth-consumer-key "oauth key" \
    --foreman-proxy-oauth-consumer-secret "oauth secret" \
    --foreman-proxy-puppetca "true" \
    --foreman-proxy-register-in-foreman "true" \
    --foreman-proxy-trusted-hosts "satellite.example.com" \
    --foreman-proxy-trusted-hosts "capsule-ca.example.com" \
    --puppet-ca-server "capsule-ca.example.com" \
    --puppet-dns-alt-names "loadbalancer.example.com" \
    --puppet-server true \
    --puppet-server-ca "true" \
    --puppet-server-foreman-url "https://satellite.example.com"
  6. Puppetserver 認証局である Capsule Server で、Puppet サーバーを停止します。

    Copy to Clipboard Toggle word wrap
    # systemctl stop puppetserver
  7. ロードバランシングを設定する他のすべての Capsule Server に対して Puppet 証明書を生成します。ただし、Puppet 証明書署名を最初に設定したシステムを除きます。

    Copy to Clipboard Toggle word wrap
    # puppetserver ca generate \
    --ca-client \
    --certname capsule.example.com \
    --subject-alt-names loadbalancer.example.com

    このコマンドは、以下のファイルを作成します。

    • /etc/puppetlabs/puppet/ssl/certs/capsule.example.com.pem
    • /etc/puppetlabs/puppet/ssl/private_keys/capsule.example.com.pem
    • /etc/puppetlabs/puppet/ssl/public_keys/capsule.example.com.pem
    • /etc/puppetlabs/puppetserver/ca/signed/capsule.example.com.pem
  8. Puppet サーバーを再起動します。

    Copy to Clipboard Toggle word wrap
    # systemctl start puppetserver

4.4.3. ロードバランシング向けにカスタム SSL 証明書を使用した残りの Capsule Server の設定

この手順は、Puppet 証明書に署名するために Capsule Server を設定するシステムを除き、各 Capsule Server で実行します。

手順

  1. katello-certs-check コマンドの出力から取得する capsule-certs-generate コマンドに次のオプションを追加します。

    Copy to Clipboard Toggle word wrap
    --foreman-proxy-cname loadbalancer.example.com
  2. Satellite Server で、capsule-certs-generate コマンドを入力して Capsule 証明書を生成します。

    Copy to Clipboard Toggle word wrap
    # capsule-certs-generate \
    --certs-tar /root/capsule_cert/capsule.tar \
    --foreman-proxy-cname loadbalancer.example.com \
    --foreman-proxy-fqdn capsule.example.com \
    --server-ca-cert /root/capsule_cert/ca_cert_bundle.pem \
    --server-cert /root/capsule_cert/capsule.pem \
    --server-key /root/capsule_cert/capsule.pem

    出力からの satellite-installer コマンド例のコピーを保持し、Capsule Server 証明書をインストールします。

  3. 証明書アーカイブファイルを Satellite Server から Capsule Server にコピーします。

    Copy to Clipboard Toggle word wrap
    # scp /root/capsule.example.com-certs.tar root@capsule.example.com:capsule.example.com-certs.tar
  4. Capsule Server で、puppetserver パッケージをインストールします。

    Copy to Clipboard Toggle word wrap
    # satellite-maintain packages install puppetserver
  5. Capsule Server で、Puppet 証明書用のディレクトリーを作成します。

    Copy to Clipboard Toggle word wrap
    # mkdir -p /etc/puppetlabs/puppet/ssl/certs/ \
    /etc/puppetlabs/puppet/ssl/private_keys/ \
    /etc/puppetlabs/puppet/ssl/public_keys/
  6. Capsule Server で、Capsule Server を設定するシステムから、対象の Capsule Server の Puppet 証明書をコピーして、Puppet 証明書を署名します。

    Copy to Clipboard Toggle word wrap
    # scp root@capsule-ca.example.com:/etc/puppetlabs/puppet/ssl/certs/capsule.example.com.pem /etc/puppetlabs/puppet/ssl/certs/capsule.example.com.pem
    # scp root@capsule-ca.example.com:/etc/puppetlabs/puppet/ssl/certs/ca.pem /etc/puppetlabs/puppet/ssl/certs/ca.pem
    # scp root@capsule-ca.example.com:/etc/puppetlabs/puppet/ssl/private_keys/capsule.example.com.pem /etc/puppetlabs/puppet/ssl/private_keys/capsule.example.com.pem
    # scp root@capsule-ca.example.com:/etc/puppetlabs/puppet/ssl/public_keys/capsule.example.com.pem /etc/puppetlabs/puppet/ssl/public_keys/capsule.example.com.pem
  7. Capsule Server で、/etc/puppetlabs/puppet/ssl/ ディレクトリーの所有権をユーザー puppet およびグループ puppet に変更します。

    Copy to Clipboard Toggle word wrap
    # chown -R puppet:puppet /etc/puppetlabs/puppet/ssl/
  8. Capsule Server で、/etc/puppetlabs/puppet/ssl/ ディレクトリーの SELinux コンテキストを設定します。

    Copy to Clipboard Toggle word wrap
    # restorecon -Rv /etc/puppetlabs/puppet/ssl/
  9. capsule-certs-generate コマンドの出力から取得する satellite-installer コマンドに次のオプションを追加します。

    Copy to Clipboard Toggle word wrap
    --certs-cname "loadbalancer.example.com" \
    --enable-foreman-proxy-plugin-remote-execution-script \
    --foreman-proxy-puppetca "false" \
    --puppet-ca-server "capsule-ca.example.com" \
    --puppet-dns-alt-names "loadbalancer.example.com" \
    --puppet-server-ca "false"
  10. Capsule Server で、satellite-installer コマンドを入力します。

    Copy to Clipboard Toggle word wrap
    # satellite-installer --scenario capsule \
    --certs-cname "loadbalancer.example.com" \
    --certs-tar-file "capsule.example.com-certs.tar" \
    --enable-foreman-proxy-plugin-remote-execution-script \
    --foreman-proxy-foreman-base-url "https://satellite.example.com" \
    --foreman-proxy-oauth-consumer-key "oauth key" \
    --foreman-proxy-oauth-consumer-secret "oauth secret" \
    --foreman-proxy-puppetca "false" \
    --foreman-proxy-register-in-foreman "true" \
    --foreman-proxy-trusted-hosts "satellite.example.com" \
    --foreman-proxy-trusted-hosts "capsule.example.com" \
    --puppet-ca-server "capsule-ca.example.com" \
    --puppet-dns-alt-names "loadbalancer.example.com" \
    --puppet-server-ca "false" \
    --puppet-server-foreman-url "https://satellite.example.com"
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat, Inc.