How to continue using Acura after changing its public IP address

How to continue using Acura after changing its public IP address

Challenge

Acura requires a new public IP, and the replications should continue working as before.

Solution 

This article covers the process from the start, so skip to #2 if you have already configured a new IP.

#1 To change Acura's public IP:
  1. establish an ssh connection to the instance with the username: user and the key pair created during deployment of Acura;
  2. navigate to /etc/network/interfaces and set up a new network interface. Note that Acura is based on Ubuntu 20.04, so all related Linux guidelines apply;
  3. restart the instance for the changes to take effect;
  4. once connected, in the current location create a file called hx_ip containing a desired IP address in the standard format, e.g. 54.32.19.4;
  5. execute the hx_set_public_ip command from the same folder to assign the IP from the recently created hx_ip file and add it to Acura's ETCD.

#2 Now that Acura has a new public IP address, the replication agents on the source machines have to be adjusted accordingly for the replications to continue. There are two ways to do it:
  1. Reinstall the agents. For that, remove the existing replication agents and delete the old config files manually:
  1. For Windows Replication Agent:
C:\ProgramData\Hystax
If you can't see this folder, make sure that hidden files and folders are displayed and delete it. Terminate all repman or WinCBT procceses that might be left running.
After that, download a new agent installer from Acura and install the agent.

  1. For Linux Replication Agent:
sudo rm -rf /etc/hystax
After that, download a new agent installer from Acura and install the agent.

Acura will automatically inject the agent with the valid SSL certificate and IP address before the download.
Alert
If you choose to reinstall the agents, the source machines will require new full replications.
  1. Update agent configs with the new certificate and the new public IP. This can be done in a semi-automatic manner with the help of our script. 
  1. Download a script according to the source machine's operating system, either Windows or Linux.
    1. Script for Linux machines (right-click and choose to "save link as...")
    2. Script for Windows machines
  2. Open the file in any text editor and paste your valid SSL certificate into the corresponding line as well as Acura's new public IP address. 
  3. Execute the script on a machine to implement the changes to the agent's configuration file.
  4. The machine will be discovered in ACP once again, and replication can be continued.
Idea
If you choose to update the config files, the existing replication data will be maintained allowing incremental replications to follow.