IP change procedure
Cockpit GUI must not be used to reconfigure this interface.
The "IP Change" procedure must be used to update network configuration. If the IP has not been updated with this procedure, rollback the network configuration to restore TPE services, and follow this procedure.
Before starting the IP change procedure, make sure to have a valid TPE Backup archive to be able to restore your data.
Standalone mode
Connect to TPE node. Execute an ssh command to connect to the server:
$ ssh support@${IP_OR_HOSTNAME_OF_TPE} -p 2222
Backup Docker Swarm config and leave the cluster by running this command (this command stop all TPE services):.
$ /usr/bin/tpe-update-node-ip-step1 -n tpe-node1
This script generates a file (infra.yml under /home/support directory). Do not remove this file.
Update IP and restart network
WARNINGCockpit GUI must not be used to reconfigure this interface.
Edit the config file (ethX : interface used) and update the IPADDR var:
$ sudoedit /etc/sysconfig/network-scripts/ifcfg-ethX
and restart the network:
$ systemctl restart network
Restore the backup with new IP address
If the IP updated is used for SSH, reconnect to the TPE node using the new IP:
$ ssh support@${IP_OR_HOSTNAME_OF_TPE} -p 2222
Restore backup by running the following script:
$ /usr/bin/tpe-update-node-ip-step2 -n tpe-node1 -c '{"hosts": [ {"ip": "<IP address node1>", "hostname":"tpe-node1", "sup_pass": "<support_password>" }]}'
Where:
<IP address node>
must be replaced by the IP address.<support_password>
must be replaced by the support user password.
Redeploy cluster
Edit the infra.yml and update the IP:
$ vi infra.yml
[...]
tpe_nodes:
hosts:
tpe_node1:
ansible_host: <IP address node>
hostname: tpe-node1
[...]Update the docker config infra.yml using this file:
$ docker config rm infra.yml
$ docker config create infra.yml infra.ymlNow, redeploy the cluster:
$ /usr/bin/tpe-update-node-ip-step3
Reconfigure "Primary network server address" in Cockpit TPE Configuration
- Connect to Cockpit GUI by using the new IP address
- Go to TPE Configuration
- Configure the new IP address in field "Primary network server address"
- Click on "Apply & Save" to apply the new configuration
Base Station reconfiguration
If you have already provisioned and connected Base Station before IP address change you will have to:
Reconfigure the Base Station with the new IP address of TPE host
If IPsec (X.509) is used for Base Station to TPE connection, you will have to regenerate all the Base Station certificates by running the following script:
$ /usr/bin/tpe-regenerate-bs-certificates
High Availability mode
Connect to one of the running TPE node that will not be updated. Execute an ssh command to connect to the server:
$ ssh support@${IP_OR_HOSTNAME_OF_TPE} -p 2222
Remove from Docker Swarm the node where you plan to change the IP by running this command:
$ /usr/bin/tpe-update-node-ip-step1 -n <node_name>
Where <node_name> must be replaced by "tpe-node1", "tpe-node2" or "tpe-node3" following the node you plan to change the IP. This script generates a file (infra.yml under /home/support directory). Do not remove this file.
Update IP and restart network
Connect to the node where you plan to change the IP. Execute an ssh command to connect to the server:
$ ssh support@${IP_OR_HOSTNAME_OF_TPE} -p 2222
Edit the config file (ethX : interface used) and update the IPADDR var:
$ sudoedit /etc/sysconfig/network-scripts/ifcfg-ethX
and restart the network:
$ systemctl restart network
Redeploy cluster
Return to the to the node used on step 1.
Edit the infra.yml and update the IP where <node_name> corresponds to the node where you changed the IP address ("node1", "node2" or "node3"):
$ vi infra.yml
[...]
tpe_nodes:
hosts:
[...]
tpe_<node_name>:
ansible_host: <IP address node>
hostname: tpe-<node_name>
[...]Update the docker config infra.yml using this file.
$ docker config rm infra.yml
$ docker config create infra.yml infra.ymlNow, redeploy the cluster:
$ /usr/bin/tpe-update-node-ip-step2 -n <node_name>
Where <node_name> must be replaced by "tpe-node1", "tpe-node2" or "tpe-node3" following the node where you changed the IP.
Reconfigure "Primary network server address" in Cockpit TPE Configuration:
WARNINGThis step must be done only if you have changed the IP address of node1.
- Connect to Cockpit GUI
- Go to TPE Configuration
- Configure the new IP address in field "Primary network server address"
- Click on "Apply & Save" to apply the new configuration.
Reconfigure "Secondary network server address" in Cockpit TPE Configuration:
WARNINGThis step must be done only if you have changed the IP address of node1.
- Connect to Cockpit GUI
- Go to TPE Configuration
- Configure the new IP address in field "Secondary network server address"
- Click on "Apply & Save" to apply the new configuration.
Base Station reconfiguration
WARNINGThis step must be done only if you have changed the IP address of node1 or node2.
If you have already provisioned and connected Base Station before IP address change you will have to reconfigure the Base Station with the new IP address of TPE host
If IPsec (X.509) is used for Base Station to TPE connection, you will have to regenerate all the Base Station certificates by running the following script:
$ /usr/bin/tpe-regenerate-bs-certificates
The cluster is updated.