What is Cloud Run?
● A managed compute platform
● Runs containers on Google’s infrastructure
● Supports source-based deployment that builds containers for you
● Build full-featured applications with other Google Cloud services
Cloud Run is a fully managed compute platform that lets you deploy and run
containers directly on top of Google’s scalable infrastructure.
If you can build a container image of your application code written in any language,
you can deploy the application on Cloud Run.
You can use the source-based deployment option that builds the container for you,
when developing your application in Go, Node.js, Python, Java, .NET Core, or Ruby.
Cloud Run works well with other services on Google Cloud, so you can build
full-featured applications without spending too much time operating, configuring, and
scaling your Cloud Run service.
The Cloud Run developer workflow is a three-step process: 1. First, you write your application using your favorite programming language. This application should start a server that listens for web requests. 2. Second, you build and package your application into a container image. 3. Finally, you deploy the container image to Cloud Run. You can deploy your container to Cloud Run using the Google Cloud console, the gcloud CLI, or declaratively from a YAML configuration file. Cloud Run also supports the deployment of services using Terraform, a popular open source tool that is used to create and manage infrastructure as code. Once you’ve deployed your container, you get a unique HTTPS URL. Cloud Run then starts your container on demand to handle requests, and ensures that all incoming requests are handled by dynamically adding and removing containers. Cloud Run is serverless. That means that you, as a developer, can focus on building your application, and not on building and maintaining the infrastructure that powers your application.
For some use cases, a container-based workflow is great, because it gives you a
great amount of transparency and flexibility.
If you build the container image yourself, you decide exactly which files are packaged
in your container image.
However, building an application is hard enough already, and adding containerization
adds additional work and responsibilities.
If you’re just looking for a way to turn source code into an HTTPS endpoint by
creating and deploying a containerized application in a secure, well-configured, and
consistent manner, you can use Cloud Run.
With Cloud Run, you can use a container-based workflow, and a source-based
workflow.
If you use the source-based approach, you deploy your source code, instead of a
container image. Using Buildpacks, Cloud Run then builds your source, and packages
the application along with its dependencies into a container image for you.
Cloud Run supports secure HTTPS requests to your application. On Cloud Run, your
application can either run continuously as a service or as a job. Cloud Run services
respond to web requests, or events, while jobs perform work and quit when that work
is completed.
Cloud Run:
● Provisions a valid TLS certificate, and other configuration to support HTTPS
requests.
● Handles incoming requests, decrypts, and forwards them to your application