https://cloud.google.com/sdk/gcloud/reference/compute/instan...
(I'm a googler, but do not work anywhere near your cloud. I used this for a personal project.)
https://cloud.google.com/sdk/gcloud/reference/compute/instan...
(I'm a googler, but do not work anywhere near your cloud. I used this for a personal project.)
The process of switching to using simple vms was a gcloud one liner to spin up a vm with the same docker image. That basically worked the first time we tried it. We ran with this for a few months. Then we finally sat down and got ourselves a load balancer with an instance group and an instance template. We deploy by telling gcloud to replace the template on the instance group. It does a rolling restart and it uses our health checks to ensure it does the right things. And it's stupidly easy to script together. We use Github actions for automated deploys. It does rolling restarts, has health checks, monitoring, logging, etc. built in. Everything you need to run a simple monolith.
It's similar to what Amazon did with ECS. Just less convoluted and way more easier to use.
People assume they need all this crazy complicated infrastructure. But it's all commodity off the shelf stuff these days and it doesn't have to be that hard to set up. Could we automate the above? Sure. But what's the point. It's 1 command to create instance templates, another command to tell the LB to run it. Provisioning the LB with a wild card certificate is a five minute job using the UI. It will tell you the commands if you need them. But it's something you do once per environment.
https://ramansharma.substack.com/p/multiple-stops-on-the-clo...
[0]: https://cloud.google.com/compute/docs/containers/deploying-c...