Changing a Server's Hostname

Changing a server's hostname is an uncommon task but may be necessary for the following reasons:

Best Practices

Prerequisites

Before changing the HostFQDN or WebFQDN, update DNS information, flush caches, and wait for TTL.

Changing the HostFQDN

  1. Repeat the following on all servers:

    1. Stop all Unified Assurance applications on all servers using broker control and init scripts:

      cd $A1BASEDIR/
      bin/BrokerControl --batch stopall
      service assure1-web stop
      service assure1-broker stop
      service assure1-db stop
      
    2. Update system host and domain information with new HostFQDN in the following Linux core files:

      • /etc/sysconfig/network

      • /etc/resolv.conf

    3. If the HostFQDN of the primary or backup presentation server is changing:

      1. On each server partner, update the following Unison configuration file with the new HostFQDN of the partner:

        • $A1BASEDIR/etc/unison/Packages.prf

        • $A1BASEDIR/etc/unison/Repos.prf

      2. On server of the HostFQDN that is changing, regenerate SSL Host certificate:

        $A1BASEDIR/bin/CreateSSLCertificate --Type Host --CN <HostFQDN> --Force 
        
  2. On the primary presentation server:

    1. Regenerate the Web SSL certificate:

      $A1BASEDIR/bin/CreateSSLCertificate --Type Web --CN <WebFQDN> --AltCN <PriPres HostFQDN> [--AltCN <BakPres HostFQDN>] --Force
      
    2. Replace any instances of the old HostFQDN in the following files:

      • $A1BASEDIR/etc/httpd.conf

        For example:

        <VirtualHost _default_:443>
            DocumentRoot /opt/assure1/www
            ServerName   [WEBFQDN]:443
            ServerAlias  [NEW HOSTFQDN]:443
        
      • $A1BASEDIR/etc/Assure1.conf

    3. Copy $A1BASEDIR/etc/Assure1.conf from the primary presentation server to all other servers.

    4. Copy the following files from the primary presentation server to any external or redundant presentation servers:

      • $A1BASEDIR/etc/ssl/Web.crt.pem

      • $A1BASEDIR/etc/ssl/Web.key.pem

  3. Repeat the following on all internal and external presentation servers:

    1. Start Apache:

      service assure1-web start
      
    2. Start the Database:

      service assure1-db start
      
    3. Connect to the primary Assure1 schema.

    4. Update the Servers record:

      UPDATE Servers SET ServerHostFQDN = "<NEW-HOST-FQDN>" WHERE ServerHostFQDN = "<OLD-HOST-FQDN>";
      
    5. Update the Devices records:

      UPDATE Devices SET DNSName = "<NEW-HOST-FQDN>" WHERE DNSName = "<OLD-HOST-FQDN>";
      UPDATE Devices SET CustomName = REPLACE(CustomName, "<OLD-HOST-FQDN>", "<NEW-HOST-FQDN>") WHERE DNSName = "<NEW-HOST-FQDN>";
      
    6. Update the CoreDatabases records:

      UPDATE CoreDatabases SET DBHost = "<NEW-HOST-FQDN>" WHERE DBHost = "<OLD-HOST-FQDN>";
      UPDATE CoreDatabases SET DatabaseName = REPLACE(DatabaseName, "<OLD-HOST-FQDN>", "<NEW-HOST-FQDN>") WHERE DBHost = "<NEW-HOST-FQDN>";
      
    7. Update application configurations of type Host or DSN:

      UPDATE BrokerComponentConfig 
          SET BrokerComponentConfigValue = REPLACE(BrokerComponentConfigValue, "<OLD-HOST-FQDN>", "<NEW-HOST-FQDN>") 
      WHERE BrokerComponentConfigTypeID IN (8, 19);
      
    8. Start the broker:

      service assure1-broker start
      
  4. On the primary presentation server:

    1. Log in to Unified Assurance user interface.

    2. From the Configuration menu, select Notifications, then select Profiles.

    3. Replace the old HostFQDN with the new one in all Notification Profiles.

  5. On presentation and database servers where the HostName changed, run Redundancy Wizard with the SyncData option as the root user:

    cd $A1BASEDIR/bin/redundancy/
    ./RedundancyWizard --SyncData
    

