Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Configuring Capsule Servers for Load Balancing
This chapter outlines how to configure Capsule Servers for load balancing. Proceed to one of the following sections depending on your Satellite Server configuration:
- Section 4.1, “Configuring Capsule Server with Default SSL Certificates for Load Balancing without Puppet”
- Section 4.2, “Configuring Capsule Server with Default SSL Certificates for Load Balancing with Puppet”
- Section 4.3, “Configuring Capsule Server with Custom SSL Certificates for Load Balancing without Puppet”
- Section 4.4, “Configuring Capsule Server with Custom SSL Certificates for Load Balancing with Puppet”
Use different file names for the Katello certificates you create for each Capsule Server. For example, name the certificate archive file with the Capsule Server FQDN.
4.1. Configuring Capsule Server with Default SSL Certificates for Load Balancing without Puppet Copier lienLien copié sur presse-papiers!
The following section describes how to configure Capsule Servers that use default SSL certificates for load balancing without Puppet.
Complete this procedure on each Capsule Server that you want to configure for load balancing.
Procedure
On Satellite Server, generate Katello certificates for Capsule Server, for example:
capsule-certs-generate \ --foreman-proxy-fqdn capsule.example.com \ --certs-tar "/root/capsule.example.com-certs.tar" \ --foreman-proxy-cname loadbalancer.example.com
# capsule-certs-generate \ --foreman-proxy-fqdn capsule.example.com \ --certs-tar "/root/capsule.example.com-certs.tar" \ --foreman-proxy-cname loadbalancer.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retain a copy of the example
satellite-installer
command that is output by thecapsule-certs-generate
command for installing the Capsule Server certificate.Copy the certificate archive file from Satellite Server to Capsule Server.
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.tar
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Append the following options to the
satellite-installer
command that you obtain from the output of thecapsule-certs-generate
command. Set the--puppet-ca-server
option to point to the Capsule Server where you enter the command. You must install Puppet CA on your Capsule Servers, regardless of whether you intend to use it or not. Puppet is configured in its default single-node configuration.Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, enter the
satellite-installer
command, for example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Configuring Capsule Server with Default SSL Certificates for Load Balancing with Puppet Copier lienLien copié sur presse-papiers!
The following section describes how to configure Capsule Servers that use default SSL certificates for load balancing with Puppet.
If you use Puppet in your Satellite configuration, you must complete the following procedures:
Configuring Capsule Server to Generate and Sign Puppet Certificates
Complete this procedure only for the system where you want to configure Capsule Server to generate and sign Puppet certificates for all other Capsule Servers that you configure for load balancing. In the examples in this procedure, the FQDN of this Capsule Server is capsule_ca.example.com
.
On Satellite Server, generate Katello certificates for the system where you configure Capsule Server to generate and sign Puppet certificates:
capsule-certs-generate \ --foreman-proxy-fqdn capsule_ca.example.com \ --certs-tar "/root/capsule_ca.example.com-certs.tar" \ --foreman-proxy-cname loadbalancer.example.com
# capsule-certs-generate \ --foreman-proxy-fqdn capsule_ca.example.com \ --certs-tar "/root/capsule_ca.example.com-certs.tar" \ --foreman-proxy-cname loadbalancer.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retain a copy of the example
satellite-installer
command that is output by thecapsule-certs-generate
command for installing the Capsule Server certificate.Copy the certificate archive file from Satellite Server to Capsule Server:
scp /root/capsule_ca.example.com-certs.tar \ root@capsule_ca.example.com:capsule_ca.example.com-certs.tar
# scp /root/capsule_ca.example.com-certs.tar \ root@capsule_ca.example.com:capsule_ca.example.com-certs.tar
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Append the following options to the
satellite-installer
command that you obtain from the output of thecapsule-certs-generate
command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, enter the
satellite-installer
command, for example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, generate Puppet certificates for all other Capsule Servers that you configure for load balancing, except this first system where you configure Puppet certificates signing:
puppet cert generate capsule.example.com \ --dns_alt_names=loadbalancer.example.com
# puppet cert generate capsule.example.com \ --dns_alt_names=loadbalancer.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command creates the following files on the system where you configure Capsule Server to sign Puppet certificates:
-
/etc/puppetlabs/puppet/ssl/certs/ca.pem
-
/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
-
Configuring Remaining Capsule Servers for Load Balancing
Complete this procedure on each Capsule Server excluding the system where you configure Capsule Server to sign Puppet certificates.
On Satellite Server, generate Katello certificates for Capsule Server:
capsule-certs-generate \ --foreman-proxy-fqdn capsule.example.com \ --certs-tar "/root/capsule.example.com-certs.tar" \ --foreman-proxy-cname loadbalancer.example.com
# capsule-certs-generate \ --foreman-proxy-fqdn capsule.example.com \ --certs-tar "/root/capsule.example.com-certs.tar" \ --foreman-proxy-cname loadbalancer.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retain a copy of the example
satellite-installer
command that is output by thecapsule-certs-generate
command for installing the Capsule Server certificate.Copy the certificate archive file from Satellite Server to Capsule Server:
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.tar
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, install the
puppetserver
package:yum install puppetserver
# yum install puppetserver
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, create directories for puppet certificates:
mkdir -p /etc/puppetlabs/puppet/ssl/certs/ \ /etc/puppetlabs/puppet/ssl/private_keys/ \ /etc/puppetlabs/puppet/ssl/public_keys/
# mkdir -p /etc/puppetlabs/puppet/ssl/certs/ \ /etc/puppetlabs/puppet/ssl/private_keys/ \ /etc/puppetlabs/puppet/ssl/public_keys/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, copy the Puppet certificates for this Capsule Server from the system where you configure Capsule Server to sign Puppet certificates:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, change the directory ownership to user
puppet
, grouppuppet
and set the SELinux contexts:chown -R puppet:puppet /etc/puppetlabs/puppet/ssl/ restorecon -Rv /etc/puppetlabs/puppet/ssl/
# chown -R puppet:puppet /etc/puppetlabs/puppet/ssl/ # restorecon -Rv /etc/puppetlabs/puppet/ssl/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Append the following options to the
satellite-installer
command that you obtain from the output of thecapsule-certs-generate
command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, enter the
satellite-installer
command, for example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3. Configuring Capsule Server with Custom SSL Certificates for Load Balancing without Puppet Copier lienLien copié sur presse-papiers!
The following section describes how to configure Capsule Servers that use custom SSL certificates for load balancing without Puppet.
4.3.1. Creating Custom SSL Certificates for Capsule Server Copier lienLien copié sur presse-papiers!
This procedure outlines how to create a configuration file for the Certificate Signing Request and include the load balancer and Capsule Server as Subject Alternative Names (SAN). Complete this procedure on each Capsule Server that you want to configure for load balancing.
Procedure
On Capsule Server, create a directory to contain all the source certificate files, accessible to only the
root
user:mkdir /root/capsule_cert cd /root/capsule_cert
# mkdir /root/capsule_cert # cd /root/capsule_cert
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a private key with which to sign the Certificate Signing Request (CSR).
Note that the private key must be unencrypted. If you use a password-protected private key, remove the private key password.
If you already have a private key for this Capsule Server, skip this step.
openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096
# openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the certificate request configuration file with the following content:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a Certificate Signing Request (CSR) for the SAN certificate.
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.pem
3 Copy to Clipboard Copied! Toggle word wrap Toggle overflow Send the certificate request to the Certificate Authority:
When you submit the request, specify the lifespan of the certificate. The method for sending the certificate request varies, so consult the Certificate Authority for the preferred method. In response to the request, you can expect to receive a Certificate Authority bundle and a signed certificate, in separate files.
- Copy the Certificate Authority bundle and Capsule Server certificate file that you receive from the Certificate Authority, and the Capsule Server private key to your Satellite Server.
On Satellite Server, validate the Capsule Server certificate input files:
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.pem
3 Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retain a copy of the example
capsule-certs-generate
command that is output by thekatello-certs-check
command for creating the Certificate Archive File for this Capsule Server.
4.3.2. Configuring Capsule Server with Custom SSL Certificates for Load Balancing without Puppet Copier lienLien copié sur presse-papiers!
Complete this procedure on each Capsule Server that you want to configure for load balancing.
Procedure
Append the following option to the
capsule-certs-generate
command that you obtain from the output of thekatello-certs-check
command:--foreman-proxy-cname loadbalancer.example.com
--foreman-proxy-cname loadbalancer.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Satellite Server, enter the
capsule-certs-generate
command to generate Capsule certificates. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retain a copy of the example
satellite-installer
command from the output for installing the Capsule Server certificates.Copy the certificate archive file from Satellite Server to Capsule Server:
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.tar
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Append the following options to the
satellite-installer
command that you obtain from the output of thecapsule-certs-generate
command. Set the--puppet-ca-server
option to point to the Capsule Server where you enter the command. You must install Puppet CA on your Capsule Servers, regardless of whether you intend to use it or not. Puppet is configured in its default single-node configuration.Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, enter the
satellite-installer
command, for example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.4. Configuring Capsule Server with Custom SSL Certificates for Load Balancing with Puppet Copier lienLien copié sur presse-papiers!
The following section describes how to configure Capsule Servers that use custom SSL certificates for load balancing with Puppet.
4.4.1. Creating Custom SSL Certificates for Capsule Server Copier lienLien copié sur presse-papiers!
This procedure outlines how to create a configuration file for the Certificate Signing Request and include the load balancer and Capsule Server as Subject Alternative Names (SAN). Complete this procedure on each Capsule Server that you want to configure for load balancing.
Procedure
On Capsule Server, create a directory to contain all the source certificate files, accessible to only the
root
user:mkdir /root/capsule_cert cd /root/capsule_cert
# mkdir /root/capsule_cert # cd /root/capsule_cert
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a private key with which to sign the Certificate Signing Request (CSR).
Note that the private key must be unencrypted. If you use a password-protected private key, remove the private key password.
If you already have a private key for this Capsule Server, skip this step.
openssl genrsa -out /root/capsule_cert/capsule.pem 4096
# openssl genrsa -out /root/capsule_cert/capsule.pem 4096
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the certificate request configuration file with the following content:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a Certificate Signing Request (CSR) for the SAN certificate:
openssl req -new \ -key /root/capsule_cert/capsule.pem \ -config SAN_config.cfg \ -out /root/capsule_cert/capsule.pem
# openssl req -new \ -key /root/capsule_cert/capsule.pem \
1 -config SAN_config.cfg \
2 -out /root/capsule_cert/capsule.pem
3 Copy to Clipboard Copied! Toggle word wrap Toggle overflow Send the certificate request to the Certificate Authority:
When you submit the request, specify the lifespan of the certificate. The method for sending the certificate request varies, so consult the Certificate Authority for the preferred method. In response to the request, you can expect to receive a Certificate Authority bundle and a signed certificate, in separate files.
- Copy the Certificate Authority bundle and Capsule Server certificate file that you receive from the Certificate Authority, and the Capsule Server private key to your Satellite Server to validate them.
On Satellite Server, validate the Capsule Server certificate input files:
katello-certs-check \ -c /root/capsule_cert/capsule.pem \ -k /root/capsule_cert/capsule.pem \ -b /root/capsule_cert/ca_cert_bundle.pem
# katello-certs-check \ -c /root/capsule_cert/capsule.pem \
1 -k /root/capsule_cert/capsule.pem \
2 -b /root/capsule_cert/ca_cert_bundle.pem
3 Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retain a copy of the example
capsule-certs-generate
command that is output by thekatello-certs-check
command for creating the Certificate Archive File for this Capsule Server.
4.4.2. Configuring Capsule Server with Custom SSL Certificates for Load Balancing with Puppet Copier lienLien copié sur presse-papiers!
If you use Puppet in your Satellite configuration, then you must complete the following procedures:
Configuring Capsule Server to Generate and Sign Puppet Certificates
Complete this procedure only for the system where you want to configure Capsule Server to generate Puppet certificates for all other Capsule Servers that you configure for load balancing. In the examples in this procedure, the FQDN of this Capsule Server is capsule_ca.example.com
.
Append the following option to the
capsule-certs-generate
command that you obtain from the output of thekatello-certs-check
command:--foreman-proxy-cname loadbalancer.example.com
--foreman-proxy-cname loadbalancer.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Satellite Server, enter the
capsule-certs-generate
command to generate Capsule certificates. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retain a copy of the example
satellite-installer
command from the output for installing the Capsule Server certificates.- Copy the certificate archive file from Satellite Server to Capsule Server.
Append the following options to the
satellite-installer
command that you obtain from the output of thecapsule-certs-generate
command:--puppet-dns-alt-names "loadbalancer.example.com" \ --puppet-ca-server "capsule_ca.example.com" \ --foreman-proxy-puppetca "true" \ --puppet-server-ca "true" \ --enable-foreman-proxy-plugin-remote-execution-ssh
--puppet-dns-alt-names "loadbalancer.example.com" \ --puppet-ca-server "capsule_ca.example.com" \ --foreman-proxy-puppetca "true" \ --puppet-server-ca "true" \ --enable-foreman-proxy-plugin-remote-execution-ssh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, enter the
satellite-installer
command, for example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, generate Puppet certificates for all other Capsules that you configure for load balancing, except this first system where you configure Puppet certificates signing:
puppet cert generate capsule.example.com \ --dns_alt_names=loadbalancer.example.com
# puppet cert generate capsule.example.com \ --dns_alt_names=loadbalancer.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command creates the following files on the Puppet certificate signing Capsule Server instance:
-
/etc/puppetlabs/puppet/ssl/certs/ca.pem
-
/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
-
Configuring Remaining Capsule Servers for Load Balancing
Complete this procedure for each Capsule Server excluding the system where you configure Capsule Server to sign Puppet certificates.
Append the following option to the
capsule-certs-generate
command that you obtain from the output of thekatello-certs-check
command:--foreman-proxy-cname loadbalancer.example.com
--foreman-proxy-cname loadbalancer.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Satellite Server, enter the
capsule-certs-generate
command to generate Capsule certificates. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retain a copy of the example
satellite-installer
command from the output for installing the Capsule Server certificates.Copy the certificate archive file from Satellite Server to Capsule Server.
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.tar
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, install the
puppetserver
package:yum install puppetserver
# yum install puppetserver
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, create directories for puppet certificates:
mkdir -p /etc/puppetlabs/puppet/ssl/certs/ \ /etc/puppetlabs/puppet/ssl/private_keys/ \ /etc/puppetlabs/puppet/ssl/public_keys/
# mkdir -p /etc/puppetlabs/puppet/ssl/certs/ \ /etc/puppetlabs/puppet/ssl/private_keys/ \ /etc/puppetlabs/puppet/ssl/public_keys/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, copy the Puppet certificates for this Capsule Server from the system where you configure Capsule Server to sign Puppet certificates:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, change the directory ownership to user
puppet
, grouppuppet
and set the SELinux contexts:chown -R puppet:puppet /etc/puppetlabs/puppet/ssl/ restorecon -Rv /etc/puppetlabs/puppet/ssl/
# chown -R puppet:puppet /etc/puppetlabs/puppet/ssl/ # restorecon -Rv /etc/puppetlabs/puppet/ssl/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Append the following options to the
satellite-installer
command that you obtain from the output of thecapsule-certs-generate
command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Capsule Server, enter the
satellite-installer
command, for example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow