Skip to content

Latest commit

 

History

History
84 lines (76 loc) · 4.27 KB

proc_renaming-smart-proxy.adoc

File metadata and controls

84 lines (76 loc) · 4.27 KB

Renaming {SmartProxyServerTitle}

The host name of {SmartProxyServer} is referenced by {ProjectServer} components and all hosts registered to it. This procedure ensures that in addition to renaming {SmartProxyServer}, you also update all references to the new host name.

Warning

Renaming your {SmartProxyServer} host shuts down all {Project} services on that host. The services restart after the renaming is complete.

Prerequisites
  • Back up your {SmartProxyServer} before renaming. If you fail to successfully rename it, restore it from the backup. For more information, see [backing-up-{project-context}-server-and-{smart-proxy-context}_{context}].

  • Run the hostname and hostname -f commands on {SmartProxyServer}. If both commands do not return the FQDN of {SmartProxyServer}, the {project-change-hostname} script will fail to complete.

    If the hostname command returns the shortname of {SmartProxyServer} instead of the FQDN, use hostnamectl set-hostname My_Old_FQDN to set the old FQDN correctly before attempting to use the {project-change-hostname} script.

Procedure
  1. On {ProjectServer}, generate a new certificates archive file for {SmartProxyServer}.

    • If you are using the default SSL certificate, enter the following command:

      # {certs-generate} \
      --foreman-proxy-fqdn new-{smartproxy-example-com} \
      --certs-tar /root/new-{smartproxy-example-com}-certs.tar

      Ensure that you enter the full path to the .tar file.

    • If you are using a custom SSL certificate, create a new SSL certificate for {SmartProxyServer}. For more information, see {InstallingSmartProxyDocURL}configuring-capsule-custom-server-certificate_{smart-proxy-context}[Configuring {SmartProxyServer} with a Custom SSL Certificate] in {InstallingSmartProxyDocTitle}.

  2. On {ProjectServer}, copy the certificates archive file to {SmartProxyServer}. For example, to copy the archive file to the root user’s home directory:

    # scp /root/new-{smartproxy-example-com}-certs.tar root@{smartproxy-example-com}:
  3. On {SmartProxyServer}, run the {project-change-hostname} script and provide the host’s new name, {Project} credentials, and certificates archive file name.

    # {project-change-hostname} new-{smartproxy-example-com} --username admin \
    --password password \
    --certs-tar /root/new-{smartproxy-example-com}-certs.tar

    Ensure that you enter the full path to the .tar file.

  4. If you have created a custom certificate for {SmartProxyServer}, deploy the certificate on {SmartProxyServer} by entering the {foreman-installer} command that the {certs-generate} command returned in a previous step. For more information, see {InstallingSmartProxyDocURL}deploying-a-custom-ssl-certificate-to-{smart-proxy-context}-server_{smart-proxy-context}[Deploying a Custom SSL Certificate to {SmartProxyServer}] in {InstallingSmartProxyDocTitle}.

  5. On all {SmartProxy} clients, enter the following commands to reinstall the bootstrap RPM, reregister clients, and refresh their subscriptions.

    You can use the remote execution feature to perform this step. For more information, see {ManagingHostsDocURL}Configuring_and_Setting_Up_Remote_Jobs_managing-hosts[Configuring and Setting up Remote Jobs] in {ManagingHostsDocTitle}.

    On hosts running {EL} 8+, run the following commands:

    # {client-package-remove-el8} katello-ca-consumer*
    
    # {client-package-install-el8} http://new-{smartproxy-example-com}/pub/katello-ca-consumer-latest.noarch.rpm
    
    # subscription-manager register --org="My_Organization" \
    --environment="Library" \
    --force
    
    # subscription-manager refresh
  6. Update the {SmartProxy} host name in the {ProjectWebUI}.

    1. In the {ProjectWebUI}, navigate to Infrastructure > {SmartProxies}.

    2. Locate {SmartProxyServer} in the list, and click Edit.

    3. Edit the Name and URL fields to match {SmartProxyServer}'s new host name, then click Submit.

    4. On your DNS server, add a record for the new hostname of your {SmartProxyServer}, and delete the record of the previous host name.