Can we use google cloud run for running gcloud commands (long running )?
i need to add backup and patch related gcloud commands inside the cloud run which i will use to backup multiple vms programmatically
what will be the process , please guide me on this
Hi @gcloudLearning ,
You run long-running jobs using Cloud Run. Here’s a guide on how to create a job with Cloud Run. For more information regarding cloud run you may refer to this documentation.
Relative to other platforms that support long-running jobs, Cloud Run jobs start quickly after creation. Simple containers can start in as little as 10 seconds, depending on container complexity. This makes Cloud Run jobs well suited for situations where waiting a few minutes for a VM to start is problematic.
The Cloud Run jobs workflow consists of two simple steps:
- Create the job. The job encapsulates all the configuration needed to execute the job, such as the container image.
- Execute the job. Use either the Cloud Console or the gcloud CLI and execute the job from the command line.
Check this link for additional guide.
Thank you for the response. also just want to know,
What is the timeout value for cloud run,
suppose i have multiple vms and jobs are taking more than 1 hour , will it give timeout?
If i run 2 cloud jobs? rather than in just 1 cloud job if i separate the task in multiple jobs? or any other approach to separate the task here which should not be much costly
and can we run 2 cloud jobs sequentially? will it be using workflows or any other option?
how the price of cloud job is calculated if i need to run a job once in a week?