What’s new / coming to Google Cloud Run?

At Google Cloud Next ’20, Cloud Run Product Manager Steren Giannini (@steren) walked us through some of the new things that are coming to Google Cloud Run. Some highlights: VPC Peering Gradual Rollouts (with custom URLs per tagged release) New Load-Balancing Features (Multi Region, Cloud CDN, IAP) Easy Continuous Deployment Min instances (no cold starts) […]

Going Serverless with Google Cloud Run (JSConf.be)

Back in June I was invited to speak at JSConf.be. This year’s edition focused on DevSecOps and Security. My talk “Going Serverless with Google Cloud Run” — which I have brought forward before at Full Stack Ghent and PHP-WVL — was a perfect match for it. Cloud Run is a fully managed compute platform by […]

Speed up your Docker builds in Google Cloud Build with Kaniko Cache

When building Docker images locally it will leverage its build cache: When building an image, Docker steps through the instructions in your Dockerfile, executing each in the order specified. As each instruction is examined, Docker looks for an existing image in its cache that it can reuse, rather than creating a new (duplicate) image. Therefore […]

Going Serverless with Google Cloud Run

Recently I was invited as a speaker to Full Stack Ghent and PHP-WVL. At both events I brought a new talk called “Going Serverless with Google Cloud Run”. Cloud Run is a fully managed compute platform by Google that automatically scales stateless containers. By abstracting away all infrastructure management, us developers can focus on what […]

Delete untagged image refs in Google Container Registry, as a service, with gcr-cleaner

GCR Cleaner deletes untagged images in Google Container Registry. This can help reduce costs and keep your container images list in order. GCR Cleaner is designed to be deployed as a Cloud Run service and invoked periodically via Cloud Scheduler. Clever! All commands to install this one are provided. gcr-cleaner →

google/cloud-functions-framework – Google Cloud Functions Framework for PHP

google/cloud-functions-framework is an open source FaaS (Function as a Service) Framework for writing portable PHP functions. An example function looks like this: <?php use Symfony\Component\HttpFoundation\Request; function helloHttp(Request $request) { return "Hello World from PHP HTTP function!" . PHP_EOL; } One can invoke it locally by executing the included router as follows: export FUNCTION_TARGET=helloHttp export FUNCTION_SIGNATURE_TYPE=http […]

Cloud Run vs App Engine: What’s the difference?

Simple and to the point article, with a few commands included, by Dirk Hoekstra: In a nutshell, you give Google’s Cloud Run a Docker container containing a webserver. Google will run this container and create an HTTP endpoint. With Google’s App Engine however you tell Google how your app should be run. The App Engine […]

Running the same Node.js code on Google Cloud Functions, App Engine, and Cloud Run

Google Cloud has a number of options to run your code. We can deploy a function to Cloud Functions, an app to App Engine, or an app with a custom runtime (a Docker container) to Cloud Run. In this post the same code snippet is deployed to all three Google Cloud Platform features. Locally the […]

Building a Website Screenshot API with Puppeteer and Google Cloud Functions

Here’s the source of a Google Cloud function that, using Puppeteer, takes a screenshot of a given website and store the resulting screenshot in a bucket on Google Cloud Storage: const puppeteer = require('puppeteer'); const { Storage } = require('@google-cloud/storage'); const GOOGLE_CLOUD_PROJECT_ID = "screenshotapi"; const BUCKET_NAME = "screenshot-api-net"; exports.run = async (req, res) => { […]

Today I Learned, the Google Cloud Platform / Terraform Edition

🌍 This week I’ve been goofing around with Google Cloud Platform and Terraform to manage it. I’ve learned quite a few things, that might be of help to others, so here goes … There’s a difference between IAM policy for service account (google_service_account_iam) and IAM policy for projects (google_project_iam_member). The former is used to allow […]