Overview of Google Cloud Deploy

Google Cloud Deploy is a managed service that automates delivery of your applications to a series of target environments in a defined promotion sequence. When you want to deploy your updated application, you create a release, whose lifecycle is managed by a delivery pipeline.

About Skaffold and Google Cloud Deploy

Google Cloud Deploy uses Skaffold to separate rendering tools from the delivery pipeline. This makes manifest rendering more flexible without affecting how you define your delivery pipeline. You can use Skaffold to easily configure a local development workspace to use with Google Cloud Deploy's continuous delivery pipelines.

See the Skaffold Quickstart to learn the basics.

How a Google Cloud Deploy pipeline works

The Google Cloud Deploy delivery pipeline contains the following information:

  • A name, which you use when referring to the delivery pipeline.

  • The promotion sequence, describing the order in which to deploy to the targets.

  • The targets themselves. They can be defined in the same delivery pipeline configuration file, or in separate files.

The Google Cloud Deploy delivery process

The following is a description of what happens in a simple Google Cloud Deploy continuous delivery scenario.

  1. You define render and deploy steps using Skaffold.

    Google Cloud Deploy requires a skaffold.yaml configuration file that defines these steps.

  2. You define your delivery pipeline in another YAML file.

    This configuration file defines the promotion sequence in which to deploy your application to a series of targets.

  3. You define those targets, either in the pipeline configuration file or in a separate file or files.

  4. You register your pipeline with the Google Cloud Deploy service.

    Now that the service knows about your application, it manages the deployment to targets according to your defined promotion sequence.

  5. The output of your CI process includes a call to Google Cloud Deploy to initiate your delivery pipeline.

    This call creates a release resource, representing the rendered manifest for each target, each of which is generated using the provided rendering source, skaffold.yaml, and references to specific container images to deploy. For this first call to create a release, Google Cloud Deploy automatically creates a rollout resource, which associates the release with the first target environment. Based on that rollout, your application is deployed to the first target.

    You can use any CI tool as long as it outputs one or more container images to provide to your Google Cloud Deploy delivery pipeline.

    Furthermore, the call to create a release and invoke a delivery pipeline doesn't have to come from the CI tool. It can come from a script or any system responding to completion of the CI process.

  6. When you're ready to deploy your application to the next target, you call Google Cloud Deploy to promote it.

    In each case, the call to invoke the promotion causes Google Cloud Deploy to create a new rollout.

  7. Promotion continues through all targets in your promotion sequence, the last of which is prod (or whatever name you use for your final target to put the application into production).

    The process of release creation and promotion is described in more detail in Google Cloud Deploy service architecture.

Throughout pipeline execution, Google Cloud Deploy collects metrics and audit details.

Promotion

To promote a release is to deploy it to the next target in the promotion sequence defined in your pipeline. The first call to Google Cloud Deploy creates a release, then a rollout resource that's used to deploy to the first target in the promotion sequence. Each subsequent call to promote the release results in a rollout to the next target.

Approvals

You can specify that an approval is needed for promotion to any target. For example, you might want to require approval for promotion into a production target. To require approval for a target, set the requireApproval property in the target definition.

When a target requires approval, Google Cloud Deploy generates a Pub/Sub message that can be consumed by an integrated system (such as a ticketing system) subscribing to that message.

See Managing your delivery pipeline for more information on requiring approvals and approving promotions.

Notifications

Google Cloud Deploy provides Pub/Sub notifications for the following events:

  • Render: start, success, and failure
  • Deploy: start, success, and failure
  • Approval required
  • Approval approved
  • Approval rejected

Google Cloud Deploy uses a Pub/Sub topic to send these notifications.

See Using notifications with your pipeline for more details.

Rollbacks

Google Cloud Deploy supports rolling back your deployed application in any target. A rollback in Google Cloud Deploy consists of triggering a rollout against the last successfully deployed release, using the same parameters that were used in that successful deployment.

See Rolling back a deployment for more details.

What's next