what is the right approach to deploy a job/script for automated patching of VMs linked to a Project.
If we have 50-60 VMs in a Project and we have to schedule the Monthly patching .
Do we need to deploy the script in a function or any other suggested way?
We are planning to use a single GCP service account for the same.
When it comes to deploying a job/script for automated patching of VMs in a project, there are multiple approaches you can consider. One option is to use a serverless approach like Google Cloud Functions. However, since you mentioned using a single Google Cloud Platform (GCP) service account for the task, a more suitable approach would be to use a configuration management tool like Ansible or Puppet.
Here's a suggested approach:
By following these steps, you can automate the patching process for your VMs in a controlled and scalable manner. Remember to keep your scripts and management server up to date with security patches to ensure the integrity of your patching infrastructure.
thank you Prabhakaranjm for detailed suggestion. I want to use google patch management(native patching solution) to patch the vms , using ansible/puppet , i think I need to write script based on os type . Google patch management automatically take cares of it .
My intension is to use google patch management solution using gcloud(commands) which reads the vms information from a storage bucket. and patch the vms mentioned in the Storage file.
so i would like to ask for this approach , which platform will be more suitable . function or any other where we can run the the patch jobs ( time limit more than 1 hour) including backup jobs before patching jobs . I want to create a workflow where one by one all these jobs gets triggered (backup --> patching).
Can you please suggest on this