I have several different Virtualmin/Webmin based systems, e.g. one is Login panel, another is Customer Account, another one runs Configuration and other CMS etc. They run PHP code. I have separate LDAP and MySQL clusters. I have also load balancer for PHP servers. What I am looking for, is to actually clone the image the way, that upon boot it will change the ip number and the hostname.
I have configured the following:
- DHCP gets ip number on boot
- There is Apache/Postfix installed with ip number configured
My idea is to:
- During boot, check if the IP address is the same
- If it's different, change ip address in Apache, Postfix, Webmin, regenerate self-signed certificates
- Register on load balancer that it can direct traffic to it and synchronize dynamic data folder.
- Update and reboot machine
As I understand, this way, I dont have to update 20 instances, but what I do, I just replace the complete image, and in case it fails, I revert to the previous instances.
Is this correct approach?