Chapter 10. Renaming a Satellite Server or Capsule Server
Renaming a Satellite Server or Capsule Server requires use of the satellite-change-hostname
script. Red Hat Satellite contains references to the host’s name and these changes are made using the script. Renaming a Satellite Server affects itself, all Capsule Servers and all hosts registered to it. Renaming a Capsule Server affects itself and all hosts registered to it.
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
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
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.
-
Backup 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 Section 13.2, “Using Identity Management”.
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
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"
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*
# rpm -Uvh http://new-satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
# subscription-manager register \ --org="Default_Organization" \ --environment="Library" \ --force
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
# yum repolist
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
On the Satellite Server, synchronize content for each Capsule Server.
List all Capsule Servers with their ID numbers:
# hammer capsule list
Enter the following command for each Capsule Server:
# hammer capsule content synchronize \ --id capsule_id_number
10.2. Renaming a Capsule Server
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
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:
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
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*
# rpm -Uvh http://new-capsule.example.com/pub/katello-ca-consumer-latest.noarch.rpm
# subscription-manager register --org="Default_Organization" \ --environment="Library" \ --force
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
# yum repolist
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.