Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Use Docker with Cloud Run

Use Docker with Cloud Run

Yevgen Batovskyi

April 08, 2020
Tweet

More Decks by Yevgen Batovskyi

Other Decks in Technology

Transcript

  1. New tag triggers a Release 2 Pass any Pre-Deployment Conditions

    3 Deploy to environment 1 4 Pass any Post-Deployment Conditions Run Process
  2. git clone https://github.com/mfahlandt/gcp-continuous-deployment-node-demo gcloud config get-value project gcloud builds submit

    --tag gcr.io/[PROJECT_ID]/mario-image . gcloud auth configure-docker gcloud beta run deploy demo-app --image gcr.io/[PROJECT_ID]/mario-image --region us-central1 --platform managed --memory 1Gi --allow-unauthenticated --quiet gcloud run services update SERVICE-NAME --update-labels KEY=VALUE go get -v github.com/rakyll/hey hey -n 100 -c 10 URLs Scenario • https://cloud.google.com/profiler/ • https://cloud.google.com/monitoring/ • https://cloud.google.com/logging/
  3. Runs in your GKE cluster Provisioned resources Kubernetes operations Custom

    machine types Hardware accelerators (GPUs) Fully managed, no cluster Pay-per-use Minimal operations Limited instance size Autoscaling Stackdriver UI & CLI Custom URLs TLS Cloud Run Cloud Run on GKE
  4. • Common API and runtime environment for serving workloads •

    Implements learnings from Google and over 50 companies contributing • Portability of experiences, tooling, and workloads between Knative environments - you can even run serverless on-prem https://knative.dev Portability based on kNative • https://deployeveryday.com/2020/03/31/running-knative-locally.html
  5. • stateless • 64bit linux containers • max timeout is

    15 minutes • 4 minutes to first http response timeout • 2GB max RAM (min 256 MB) • 2GB max filesystem size • 32MB max response/request size • 80 concurrent requests • one $PORT supported • min cold start time is near 4 seconds • asia-east1 (Taiwan) • asia-northeast1 (Tokyo) • europe-north1 (Finland) • europe-west1 (Belgium) • europe-west4 (Netherlands) • us-central1 (Iowa) • us-east1 (South Carolina) • us-east4 (Northern Virginia) • us-west1 (Oregon) • https://cloud.google.com/run/docs/issues • https://cloud.google.com/run/docs/release-notes Known limitations
  6. • No servers to manage • Focus on writing code

    • Scale up fast and scale to zero • Control over max instances • All GCP troubleshooting tools • Pay for exact usage • HTTPS URL in seconds • Own domains • Labels support • Terraform support Takeaways • https://cloud.google.com/profiler/ • https://cloud.google.com/monitoring/ • https://cloud.google.com/logging/