Changing the WebFQDN

  1. Repeat the following on all servers:

    1. Stop all Unified Assurance applications on all servers using broker control and init scripts.

      cd $A1BASEDIR/
      bin/BrokerControl --batch stopall
      service assure1-web stop
      service assure1-broker stop
      service assure1-db stop
      
    2. Update system host and domain information with new HostFQDN in the following Linux core files:

      • /etc/sysconfig/network

      • /etc/resolv.conf

  2. On the primary presentation server:

    1. Regenerate the SSL certificate.

       /opt/assure1/bin/CreateSSLCertificate --Type Web --CN <WebFQDN> --AltCN <PriPres HostFQDN> [--AltCN <BakPres HostFQDN>] --Force
      
    2. Replace any instances of the old WebFQDN in the $A1BASEDIR/etc/httpd.conf file, except in ServerAlias under VirtualHost, which should remain HostFQDN.

      <VirtualHost _default_:443>
        DocumentRoot /opt/assure1/www
        ServerName   [NEW WebFQDN]:443
        ServerAlias  [HostFQDN]:443
      
    3. Copy the following files from the primary presentation server to any external or redundant presentation servers:

      • $A1BASEDIR/etc/ssl/Web.crt.pem

      • $A1BASEDIR/etc/ssl/Web.key.pem

  3. Repeat the following on all internal and external presentation servers:

    1. Start Apache.

      service assure1-web start
      
    2. Start the database:

      service assure1-db start
      
    3. Connect to the primary Assure1 schema.

    4. If the HostFQDN should be the same as the new WebFQDN, update the ServerHostFQDN record:

      UPDATE Servers SET ServerHostFQDN = "<NEW-WEB-FQDN>" WHERE ServerHostFQDN = "<OLD-WEB-FQDN>";
      
    5. Update the Servers record:

      UPDATE Servers SET WebFQDN = "<NEW-WEB-FQDN>" WHERE WebFQDN = "<OLD-WEB-FQDN>";
      
    6. Update the Devices record:

      UPDATE Devices SET DNSName = "<NEW-WEB-FQDN>" WHERE DNSName = "<OLD-WEB-FQDN>";
      UPDATE Devices SET CustomName = REPLACE(CustomName, "<OLD-WEB-FQDN>", "<NEW-WEB-FQDN>") WHERE DNSName = "<NEW-WEB-FQDN>";
      
    7. Update the CoreDatabases record:

      UPDATE CoreDatabases SET DBHost = "<NEW-WEB-FQDN>" WHERE DBHost = "<OLD-WEB-FQDN>";
      
    8. Update any application configurations of type Host or DSN matching old FQDN:

      UPDATE BrokerComponentConfig 
         SET BrokerComponentConfigValue = REPLACE(BrokerComponentConfigValue, "<OLD-WEB-FQDN>", "<NEW-WEB-FQDN>") 
       WHERE BrokerComponentConfigTypeID IN (8, 19);
      
  4. Repeat the following on all servers:

    1. Update the rules checkout paths to point to the new WebFQDN. Not all checkout directories are used on a database or collection server.

      for CHECKOUT in config core diagrams files
      do
        if [ -d /opt/assure1/var/checkouts/$CHECKOUT ] ; then
            cd /opt/assure1/var/checkouts/$CHECKOUT &&  /opt/assure1/vendor/svn/bin/svn --config-dir /opt/assure1/etc/svn relocate https://<NEW-WEB-FQDN>/repos/$CHECKOUT/
        fi
      done
      
    2. Start the broker.

      service assure1-broker start
      
  5. On the primary presentation server:

    1. Log in to Unified Assurance user interface.

    2. From the Configuration menu, select Notifications, then select Profiles.

    3. Replace the old WebFQDN with the new one in all Notification Profiles.

  6. On presentation and database servers where WebFQDN was changed, if HostFQDN is the same as WebFQDN, run Redundancy Wizard with the SyncData option as the root user:

    cd $A1BASEDIR/bin/redundancy/
    ./RedundancyWizard --SyncData