Changing a Servers Hostname¶
Changing a server's hostname is an uncommon task but may be necessary for the following reasons:
-
Company branding.
-
Domain change.
-
Complete a restore of an Assure1 server primary from redundant backup.
-
Re-purpose servers for development, staging or production purposes.
Change HostFQDN¶
This section details the procedure for changing the HostFQDN within the Assure1 platform.
Best Practices¶
-
If HostFQDN was and should continue to be the same as WebFQDN, refer to the Change WebFQDN section instead.
-
All MySQL data files must be within one directory in order to use the Redundancy Wizard. Symbolic links or data directory mounts spanning multiple drive partitions are not currently supported by the Redundancy Wizard and manual resync of replication is required. Please contact Support for guidance prior to changing the HostFQDN if you have a non-standard database install.
Prerequisites¶
- Update DNS information, flush caches, and wait for TTL.
All Servers¶
-
Stop all Assure1 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
-
Update system host and/or domain information as required with new HostFQDN.
/etc/sysconfig/network /etc/resolv.conf
-
If HostFQDN of Primary or Backup Presentation server is changing.
-
On each server partner.
-
Update Unison config to the new HostFQDN of partner.
-
etc/unison/Packages.prf
-
etc/unison/Repos.prf
-
-
-
On server where HostFQDN that is changing.
- Regenerate SSL Host certificate.
/opt/assure1/bin/CreateSSLCertificate --Type Host --CN <HostFQDN> --Force
-
On Primary Presentation server¶
-
Regenerate Web SSL certificate.
/opt/assure1/bin/CreateSSLCertificate --Type Web --CN <WebFQDN> --AltCN <PriPres HostFQDN> [--AltCN <BakPres HostFQDN>] --Force
-
Modify etc/http.conf; replace any instances of the old HostFQDN with the new.
<VirtualHost _default_:443> DocumentRoot /opt/assure1/www ServerName [WEBFQDN]:443 ServerAlias [NEW HOSTFQDN]:443
-
Update etc/Assure1.conf changing any old HostFQDNs.
-
Copy the following files from the Presentation to all servers:
- etc/Assure1.conf
-
Copy the following files from the Primary Presentation to any External or Redundant Presentation servers:
-
etc/ssl/Web.crt.pem
-
etc/ssl/Web.key.pem
-
Presentation Servers (including External)¶
-
Start Apache.
service assure1-web start
-
Start Database.
service assure1-db start
-
Connect to the primary Assure1 schema.
-
Update Assure1 Servers record.
UPDATE Servers SET ServerHostFQDN = "<NEW-HOST-FQDN>" WHERE ServerHostFQDN = "<OLD-HOST-FQDN>";
-
Update Devices record.
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>";
-
Update 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>";
-
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);
-
Start the broker.
service assure1-broker start
On Primary Presentation Server¶
-
Login to web interface.
-
Navigate to Configuration -> Notifications -> Profiles.
-
Update Notification Profiles using old HostFQDN
On Presentation and Database Servers where HostName Changed¶
- Rerun Redundancy Wizard with data resync.
Change WebFQDN¶
This saection details the procedure for changing the WebFQDN (or Web & HostFQDN if should be the same) within the Assure1 platform.
Best Practices¶
-
If HostFQDN was and should continue to be the same as WebFQDN, any steps referencing HostFQDN can be considered synonymous with the new WebFQDN
-
All MySQL data files must be within one directory in order to use the Redundancy Wizard. Symbolic links or data directory mounts spanning multiple drive partitions are not currently supported by the Redundancy Wizard and manual resync of replication is required. Please contact Support for guidance prior to changing the WebFQDN if you have a non-standard database install.
Prerequisites¶
- Update DNS information, flush caches, and wait for TTL.
All Servers¶
-
Stop all Assure1 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
-
Update system host and/or domain information as required with new WebFQDN.
/etc/sysconfig/network /etc/resolv.conf
Primary Presentation Server¶
-
Regenerate SSL certificate.
/opt/assure1/bin/CreateSSLCertificate --Type Web --CN <WebFQDN> --AltCN <PriPres HostFQDN> [--AltCN <BakPres HostFQDN>] --Force
-
Modify etc/http.conf; replace any instances of the old WebFQDN with the new EXCEPT any VirtualHost's ServerAlias entries, those stay as the HostFQDN:
<VirtualHost _default_:443> DocumentRoot /opt/assure1/www ServerName [NEW WebFQDN]:443 ServerAlias [HostFQDN]:443
-
Copy the following files from the Primary Presentation to any External or Redundant Presentation servers:
-
etc/ssl/Web.crt.pem
-
etc/ssl/Web.key.pem
-
Presentation Servers (Including External)¶
-
Start Apache.
service assure1-web start
-
Start Database.
service assure1-db start
-
Connect to the primary Assure1 schema.
-
If HostFQDN should be the same as the new WebFQDN: update the Assure1 Server's host fdqn record (replacing \<NEW-WEB-FQDN> and \<OLD-WEB-FQDN> respectively)
UPDATE Servers SET ServerHostFQDN = "<NEW-WEB-FQDN>" WHERE ServerHostFQDN = "<OLD-WEB-FQDN>";
-
Update Server record.
UPDATE Servers SET WebFQDN = "<NEW-WEB-FQDN>" WHERE WebFQDN = "<OLD-WEB-FQDN>";
-
Update Device 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>";
-
Update CoreDatabases record.
UPDATE CoreDatabases SET DBHost = "<NEW-WEB-FQDN>" WHERE DBHost = "<OLD-WEB-FQDN>";
-
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);
All Servers¶
-
Update the rules checkout paths to point to the new WebFQDN: (NOTE: not all checkout directories are used on a database or collection server)
for CHECKOUT in config dashboards core event files metric topology 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
-
Start the broker.
service assure1-broker start
On Primary Presentation Server¶
-
Login to web interface.
-
Navigate to Configuration -> Notifications -> Profiles.
-
Update any Notification Profiles using the old WebFQDN.
On Presentation and Database Servers where WebFQDN was Changed¶
- If HostFQDN is the same as WebFQDN, rerun Redundancy Wizard with data resync.