What follows is a set of issue resolutions when attempting to clone a VM, having an existing install of Ignition v8.3, for use with Gateway Redundancy and Gateway Network configurations. This post started off as a request for help but in the course of writing this I managed to find resolutions to the issues that were blocking me.
Background: I was (am) proof-of-concept testing some git based workflows for our future use of v8.3 (currently still on v8.1) and the IT team has indicated a preference for VMs over containers. I set up one Ubuntu Server 20.04 24.04.04 based Virtual Machine with Ignition v8.3.4 installed and then created a bunch of linked clones to represent gateways on a multi-site configuration. I ran into a few issues, especially when trying to implement gateway redundancy and a gateway network using the cloned VMs. Here are the resolutions I had to implement.
- Give each VM clone a unique Gateway system name
- Give each VM clone a unique hostname
sudo hostnamectl hostname someuniquehostname
- Generate a new ssh host key for each VM clone.
sudo -su root
rm /etc/ssh/ssh_host_*_key*
dpkg-reconfigure openssh-server
systemctl restart ssh
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
- Generated a new machine id for each VM clone. Otherwise when using DHCP each clone competes for the same DHCP IP address assignment.
echo -n > /etc/machine-id
systemd-machine-id-setup
reboot
- Generated a new local certificate (Metro-keystore file) for each VM clone. Without this I could not establish gateway redundancy (cert approvals). Resolved thanks to breadcrumbs found in this forum thread, but the path is different for v8.3.
rm /usr/local/bin/ignition/data/config/local/ignition/gateway-network/keystore/metro-keystore.pfx
/usr/local/bin/ignition/ignition.sh restart
- Generate a new UUID (universally unique identifier) file for each VM clone. Gateway redundancy would not establish without this change.
rm /usr/local/bin/ignition/data/config/local/ignition/gateway-network/uuid.txt
/usr/local/bin/ignition/ignition.sh restart
I came across the article linked below towards the end of my efforts. Written for Ignition v8.1, I presume, as many of the paths stated therein are not correct for v8.3. Tagging @Eric_Bair as the author of the article in case he'd like to update it for v8.3
.
https://support.inductiveautomation.com/hc/en-us/articles/13578100743053-Cloning-a-VM
That article clued me into the existence of the UUID (universally unique identifier) file but with the wrong path so I had to go looking for a likely candidate and eventually found it (see item 6 above). However, the search revealed a few other UUID folders/files
find /usr/local/bin/ignition/ -iname *uuid*
/usr/local/bin/ignition/data/config/local/ignition/gateway-network/uuid.txt
/usr/local/bin/ignition/data/config/resources/local/com.inductiveautomation.opcua/uuid
/usr/local/bin/ignition/data/config/resources/local/com.inductiveautomation.opcua/uuid/uuid.txt
/usr/local/bin/ignition/user-lib/pylib/uuid.py
... and now I'm wondering if any of these need consideration as well. Does anyone know?