Chapter 10. Renaming a Satellite Server or Capsule Server
To rename Satellite Server or Capsule Server, you must use the satellite-change-hostname
script.
If you rename Satellite Server, you must reregister all Satellite clients and configure each Capsule Server to point them to the new Satellite host name. If you use custom SSL certificates, you must regenerate them with the new host name. If you use virt-who, you must update the virt-who configuration files with the new host name.
If you rename Capsule Server, you must reregister all Capsule clients and update the Capsule host name in the Satellite web UI. If you use custom SSL certificates, you must regenerate them with the new host name.
The renaming process shuts down all Satellite Server services on the host being renamed. When the renaming is complete, all services are restarted.
10.1. Renaming a Satellite Server Copy linkLink copied to clipboard!
The host name of a Satellite Server is used by Satellite Server components, all Capsule Servers, and hosts registered to it for communication. Renaming a Satellite Server requires that these references be updated.
If you use external authentication, you must reconfigure Satellite Server for external authentication after you run the satellite-change-hostname
script. The satellite-change-hostname
script breaks external authentication for Satellite Server. For more information about configuring external authentication, see Chapter 13, Configuring External Authentication
If you use virt-who, you must update the virt-who configuration files with the new host name after you run the satellite-change-hostname
script. For more information, see Modifying a virt-who Configuration in the Virtual Instances Guide.
Prerequisites
- (Optional) If the Satellite Server has a custom X.509 certificate installed, a new certificate must be obtained in the host’s new name. When all hosts are re-registered to the Satellite Server, the new certificate is installed. For more information on obtaining a custom X.509 certificate, see Configuring Satellite Server with a Custom Server Certificate in Installing Satellite Server from a Connected Network.
-
Back up the Satellite Server. The
satellite-change-hostname
script makes irreversible changes to the Satellite Server. If the renaming process is not successful, you must restore it from backup. For more information, see Chapter 8, Backing Up Satellite Server and Capsule Server.
Rename a Satellite Server
On the Satellite Server, choose the appropriate method to run the
satellite-change-hostname
script, providing the new host name and Satellite credentials:If your Satellite Server is installed with self-signed certificates:
satellite-change-hostname new_satellite \ --username admin \ --password password
# satellite-change-hostname new_satellite \ --username admin \ --password password
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If your Satellite Server is installed with SSL certificates:
satellite-change-hostname new_satellite \ --username admin \ --password password \ -c "/root/ownca/test.com/test.com.crt" \ -k "/root/ownca/test.com/test.com.key"
# satellite-change-hostname new_satellite \ --username admin \ --password password \ -c "/root/ownca/test.com/test.com.crt" \ -k "/root/ownca/test.com/test.com.key"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The message
***** Hostname change complete! *****
confirms that the rename completed successfully.- (Optional) If you have obtained a new X.509 certificate for the new Satellite Server host name, run the Satellite installation script to install the certificate. For more information about installing a custom X.509 certificate, see Configuring Satellite Server with a Custom Server Certificate in Installing Satellite Server from a Connected Network.
On all Capsule Servers and hosts registered to the Satellite Server, reinstall the bootstrap RPM and re-register them to the Satellite Server. Substitute the example organization and environment values with those matching your environment.
yum remove -y katello-ca-consumer*
# yum remove -y katello-ca-consumer*
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rpm -Uvh http://new-satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
# rpm -Uvh http://new-satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager register \ --org="Default_Organization" \ --environment="Library" \ --force
# subscription-manager register \ --org="Default_Organization" \ --environment="Library" \ --force
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Use of the Red Hat Satellite remote execution feature is recommended for this step. For more information, see Configuring and Running Remote Commands in Managing Hosts.
Reattach subscriptions to all Capsule Servers and hosts registered to the Satellite Server, then refresh the subscription.
subscription-manager refresh
# subscription-manager refresh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow yum repolist
# yum repolist
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Use of the Red Hat Satellite remote execution feature is recommended for this step. For more information, see Configuring and Running Remote Commands in Managing Hosts.
On all Capsule Servers, re-run the Satellite installation script to update references to the new host name.
satellite-installer --foreman-proxy-content-parent-fqdn new-satellite.example.com \ --foreman-proxy-foreman-base-url https://new-satellite.example.com \ --foreman-proxy-trusted-hosts new-satellite.example.com
# satellite-installer --foreman-proxy-content-parent-fqdn new-satellite.example.com \ --foreman-proxy-foreman-base-url https://new-satellite.example.com \ --foreman-proxy-trusted-hosts new-satellite.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On the Satellite Server, synchronize content for each Capsule Server.
List all Capsule Servers with their ID numbers:
hammer capsule list
# hammer capsule list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the following command for each Capsule Server:
hammer capsule content synchronize \ --id capsule_id_number
# hammer capsule content synchronize \ --id capsule_id_number
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2. Renaming a Capsule Server Copy linkLink copied to clipboard!
The host name of a Capsule Server is referenced by Satellite Server components, and all hosts registered to it. Renaming a Capsule Server requires that these references be updated.
Prerequisites
- Optional: New X.509 custom certificate files for the Capsule Server. For more information on obtaining a custom X.509 certificate, see Configuring Capsule Server with a Custom Server Certificate in Installing Capsule Server.
Backup the Capsule Server. The
satellite-change-hostname
script makes irreversible changes to the Capsule Server. If the renaming process is not successful, you must restore it from backup.Red Hat Satellite does not provide a native backup method for a Capsule Server. For more information, see Chapter 8, Backing Up Satellite Server and Capsule Server.
Renaming a Capsule Server:
On Satellite Server, create a new certificates archive file.
If you are using the default Satellite Server certificate, enter the following command:
capsule-certs-generate --foreman-proxy-fqdn new-capsule.example.com \ --certs-tar /root/new-capsule.example.com-certs.tar
# capsule-certs-generate --foreman-proxy-fqdn new-capsule.example.com \ --certs-tar /root/new-capsule.example.com-certs.tar
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that you enter the full path to the
.tar
file.- If you are using a custom X.509 certificate on the Capsule Server, see Create the Capsule Server’s Certificate Archive File in Installing Capsule Server.
On Satellite Server, copy the certificates archive file to the Capsule Server, providing the
root
user’s password when prompted. In this example the archive file is copied to theroot
user’s home directory, but you may prefer to copy it elsewhere.scp /root/new-capsule.example.com-certs.tar root@capsule.example.com:
# scp /root/new-capsule.example.com-certs.tar root@capsule.example.com:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On the Capsule Server, run the
satellite-change-hostname
script, providing the host’s new name, Satellite credentials, and certificates archive filename.satellite-change-hostname new_capsule --username admin \ --password password \ --certs-tar /root/new-capsule.example.com-certs.tar
# satellite-change-hostname new_capsule --username admin \ --password password \ --certs-tar /root/new-capsule.example.com-certs.tar
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that you enter the full path to the
.tar
file.The message
***** Hostname change complete! *****
confirms that the rename completed successfully.- Optional: If you have obtained a new X.509 certificate in the Capsule Server’s new host name, run the Satellite installation script to install the certificate. For more information about installing a custom X.509 certificate, see Install the Capsule Server’s Custom Certificate in Installing Capsule Server.
On all hosts registered to the Capsule Server, reinstall the bootstrap RPM and re-register them to the Capsule Server. Substitute the example organization and environment values with those matching your environment.
yum remove -y katello-ca-consumer*
# yum remove -y katello-ca-consumer*
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rpm -Uvh http://new-capsule.example.com/pub/katello-ca-consumer-latest.noarch.rpm
# rpm -Uvh http://new-capsule.example.com/pub/katello-ca-consumer-latest.noarch.rpm
Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager register --org="Default_Organization" \ --environment="Library" \ --force
# subscription-manager register --org="Default_Organization" \ --environment="Library" \ --force
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use of the Red Hat Satellite remote execution feature is recommended for this step. For more information, see Running Jobs on Hosts in Managing Hosts.
Reattach subscriptions to all hosts registered to the Capsule Server, then refresh the subscription.
subscription-manager refresh
# subscription-manager refresh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow yum repolist
# yum repolist
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the Capsule Server’s name.
- In the Satellite web UI, navigate to Infrastructure > Capsules.
- Find the Capsule Server in the list, and click Edit in that row.
- Edit the Name and URL fields to match the Capsule Server’s new host name, then click Submit.
- On your DNS server, add a record for the Capsule Server’s new host name, and delete the record for the previous host name.