Create a pipeline and release in the Google Cloud console

This page shows you how to use the Google Cloud console to create a Cloud Deploy delivery pipeline, and then create a release for that pipeline.

In this quickstart, you'll do the following:

  1. Create two GKE clusters or configure two Cloud Run services.

  2. Create a delivery pipeline and two targets using the Google Cloud console.

  3. Instantiate your delivery pipeline by creating a release using the Google Cloud console.

    After you create this release, the application is automatically deployed to the target.

  4. See the results in Google Cloud console.

Before you begin

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Cloud Deploy, Cloud Build, GKE, Artifact Registry, Cloud Run, and Cloud Storage APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the APIs

  5. Install the Google Cloud CLI.

  6. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  7. To initialize the gcloud CLI, run the following command:

    gcloud init
  8. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  9. Verify that billing is enabled for your Google Cloud project.

  10. Enable the Cloud Deploy, Cloud Build, GKE, Artifact Registry, Cloud Run, and Cloud Storage APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the APIs

  11. Install the Google Cloud CLI.

  12. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  13. To initialize the gcloud CLI, run the following command:

    gcloud init
  14. If you already have the CLI installed, make sure you're running the latest version:

    gcloud components update
    

Create your runtime environment

If you're deploying to Cloud Run, you can skip this command.

For GKE, create two clusters: quickstart-cluster-for-console-staging and quickstart-cluster-for-console-prod, with default settings. The clusters' Kubernetes API endpoints must be network-reachable from the public internet. GKE clusters are externally accessible by default.

gcloud container clusters create-auto quickstart-cluster-for-console-staging \
                 --project=PROJECT_ID \
                 --region=us-central1 && \
gcloud container clusters create-auto quickstart-cluster-for-console-prod \
                 --project=PROJECT_ID \
                 --region=us-central1

Create a delivery pipeline and two targets

You can use Cloud Deploy to create a delivery pipeline and targets based on configuration specified in one or more YAML files. But you can also create a delivery pipeline using the Google Cloud console.

In this section, you use Google Cloud console to create a delivery pipeline and two targets. When you use Google Cloud console, you don't need to create any YAML files; Cloud Deploy creates your skaffold.yaml and manifest for you.

  1. In the Google Cloud console, navigate to the Cloud Deploy main page.

    Open the Delivery pipelines page

  2. Click Create

    Cloud Deploy main page in the Google Cloud console

    The Create a delivery pipeline form is displayed.

  3. In the Pipeline name field, replace the default text with in-console-quickstart-pipeline.

  4. Optionally, enter a description for this delivery pipeline.

  5. In the Region drop-down, select us-central1.

  6. Select your runtime.

    If you're deploying to GKE, select Google Kubernetes Engine. Otherwise, select Cloud Run.

  7. Create your targets: