4.3. カスタム SSL 証明書を使用する Capsule Server のロードバランシング用の設定 (Puppet を使用しない)
次のセクションでは、Puppet を使用せず、カスタム SSL 証明書を使用する Capsule Server をロードバランシング用に設定する方法を説明します。
4.3.1. Capsule Server のカスタム SSL 証明書の作成 リンクのコピーリンクがクリップボードにコピーされました!
以下の手順では、Certificate Signing Request (CSR) の設定ファイルを作成して、Subject Alternative Names (SAN) としてロードバランサーと Capsule Server を追加する方法を説明します。この手順は、ロードバランシング用に設定する Capsule Server ごとに実行します。
手順
ソースの証明書ファイルすべてを保存するには、
rootユーザーだけがアクセスできるディレクトリーを作成します。# mkdir /root/capsule_cert証明書署名要求 (CSR) に署名する秘密鍵を作成します。
秘密鍵は暗号化する必要がないことに注意してください。パスワードで保護された秘密鍵を使用する場合は、秘密鍵のパスワードを削除します。
この Capsule Server の秘密鍵がすでにある場合は、この手順を省略します。
# openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096CSR 用の
/root/capsule_cert/openssl.cnf設定ファイルを作成して、以下のコンテンツを追加します。[ req ] req_extensions = v3_req distinguished_name = req_distinguished_name x509_extensions = usr_cert prompt = no [ req_distinguished_name ] commonName = capsule.example.com1 [ v3_req ] basicConstraints = CA:FALSE keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection subjectAltName = @alt_names [alt_names]2 DNS.1 = loadbalancer.example.com DNS.2 = capsule.example.comオプション: CSR に識別名 (DN) の詳細を追加する場合は、
[ req_distinguished_name ]セクションに次の情報を追加します。[req_distinguished_name] CN = capsule.example.com countryName =My_Country_Name1 stateOrProvinceName = My_State_Or_Province_Name2 localityName = My_Locality_Name3 organizationName = My_Organization_Or_Company_Name organizationalUnitName = My_Organizational_Unit_Name4 CSR を生成します。
# 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.pem3 認証局 (CA) に証明書署名要求を送信します。Satellite Server と Capsule Server の証明書には同じ CA が署名する必要があります。
要求を送信する場合は、証明書の有効期限を指定してください。証明書要求の送信方法にはさまざまなものがあるため、推奨される方法を CA にお問い合わせください。要求すると、CA バンドルと署名済み証明書を別々のファイルで受け取ることになります。
- 認証局バンドル、認証局から受け取る Capsule Server の証明書ファイル、Capsule Server の秘密鍵を、Satellite Server にコピーします。
- Satellite Server で、Capsule Server 証明書入力ファイルを検証します。
# katello-certs-check \
-c /root/{cert-name}_cert/{cert-name}_cert.pem \
-k /root/{cert-name}_cert/{cert-name}_cert_key.pem \
-b /root/{cert-name}_cert/ca_cert_bundle.pem
4.3.2. カスタム SSL 証明書を使用する Capsule Server のロードバランシング用の設定 (Puppet を使用しない) リンクのコピーリンクがクリップボードにコピーされました!
次のセクションでは、Puppet を使用せず、カスタム SSL 証明書を使用する Capsule Server をロードバランシング用に設定する方法を説明します。この手順は、ロードバランシング用に設定する Capsule Server ごとに実行します。
手順
katello-certs-checkコマンドの出力から取得するcapsule-certs-generateコマンドに次のオプションを追加します。--foreman-proxy-cname loadbalancer.example.comSatellite Server で、
capsule-certs-generateコマンドを入力して Capsule 証明書を生成します。# 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 証明書をインストールします。証明書アーカイブファイルを Satellite Server から Capsule Server にコピーします。
# scp /root/capsule.example.com-certs.tar root@capsule.example.com:capsule.example.com-certs.tarcapsule-certs-generateコマンドの出力から取得するsatellite-installerコマンドに次のオプションを追加します。--certs-cname "loadbalancer.example.com" \ --enable-foreman-proxy-plugin-remote-execution-scriptCapsule Server で、
satellite-installerコマンドを入力します。# 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-register-in-foreman "true" \ --foreman-proxy-trusted-hosts "satellite.example.com" \ --foreman-proxy-trusted-hosts "capsule.example.com"