Cloud Run deployments with YAML
ฝัง
- เผยแพร่เมื่อ 8 ก.ค. 2024
- Do you update or create your Cloud Run service with the command line and console? In this episode of Serverless Expeditions Extended, Martin, and Roger discuss how to create or update your Cloud Run service with a YAML file. Watch along and learn how developers can always stay up-to-date with the latest settings of their service, how to rerun their service at any time without compromising the user experience, and more!
Chapters:
0:00 - Intro
0:36 - Build and push container
2:18 - Deploy new revision via console
3:36 - Retrieving YAML of existing service
5:04 - Change service settings with YAML
5:56 - Update service with a traffic split
7:28 - Demo: roll-back
8:19 - Container updates
10:04 - Wrap up
Check out more episodes of Serverless Expeditions → goo.gle/ServerlessExpeditions
Subscribe to Google Cloud Tech → goo.gle/GoogleCloudTech
#ServerlessExpeditions #ServerlessExpeditionsExtended - วิทยาศาสตร์และเทคโนโลยี
🫨 How often do you YAML or do your use cases turn into A Series of Unfortunate Indents?
Let us know in the comments below and don’t forget to subscribe to Google Cloud Tech → goo.gle/GoogleCloudTech
This is very handy and better than creating shell scripts that use gcloud with configuration parsers to achieve the same thing.
Agreed! Whenever I start writing configuration parsers or other non-trivial code for CI/CD, I force myself to stop and do some research. There usually is a better way.
Cool feature, thanks for the clear explanation, I'll try it soon!
I needed the command: gcloud run services describe. Thanks for surfacing this.
nice, i'd try to apply this yaml file with kubectl, i guess it would work in Anthos
I have seen lots videos using google chat assistance , just want to know what is the price for individual user (not enterprise) ?
The pricing table was published yesterday. As I'm writing this (Dec 14, 2023) it's $19 per user per month with an upfront annual commitment. You can use Duet AI for Developers at no cost until Feb 1, 2024. New Google Cloud customers can also use $300 of free credits to try it out. Search for "google cloud duet ai pricing" to see all the details.
Is possible create a new service using a yaml file?
"gcloud run services replace" can be used to replace OR create a Cloud Run service.
It would be see how to use Cloud Build with Github and YAML files instead of manually running scripts
That's a great idea! I'm adding it to my to-do list of episodes to create. Thank you.
Also, I forgot, we did release a video about deploying Cloud Run services using Github Actions, last year. Search TH-cam for "How to deploy Cloud Run services with GitHub Actions" and you will find it. Hope it helps!
it is a wonderful video, that i could find out over internet, but i need terraform script to deploy serverless container on cloud run by using cloud build and cloud deploy ...can you help me out by providing solution for this please.
Thank you for the kind words about the video. If you do a web search for "cloud run terraform" you will find some good resources and examples. Best of luck!
I did not find this approach to be as easy as using Cloud Build yaml to take care of building image and deploying config AND code changes. Here you are building image separately and then modifying the yaml separately and executing two separate commands. Cloud Build yaml is all contained into one yaml.
That's a good point. I think "infrastructure-as-code" shines when you set up a new project from scratch or when you install a stable version of an application for a customer. For day-to-day development work, a CI/CD approach may work better. One can use Cloud Run's built-in integration with source code repos, or Cloud Build, or GitHub Actions for that.
what is the difference between service.yaml and cloudbuild.yaml ?
Good question! You can define the settings of your Cloud Run service with YAML. That file can be called whatever you want, but we called it service.yaml in this video. As shown in the video, you can use a gcloud command to update your Cloud Run service so it uses the settings from service.yaml.
The other file (cloudbuild.yaml) is a recipe for how Cloud Build should build your Cloud Run service. It is useful if you want to do more than just build your container, for example if you want to run unit tests before you build it. You can use Cloud Build without a cloudbuild.yaml file. If you do, Cloud Build will simply build your container and not run any additional steps like testing.
I ordered twice and I didn't get any product you've taken out of my account twice last month or this month
🤙🤙🤙🤙🤙☺️☺️☺️