GoogleCloudPlatform / batch-samples

56 stars 26 forks source link

Is Batch The Right Product For My Idea? #75

Open mvhatch opened 1 week ago

mvhatch commented 1 week ago

I would like to setup some self-hosted, ephemeral GitHub runners in my GCP project. I'm thinking that I can have a webhook from GitHub ping a cloud run http endpoint, and the cloud run service will invoke a new batch job. The batch job simply needs to run a vm with an image that has the GitHub runner agent pre-installed. I assume this means I need to build a custom batch vm os image that has the necessary GitHub dependencies, and then execute those apps when the batch job is created. For what it's worth, my GitHub Workflows need to be able to execute docker-compose and bind mounts, so this is why I'm leaning towards Batch vs Cloud Run. Does this seem like a fair use case for batch? Should I be looking at another GCP product instead? Is Packer+Cloud Build the only way to build a custom batch image?