4.3. カスタム SSL 証明書を使用する Capsule Server のロードバランシング用の設定 (Puppet を使用しない)
次のセクションでは、Puppet を使用せず、カスタム SSL 証明書を使用する Capsule Server をロードバランシング用に設定する方法を説明します。
4.3.1. Capsule Server のカスタム SSL 証明書の作成 リンクのコピーリンクがクリップボードにコピーされました!
以下の手順は、証明書署名要求 (CSR) の設定ファイルを作成して、サブジェクトの別名としてロードバランサーと Capsule Server を追加する方法を説明します。この手順は、ロードバランシング用に設定する Capsule Server ごとに実行します。
手順
Capsule Server で、すべてのソース証明書ファイルを含むディレクトリーを作成し、
rootユーザーのみがアクセスできるようにします。# mkdir /root/capsule_cert # cd /root/capsule_certCertificate Signing Request (CSR) を署名する秘密鍵を作成します。
秘密鍵は暗号化する必要がないことに注意してください。パスワードで保護された秘密鍵を使用する場合は、秘密鍵のパスワードを削除します。
この Capsule Server の秘密鍵がすでにある場合は、この手順を省略します。
# openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096証明書要求設定ファイルを作成して、次の内容を追加します。
[ req ] default_bits = 4096 distinguished_name = req_distinguished_name req_extensions = req_ext prompt = no [ req_distinguished_name ] countryName=2 Letter Country Code stateOrProvinceName=State or Province Full Name localityName=Locality Name 0.organizationName=Organization Name organizationalUnitName=Capsule Organization Unit Name commonName=capsule.example.com1 emailAddress=Email Address [ req_ext ] #authorityKeyIdentifier=keyid,issuer #basicConstraints=CA:FALSE keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment subjectAltName = @alt_names [alt_names]2 DNS.1 = loadbalancer.example.com DNS.2 = capsule.example.comSAN 証明書の証明書署名要求 (CSR) を作成します。
# openssl req -new \ -key /root/capsule_cert/capsule_cert_key.pem \1 -config SAN_config.cfg \2 -out /root/capsule_cert/capsule_cert_csr.pem3 証明書要求を認証局に送信します。
要求を送信する場合は、証明書の有効期限を指定してください。証明書要求を送信する方法は異なるため、推奨の方法について認証局にお問い合わせください。要求への応答で、認証局バンドルと署名済み証明書を別々のファイルで受け取ることになります。
- 認証局バンドル、認証局から受け取る Capsule Server の証明書ファイル、Capsule Server の秘密鍵を、Satellite Server にコピーします。
Satellite Server で、Capsule Server 証明書入力ファイルを検証します。
# katello-certs-check \ -c /root/capsule_cert/capsule_cert.pem \1 -k /root/capsule_cert/capsule_cert_key.pem \2 -b /root/capsule_cert/ca_cert_bundle.pem3 commonName=をワイルドカードの値*に設定する場合には、-t capsuleオプションをkatello-certs-checkコマンドに追加する必要があります。katello-certs-checkコマンドの出力であるcapsule-certs-generateコマンドの例をメモして、この Capsule Server の認証アーカイブファイルを作成します。
4.3.2. カスタム SSL 証明書を使用する Capsule Server のロードバランシング用の設定 (Puppet を使用しない) リンクのコピーリンクがクリップボードにコピーされました!
この手順は、ロードバランシング用に設定する Capsule Server ごとに実行します。
手順
katello-certs-checkコマンドの出力から取得するcapsule-certs-generateコマンドに次のオプションを追加します。--foreman-proxy-cname loadbalancer.example.comSatellite Server で、
capsule-certs-generateコマンドを入力して Capsule 証明書を生成します。例を以下に示します。# capsule-certs-generate \ --foreman-proxy-fqdn capsule.example.com \ --certs-tar /root/capsule_cert/capsule.tar \ --server-cert /root/capsule_cert/capsule.pem \ --server-key /root/capsule_cert/capsule.pem \ --server-ca-cert /root/capsule_cert/ca_cert_bundle.pem \ --foreman-proxy-cname loadbalancer.example.com出力からの
satellite-installerコマンド例のコピーを保持し、Capsule Server 証明書をインストールします。証明書アーカイブファイルを Satellite Server から Capsule Server にコピーします。
# scp /root/capsule.example.com-certs.tar \ root@capsule.example.com:capsule.example.com-certs.tarcapsule-certs-generateコマンドの出力から取得するsatellite-installerコマンドに次のオプションを追加します。コマンドの入力先の Capsule Server を参照するように、--puppet-ca-serverオプションを設定します。Puppet CA は、使用する予定があるかどうかに関係なく、Capsule Server にインストールする必要があります。Puppet は、デフォルトの単一ノード設定に設定されます。--certs-cname "loadbalancer.example.com" \ --puppet-dns-alt-names "loadbalancer.example.com" \ --puppet-ca-server "capsule.example.com" \ --foreman-proxy-puppetca "true" \ --puppet-server-ca "true" \ --enable-foreman-proxy-plugin-remote-execution-ssh以下のように、Capsule Server で、
satellite-installerコマンドを実行します。# satellite-installer --scenario capsule \ --foreman-proxy-register-in-foreman "true" \ --foreman-proxy-foreman-base-url "https://satellite.example.com" \ --foreman-proxy-trusted-hosts "satellite.example.com" \ --foreman-proxy-trusted-hosts "capsule.example.com" \ --foreman-proxy-oauth-consumer-key "oauth key" \ --foreman-proxy-oauth-consumer-secret "oauth secret" \ --certs-tar-file "capsule.example.com-certs.tar" \ --puppet-server-foreman-url "https://satellite.example.com" \ --certs-cname "loadbalancer.example.com" \ --puppet-dns-alt-names "loadbalancer.example.com" \ --puppet-ca-server "capsule.example.com" \ --foreman-proxy-puppetca "true" \ --puppet-server-ca "true" \ --enable-foreman-proxy-plugin-remote-execution-ssh