Change backend IP addresses of Postgres, Redis and NFS for Hipchat Datacenter Nodes
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
You need to change the IP address or endpoint for external datastores used with HipChat Datacenter including
- Postgres
- Redis
- NFS
Resolution
HipChat Datacenter first reads a site.json file in order to find the Postgres database. Most configuration data is found in the 'configurations' table in your HipChat database. Follow the steps below to update the service endpoints you're changing.
Update your database pointer
On each Application Node in the cluster;
- Login via SSH and become root using the "sudo dont-blame-hipchat" utility
Edit the site.json found at
/hipchat/config/site.json
Using an editor of your choice, update the servers key:value for your postgres database.
{ "environment": "btf", "hostname": "hipchat", "ipaddress": "192.168.122.4", "databases": { "hipchat_postgres": { "user": "hipchat", "pass": "hipchat", "schema": "hipchat", "servers": [ "IP_ADDRESS_OR_FQDN_OF_POSTGRES:5432" ] } }, "server_id": "111111111111111111111111111111"
Edit the Crowd.cfg.xml found at
crowd.cfg.xml/etc/crowd/crowd.cfg.xml
Update the following line with your new IP or FQDN
Crowd Postgres IP<property name="hibernate.connection.url">jdbc:postgresql://YOUR_NEW_IP_ADDRESS:5432/hipchat</property>
Restart each datacenter node:
hipchat datacenter restart
Verify your changes;
hipchat datacenter selfcheck
HipChat will now connect to the Postgres endpoint defined. The changes below are now made in your Postgres database. Ensure backups or snapshots are available for your Postgres service.
Update the Postgres database for Redis and NFS Pointers
To update your Redis Server Endpoint run the following command with your new IP or FQDN:
UPDATE configurations SET value='NEW_IP_OR_FQDN' WHERE key='redishostname';
To update your NFS Server Endpoint, run the following command with your new IP or FQDN:
UPDATE configurations SET value='NEW_IP_OR_FQDN' WHERE key='nfshostname';
Ports can also be changed with the following queries;
You may not need to change service ports, this is optional.
UPDATE configurations SET value='PORT_NO' WHERE key='redisport';
UPDATE configurations SET value='PORT_NO' WHERE key='nfsport';
Changes can be validated by checking the configurations table;
select * from configurations;