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

Cloud Run CI/CD + QA @ KAUCHE

Yuki Ito
February 11, 2023

Cloud Run CI/CD + QA @ KAUCHE

Yuki Ito

February 11, 2023
Tweet

More Decks by Yuki Ito

Other Decks in Technology

Transcript

  1. What is Cloud Run Cloud Run is a managed compute

    platform that enables you to run containers that are invocable via requests or events. Cloud Run is serverless: it abstracts away all infrastructure management... https://cloud.google.com/run/docs
  2. CI / CD Applications Deploy Manifests Cloud Build Cloud Run

    Cloud Build Artifact Registry ᶃ Trigger ᶄ Push Image ᶅ Trigger ᶆ Fetch ᶇ Deploy ᶈ Pull Image
  3. CI / CD Applications Deploy Manifests Cloud Build Cloud Run

    Cloud Build Artifact Registry ᶃ Trigger ᶄ Push Image ᶅ Trigger ᶆ Fetch ᶇ Deploy ᶈ Pull Image
  4. CI / CD Applications Deploy Manifests Cloud Build Cloud Run

    Cloud Build Artifact Registry ᶃ Trigger ᶄ Push Image ᶅ Trigger ᶆ Fetch ᶇ Deploy ᶈ Pull Image
  5. CI / CD Applications Deploy Manifests Cloud Build Cloud Run

    Cloud Build Artifact Registry ᶃ Trigger ᶄ Push Image ᶅ Trigger ᶆ Fetch ᶇ Deploy ᶈ Pull Image
  6. CI / CD Applications Deploy Manifests Cloud Build Cloud Run

    Cloud Build Artifact Registry ᶃ Trigger ᶄ Push Image ᶅ Trigger ᶆ Fetch ᶇ Deploy ᶈ Pull Image
  7. CI / CD Applications Deploy Manifests Cloud Build Cloud Run

    Cloud Build Artifact Registry ᶃ Trigger ᶄ Push Image ᶅ Trigger ᶆ Fetch ᶇ Deploy ᶈ Pull Image
  8. Declarative Manifest apiVersion: serving.knative.dev/v1 kind: Service metadata: annotations: run.googleapis.com/ingress: internal

    run.googleapis.com/launch-stage: BETA labels: cloud.googleapis.com/location: ... name: ... spec: template: metadata: annotations: run.googleapis.com/execution-environment: gen2 run.googleapis.com/startup-cpu-boost: "true" run.googleapis.com/vpc-access-connector: projects/.../locations/.../connectors/... run.googleapis.com/vpc-access-egress: all-traffic # ... spec: containers: # ... serviceAccountName: ...
  9. kustomize . ├── base │ ├── kustomization.yaml │ └── service.yaml

    ├── dev │ ├── kustomization.yaml │ ├── resource.yaml │ └── service.yaml └── prod ├── kustomization.yaml ├── resource.yaml └── service.yaml
  10. CI / CD Applications Deploy Manifests Cloud Build Cloud Run

    Cloud Build Artifact Registry ᶃ Trigger ᶄ Push Image ᶅ Trigger ᶆ Fetch ᶇ Deploy ᶈ Pull Image
  11. Deploy Service per Branch Applications Deploy Manifests Cloud Build Cloud

    Run Cloud Build Artifact Registry ᶃ Trigger ᶄ Push Image ᶅ Trigger ᶆ Fetch ᶇ Deploy ᶈ Pull Image
  12. Deploy Service per Branch 🧑💻 Cloud Run Services Service-1-Branch-A Service-1-Branch-B

    Service-1 Service-2-Branch-X Service-2-Branch-Y Service-2 Gateway
  13. Deploy Service per Branch 🧑💻 Cloud Run Services Service-1-Branch-A Service-1-Branch-B

    Service-1 Service-2-Branch-X Service-2-Branch-Y Service-2 Gateway cloud-run-service-1: branch-b cloud-run-service-2: branch-x
  14. Deploy Service per Branch 🧑💻 Cloud Run Services Service-1-Branch-A Service-1-Branch-B

    Service-1 Service-2-Branch-X Service-2-Branch-Y Service-2 Gateway cloud-run-service-1: branch-b cloud-run-service-2: branch-x
  15. xDS Control Plane for Cloud Run xDS Control Plane Service-1-Branch-A

    Service-1-Branch-B Service-1 Service-X Service Routing Information [default] → Service-1 [cloud-run-service-1: branch-a] → Service-1-Branch-A [cloud-run-service-1: branch-b] → Service-1-Branch-B Service Discovery
  16. x Discovery Service API •Listener Discovery Service •Route Discovery Service

    •Cluster Discovery Service •Endpoint Discovery Service
  17. xDS Control Plane for Cloud Run xDS Control Plane Service-1-Branch-A

    Service-1-Branch-B Service-1 Service-X Service Routing Information [default] → Service-1 [cloud-run-service-1: branch-a] → Service-1-Branch-A [cloud-run-service-1: branch-b] → Service-1-Branch-B Service Discovery
  18. Deploy Service per Branch 🧑💻 Cloud Run Services Service-1-Branch-A Service-1-Branch-B

    Service-1 Service-2-Branch-X Service-2-Branch-Y Service-2 Gateway cloud-run-service-1: branch-b cloud-run-service-2: branch-x