Score:0

Google cloud Auto scaling - how to create vm using existing vms image

in flag

Hi I am new to google cloud. I want to use autoscaling. My question is that is it possible to use the image of my current vm as template? Or do I have to create a fresh vm instance and create script that will install all the required setups like apache, php mysql git and pull the source code from bitbucket.

Thank you,

Score:0
in flag

Thank you Henrik for clearly explaining everything. I have already moved mysql database to Cloud SQL. For the release related data I too was thinking about add startup script that will update the code with git commands. Really appreciate your help.

Score:0
in flag

Yes, you can create an instance templates based on an existing instance. Note the warning:

Warning: If the existing instance contains a static external IP address, that address is copied into the instance template and might limit the use of the template.

However such an template needs to be stateless. So including your MySQL database is not a good idea. Also note that you would need to create a new template with every release you make so it might be a good idea to put git related tasks into a startup script. Check this tutorial for a walk through.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.