I’m losing my mind over this so i thought I would ask about it. I have a VM instance that I was asked to put into managed instance group so that later on we can stuff like load balancing and Cloud armor.
This Vm instance has plesk panel that is configured with a website on it which is configured with a public domain to point to it.
I shut down the vm instance, create an image, then create instance template and finally create the managed instance group. The problem is that the instances that launch will have their internal and external ip addresses different then the original vm obviously so none of them will work until I ssh inside the vm instances and do some repairs like : Plesk repair all and that doesn’t fix everything.
Essentially lets say original vm has internal ip : 11.11.11.1 and external ip : 20.20.20.1
when i create the managed instance group the first vm launching from the template will have
internal ip : 11.11.11.2 and external ip 20.20.20.2
but the config for plesk was setup for the first set of ips, so every instance created will be usesless as a webserver till they are fixed
Ive watched a lot of the tutorials on Managed vm instance groups, but none of them solve this issue. I’m trying to create a managed instance group of webservers that will go into a load balancer later.The tutorials online show just some simple start up script with one page being load balanced…
Any help is appreciated.
Thank you
2
Answers
As long as you want to host a single VM in Managed Instance Group, you can create an instance template that is bound to specific internal and/or external IP.
You can follow by analogy this example of creation MIGs with fixed IP addresses:
https://cloud.google.com/vpc/docs/special-configurations#configuring_the_gateways
As I don’t know Plesk, please clarify in your question:
Use :
plesk bin reconfigurator –autoconfigure
place on startup script of instance template