K. Dackow
K. Dackow

Reputation: 456

Google Cloud Platform Duplicate VM Management

I am trying to have multiple, geographically diverse VM instances on Google Cloud Platform. I want to have them all running the same custom-made service, which may need patches over time. How would I make these distributed rollouts possible?

Thanks.

Upvotes: 0

Views: 75

Answers (2)

Ahmed Abdelazim
Ahmed Abdelazim

Reputation: 741

Yes, actually you can try to do it through the gcloud command in the Cloud Shell.

Here you have an example:

gcloud compute ssh --zone ZONE INSTANCE1 --command  'wget -O - https://raw.githubusercontent.com/user/repo/master/myscript.sh | bash'
gcloud compute ssh --zone ZONE INSTANCE2 --command  'wget -O - https://raw.githubusercontent.com/user/repo/master/myscript.sh | bash'

I hope this helps.

Upvotes: 1

Kolban
Kolban

Reputation: 15266

If you would like to ensure that all your GCE instances are running the same content then consider creating an instance template..

Using an instance template, you should be able to then declare that an instance should be created from this template.

If all your instances refer to the same template then you will be sure that you are using the same throughout. If you then combine this with the concept of a managed instance group and take advantage of Rolling out updates to MIGs which allows you to automate the upgrade of logic/content.

I hope this helps.

Upvotes: 3

Related Questions