4.3. 使用自定义 SSL 证书配置胶囊服务器以在没有 Puppet 的情况下进行负载平衡
下面的部分论述了如何配置在没有 Puppet 的情况下使用自定义 SSL 证书进行负载平衡的胶囊服务器。
4.3.1. 为胶囊服务器创建自定义 SSL 证书 复制链接链接已复制到粘贴板!
此流程概述了如何为证书签名请求创建配置文件,并包含负载均衡器和胶囊服务器,作为主题备用名称(SAN)。在您要为负载均衡配置的每个胶囊服务器上完成这个步骤。
流程
在 Capsule Server 上,创建包含所有源证书文件的目录,仅可供
root用户访问:mkdir /root/capsule_cert cd /root/capsule_cert
# mkdir /root/capsule_cert # cd /root/capsule_certCopy to Clipboard Copied! Toggle word wrap Toggle overflow 创建为证书签名请求(CSR)签名的私钥。
请注意,私钥必须未加密的。如果您使用受密码保护的私钥,请删除私钥密码。
如果您已拥有此胶囊服务器的私钥,请跳过这一步。
openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096
# openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用以下内容创建证书请求配置文件:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 为 SAN 证书创建证书签名请求(CSR):
openssl req -new \ -key /root/capsule_cert/capsule_cert_key.pem \ -config SAN_config.cfg \ -out /root/capsule_cert/capsule_cert_csr.pem
# 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 Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将证书请求发送到证书颁发机构:
提交请求时,指定证书的寿命。发送证书请求的方法各不相同,因此请查阅证书颁发机构以获取首选方法。为了响应请求,预计可以在单独的文件中接收证书颁发机构捆绑包和签名证书。
- 将您从认证机构接收的证书颁发机构和胶囊服务器证书文件复制到卫星服务器上。
在卫星服务器上,验证胶囊服务器证书输入文件:
katello-certs-check \ -c /root/capsule_cert/capsule_cert.pem \ -k /root/capsule_cert/capsule_cert_key.pem \ -b /root/capsule_cert/ca_cert_bundle.pem
# 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 Copy to Clipboard Copied! Toggle word wrap Toggle overflow 如果将
commonName=设置为通配符值*,您必须将-t Capsule 选项添加到katello-certs-check命令中。保留由
katello-certs-check命令输出的示例capsule-certs-generate命令的副本,用于为这个胶囊服务器创建证书存档文件。
4.3.2. 使用自定义 SSL 证书配置胶囊服务器以在没有 Puppet 的情况下进行负载平衡 复制链接链接已复制到粘贴板!
下面的部分论述了如何配置在没有 Puppet 的情况下使用自定义 SSL 证书进行负载平衡的胶囊服务器。在您要为负载均衡配置的每个胶囊服务器上完成这个步骤。
流程
将以下选项附加到您从
katello-certs-check命令的输出中获取的capsule-certs-generate命令:--foreman-proxy-cname loadbalancer.example.com
--foreman-proxy-cname loadbalancer.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow 在 Satellite 服务器上,输入 Capsule
-certs-generate命令来生成 Capsule 证书:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 保留用于安装 Capsule Server 证书的输出中的 example
satellite-installer命令的副本。将证书存档文件从 Satellite 服务器复制到胶囊服务器:
scp /root/capsule.example.com-certs.tar root@capsule.example.com:capsule.example.com-certs.tar
# scp /root/capsule.example.com-certs.tar root@capsule.example.com:capsule.example.com-certs.tarCopy to Clipboard Copied! Toggle word wrap Toggle overflow 将以下选项附加到
satellite-installer命令中,从capsule-certs-generate命令的输出中获取:--certs-cname "loadbalancer.example.com" \ --enable-foreman-proxy-plugin-remote-execution-script
--certs-cname "loadbalancer.example.com" \ --enable-foreman-proxy-plugin-remote-execution-scriptCopy to Clipboard Copied! Toggle word wrap Toggle overflow 在 Capsule 服务器上,输入
satellite-installer命令:Copy to Clipboard Copied! Toggle word wrap Toggle overflow