tpayne / CloudRun

This repository provides various example applications which can be deployed to GCP Cloud Run.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CloudRun

This repository provides various example applications which can be deployed to GCP Cloud Run.

Very crudely, Cloud Run are hosted containers that act as services based on runtime images like Springboot. These services are cheaper to run than Cloud Functions and are able to provide faster cold start times.

These samples assume you have a basic understanding of GCP, hosted compute services and Docker.

You can setup a service which monitors a repo and will then kick off a build/deploy process if a change to that repo is detected. These repos can either be: -

  • Source repos - like Git
  • Container repos - like GCR.IO

Status

Cloud Run Status: Ready for use

Build Status

Java CI with Maven GitHub CR Build and Push

Samples

The following samples are provided. You can use the Run on Cloud button to build and deploy the samples directly to GCP - assuming you have an account setup to use GCP!

Sample Description Deploy
samples/FileSampleApp A simple File loading sample Run on Google Cloud
samples/GCESample A simple GCE compute sample Run on Google Cloud
samples/SimpleSpringApp A simple SpringApp sample Run on Google Cloud
samples/StorageGCSSample A simple GCS storage sample Run on Google Cloud

Cloud Functions vrs CloudRun

Which one to use? Well, that is essentially up to the scenario you are coding for. They both achieve the same functionally, but do it in slightly different ways.

Generally, I would suggest using Cloud Run for REST and HTTP/S service endpoints and using Cloud Functions for event based operations. There is a fairly long discussion about which approach to use here.

One of the challenges with the public cloud providers is that there is always multiple ways of doing the samething. You have to choose the one that best serves the problem you are trying to solve.

Notes

The following are additional Cloud Run samples and documentation

Liability Warning

The contents of this repository (documents and examples) are provided “as-is” with no warrantee implied or otherwise about the accuracy or functionality of the examples.

You use them at your own risk. If anything results to your machine or environment or anything else as a result of ignoring this warning, then the fault is yours only and has nothing to do with me.

About

This repository provides various example applications which can be deployed to GCP Cloud Run.

License:Apache License 2.0