Skip to main content

IP change procedure

WARNING

Cockpit 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

  1. Connect to TPE node. Execute an ssh command to connect to the server:

    ssh support@${IP_OR_HOSTNAME_OF_TPE} -p 2222
  2. 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.

  3. Update IP and restart network:

    WARNING

    Cockpit 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
  4. 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.
  5. 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.yml

    Now, redeploy the cluster:

    /usr/bin/tpe-update-node-ip-step3
  6. Reconfigure the network server hostname in the TPE Configuration Cockpit module:

    • Connect to Cockpit by using the new IP address
    • Go to the TPE Configuration module
    • If the "Network server hostname" field contains the previous IP address, update it with the new one.
    • Click on "Apply & Save" to apply the new configuration
  7. 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

  1. 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
  2. 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 in the /home/support directory). Do not remove this file.

  3. 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
  4. 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.yml

    Now, 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.

  5. Reconfigure the primary network server hostname in the TPE Configuration Cockpit module:

    WARNING

    This step must be done only if you have changed the IP address of node1.

    • Connect to Cockpit
    • Go to the TPE Configuration module
    • If the "Network server hostname" field contains the previous IP address of the node1, update it with the new one.
    • Click on "Apply & Save" to apply the new configuration.
  6. Reconfigure the secondary network server hostname in the TPE Configuration Cockpit module:

    WARNING

    This step must be done only if you have changed the IP address of node2.

    • Connect to Cockpit
    • Go to the TPE Configuration module
    • If the "Secondary network server hostname" field contains the previous IP address of the node2, update it with the new one.
    • Click on "Apply & Save" to apply the new configuration.
  7. Base Station reconfiguration:

    WARNING

    This 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.