Changing BlueMind server IP address
This page describes how to change a BlueMind server's IP address.
delicate operation
This description is deliberately minimal as it is reserved to experienced administrators who are familiar with the sensitive operations performed.
IP address change procedure
Files affected
The following command identifies the files affected by this change:
grep -lir <old_ip> /etc
Consider the following commands:
<old_ip>
is the previous IP,<new_ip>
is the new
Procedure:
- Stop BlueMind:
bmctl stop
systemctl mask bluemind.target - Start postgresql:
systemctl start postgresql
- Update database information :
💡 If prompted for a password, enter database password. It can be found in the
/etc/bm/bm.ini
file.export new_ip=xx.xx.xxx.xxx
export old_ip=xx.xx.xxx.xxx
export fqdn=$(grep ${old_ip} /etc/hosts | awk '{print $2}');
sudo -Hu postgres psql bj -c "update t_server set ip = '${new_ip}',fqdn = '${fqdn}' where ip = '${old_ip}'; update t_systemconf set configuration = configuration || hstore('host','${new_ip}') || hstore('hz-member-address', '${new_ip}') || hstore('mynetworks', '${new_ip}') || hstore('redis-bootstrap-address', '${new_ip}');" - Update the server's network configuration with the new IP address
- Update
/etc/hosts
filesed -i "s/${old_ip}/${new_ip}/g" /etc/hosts
- Edit the file
/etc/bm/bm.ini
, replacing the address of the "host
" and "hz-member-address
" parameters with the new IP addresssed -i "s/${old_ip}/${new_ip}/g" /etc/bm/bm.ini
- Restart the server:
reboot
- Restart BlueMind and the node :
systemctl unmask bluemind.target
bmctl start
systemctl restart bm-node - Delete and re-create realms keycloak :
bm-cli auth reconfigure
systemctl restart bm-keycloak - Edit the
/var/backups/bluemind
folder structure, renaming the folder/var/backups/bluemind/dp_spool/rsync/<old_ip>
with the new IP address
System reconfiguration
Manually
- Reconfiguring the firewall:
sed -i "s/${old_ip}/${new_ip}/g" /etc/init.d/bm-iptables
systemctl restart bm-iptables.service - Reconfiguring postfix:
sed -i "s/${old_ip}/${new_ip}/g" /etc/postfix/main.cf /etc/postfix/transport-flat
postmap /etc/postfix/transport-flat
mv /etc/postfix/transport-flat.db /etc/postfix/transport.db - Reconfigure the bm-tick supervision tool:
kapacitor list tasks | awk '{print $1}' | grep -v ID | xargs -I {} kapacitor delete tasks {}
bm-cli tick reconfigure
Via AdminConsole
Log into the BlueMind Administration console as admin0@global.virt
and:
- Go to Security > Manage Firewall and immediately click on the "Save" button to force the regeneration of BlueMind firewall rules
- Go to System management > Manage messaging system, click on the "Run" button to re-generate the Postfix mail routing tables
- Go to System Management > System Configuration and replace the old IP address in the "My Networks" field by the new address or the address range for which you want the relay open and click "Save"
- Reconfigure the bm-tick supervision tool:
kapacitor list tasks | awk '{print $1}' | grep -v ID | xargs -I {} kapacitor delete tasks {}
bm-cli tick reconfigure