Configuring Capsules with a load balancer Red Hat Satellite 6.16 Distribute load among Capsules Red Hat Satellite Documentation Team satellite-doc-list@redhat.com

Commands:
hammer host-registration generate-command --activation-keys " My_Activation_Key "
hammer host-registration generate-command --activation-keys " My_Activation_Key " --insecure true
curl -X POST https://satellite.example.com/api/registration_commands --user " My_User_Name " -H 'Content-Type: application/json' -d '{ "registration_command": { "activation_keys": [" My_Activation_Key_1 , My_Activation_Key_2 "] }}'
curl -X POST https://satellite.example.com/api/registration_commands --user " My_User_Name " -H 'Content-Type: application/json' -d '{ "registration_command": { "activation_keys": [" My_Activation_Key_1 , My_Activation_Key_2 "], "insecure": true }}'
subscription-manager repos --disable "*"
subscription-manager repos --enable=rhel-9-for-x86_64-baseos-rpms --enable=rhel-9-for-x86_64-appstream-rpms --enable=satellite-capsule-6.16-for-rhel-9-x86_64-rpms --enable=satellite-maintenance-6.16-for-rhel-9-x86_64-rpms
dnf repolist enabled
subscription-manager repos --disable "*"
subscription-manager repos --enable=rhel-8-for-x86_64-baseos-rpms --enable=rhel-8-for-x86_64-appstream-rpms --enable=satellite-capsule-6.16-for-rhel-8-x86_64-rpms --enable=satellite-maintenance-6.16-for-rhel-8-x86_64-rpms
dnf module enable satellite-capsule:el8
dnf repolist enabled
dnf upgrade
dnf install satellite-capsule
capsule-certs-generate --certs-tar "/root/ capsule.example.com -certs.tar" --foreman-proxy-cname loadbalancer.example.com --foreman-proxy-fqdn capsule.example.com
scp /root/ capsule.example.com -certs.tar root@ capsule.example.com :/root/ capsule.example.com -certs.tar
--certs-cname " loadbalancer.example.com " --enable-foreman-proxy-plugin-remote-execution-script
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 "
mkdir /root/capsule_cert
openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096
[ 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, nonRepudiation, keyEncipherment, dataEncipherment extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection subjectAltName = @alt_names [alt_names] 2 DNS.1 = loadbalancer.example.com DNS.2 = capsule.example.com
[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
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
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
--foreman-proxy-cname loadbalancer.example.com
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
scp /root/ capsule.example.com -certs.tar root@ capsule.example.com : capsule.example.com -certs.tar
--certs-cname " loadbalancer.example.com " --enable-foreman-proxy-plugin-remote-execution-script
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 "
capsule-certs-generate --certs-tar "/root/ capsule-ca.example.com -certs.tar" --foreman-proxy-cname loadbalancer.example.com --foreman-proxy-fqdn capsule-ca.example.com
scp /root/ capsule-ca.example.com -certs.tar root@ capsule-ca.example.com : capsule-ca.example.com -certs.tar
--certs-cname " loadbalancer.example.com " --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"
satellite-installer --scenario capsule --certs-cname " loadbalancer.example.com " --certs-tar-file " capsule-ca.example.com-certs.tar " --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"
systemctl stop puppetserver
puppetserver ca generate --ca-client --certname capsule.example.com --subject-alt-names loadbalancer.example.com
systemctl start puppetserver
capsule-certs-generate --certs-tar "/root/ capsule.example.com -certs.tar" --foreman-proxy-cname loadbalancer.example.com --foreman-proxy-fqdn capsule.example.com
scp /root/ capsule.example.com -certs.tar root@ capsule.example.com :/root/ capsule.example.com -certs.tar
satellite-maintain packages install puppetserver
mkdir -p /etc/puppetlabs/puppet/ssl/certs/ /etc/puppetlabs/puppet/ssl/private_keys/ /etc/puppetlabs/puppet/ssl/public_keys/
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
chown -R puppet:puppet /etc/puppetlabs/puppet/ssl/
restorecon -Rv /etc/puppetlabs/puppet/ssl/
--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"
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"
mkdir /root/capsule_cert
openssl genrsa -out /root/capsule_cert/capsule_cert_key.pem 4096
[ 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, nonRepudiation, keyEncipherment, dataEncipherment extendedKeyUsage = serverAuth, clientAuth, codeSigning, emailProtection subjectAltName = @alt_names [alt_names] 2 DNS.1 = loadbalancer.example.com DNS.2 = capsule.example.com
[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
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
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
--foreman-proxy-cname loadbalancer.example.com
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
--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"
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"
systemctl stop puppetserver
puppetserver ca generate --ca-client --certname capsule.example.com --subject-alt-names loadbalancer.example.com
systemctl start puppetserver
--foreman-proxy-cname loadbalancer.example.com
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
scp /root/ capsule.example.com -certs.tar root@ capsule.example.com : capsule.example.com -certs.tar
satellite-maintain packages install puppetserver
mkdir -p /etc/puppetlabs/puppet/ssl/certs/ /etc/puppetlabs/puppet/ssl/private_keys/ /etc/puppetlabs/puppet/ssl/public_keys/
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
chown -R puppet:puppet /etc/puppetlabs/puppet/ssl/
restorecon -Rv /etc/puppetlabs/puppet/ssl/
--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"
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"
satellite-installer --foreman-proxy-registration true --foreman-proxy-templates true
satellite-installer --foreman-proxy-registration-url "https:// loadbalancer.example.com :9090" --foreman-proxy-template-url "http:// loadbalancer.example.com :8000"
dnf install haproxy
dnf install policycoreutils-python-utils
semanage boolean --modify --on haproxy_connect_any
systemctl enable --now haproxy
hammer host-registration generate-command --activation-keys " My_Activation_Key "
hammer host-registration generate-command --activation-keys " My_Activation_Key " --insecure true
curl -X POST https://satellite.example.com/api/registration_commands --user " My_User_Name " -H 'Content-Type: application/json' -d '{ "registration_command": { "activation_keys": [" My_Activation_Key_1 , My_Activation_Key_2 "] }}'
curl -X POST https://satellite.example.com/api/registration_commands --user " My_User_Name " -H 'Content-Type: application/json' -d '{ "registration_command": { "activation_keys": [" My_Activation_Key_1 , My_Activation_Key_2 "], "insecure": true }}'
/usr/libexec/platform-python bootstrap.py --activationkey=" My_Activation_Key " --enablerepos=satellite-client-6-for-rhel-8-<arch>-rpms \ 1 --force \ 2 --hostgroup=" My_Host_Group " --location=" My_Location " --login= admin --organization=" My_Organization " --puppet-ca-port 8141 \ 3 --server loadbalancer.example.com
python bootstrap.py --login= admin --activationkey=" My_Activation_Key " --enablerepos=rhel-7-server-satellite-client-6-rpms --force \ 1 --hostgroup=" My_Host_Group " --location=" My_Location " --organization=" My_Organization " --puppet-ca-port 8141 \ 2 --server loadbalancer.example.com
Foreman proxy to which reports should be uploaded :server: ' loadbalancer.example.com ' :port: 9090
Foreman proxy to which reports should be uploaded :server: ' loadbalancer.example.com ' :port: 9090
dnf module list --enabled
dnf module list --enabled
dnf module reset ruby
dnf module list --enabled
dnf module reset postgresql
dnf module enable satellite-capsule:el8
dnf install postgresql-upgrade
postgresql-setup --upgrade