0

[what happened]

I am using GCP's instance-group, load-balancer, and cloudDNS.

I installed nginx and deployed tomcat app into the instance that was created when i first assigned empty instance-template to the instance-group.

It seems it had been working well for few months, but day ago, nginx and tomcat were both gone from the instance. it seems it has been initialized to the empty instance-template.

[what i want to know]

  1. Once I finish installing nginx and tomcat, i want to avoid my instance to be initialized. But I am doubting myself, Was it appropriate to install nginx and deploy tomcat app to the instance that was created based on empty-instance template? or should i have installed nginx and deployed tomcat app in some way another such as startup script or custom-image? but it looks not appropriate because I also need to upgrade and deploy my tomcat app every few months. Can anyone tell me the better way to manage

  2. This is extra question, probably the same as above in its principle. My instance-group creates extra instance when CPU exceeds 60% and at maximum it creates 3 instances. In these extra instances, nginx and tomcat are not installed because they are created from the empty instance template as described above. In such composition/structure, is it meaningful for load-balancing? or is it sharing the CPU power within multiple instances and is meaningful?

thank you for anyone answering.

Grzenio
  • 35,875
  • 47
  • 158
  • 240
Thasega
  • 1
  • 1
  • 1
    Did you install Nginx and Tomcat after creating the Managed Instance Group? Do not do that. Configure your instance as you want, then take an image and use that image for the template. – John Hanley Aug 12 '20 at 15:09
  • thanks for advice! I understood about installation of nginx and tomcat. But, how about deploying the updates of web-app to tomcat? should instance be re-created in every update? – Thasega Aug 13 '20 at 19:26
  • Each time you want to change the template, create a new system, make the changes, create an image, and then deploy. You can not change instances directly that are part of a MIG (Managed Instance Group) - changes are discarded as instances are created from templates and the images they reference. – John Hanley Aug 13 '20 at 20:33
  • I understood. Thank you! – Thasega Aug 14 '20 at 00:06

0 Answers0