Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ahmetb/zone-printer

Small web app to print Google Cloud compute region it’s deployed to
https://github.com/ahmetb/zone-printer

cloud-run cloudrun

Last synced: about 1 month ago
JSON representation

Small web app to print Google Cloud compute region it’s deployed to

Awesome Lists containing this project

README

        

# Zone Printer demo application

This web application prints the Google Cloud datacenter it’s running on with
information about where the datacenter is located (city, country and flag).

It's used to demonstrate global load balancing capabilities of Google Cloud
HTTPS Load Balancer, as it routes the request to the compute region closest
to the visitor.

Example:

> ```text
> Welcome from Google Cloud datacenters at:
> The Dalles, Oregon, USA
>
> You are now connected to "us-west1"
> ```

## Deploy to Cloud Run

Clone this application, then build and deploy the image:

```sh
gcloud beta run deploy zone-printer \
--platform=managed --allow-unauthenticated \
--source=.
```

Follow the [Serving traffic from multiple
regions](https://cloud.google.com/run/docs/multiple-regions) tutorial from
Cloud Run documentation to see how you can deploy this application to all
regions and set up a load balancer on top.

If you want to automate further, check out [this Terraform
guide](https://github.com/ahmetb/cloud-run-multi-region-terraform/) for
achieving the same task.

-----

This is not an official Google project.