Deployment and release management

  1. Home
  2. Deployment and release management

Go back to GCP Tutorials

In this tutorial we will learn and understand abot Deployment and release management.

Google Cloud Deployment Manager is an infrastructure deployment service that automates the creation and management of Google Cloud resources. Write flexible template and configuration files and use them to create deployments that have a variety of Google Cloud services, such as Cloud Storage, Compute Engine, and Cloud SQL, configured to work together.

However, to create a resource in the Deployment Manager, you must specify a type. A type can represent a single API resource, known as a base type, or a set of resources, known as a composite type, that will be created as part of your deployment.

For example, to create a Compute Engine VM instance, specify the corresponding base type like so in your configuration:

resources:

name: the-first-vm
type: compute.v1.instance # The type of resource to deploy

Base types and type providers

A base type creates a single primitive resource. For example, Google-owned base types include compute.v1.instance, storage.v1.bucket, and sqladmin.v1beta4.database, all of which are served by the respective Compute Engine V1 API, Cloud Storage V1 API, and the Cloud SQL v1beta4 Admin API.

However, Base types are supported by a RESTful API that supports Create, Read, Update, and Delete (CRUD) operations. You can also create additional base types by adding a type provider if the Google-owned types alone do not meet your needs. Creating a type provider exposes all resources of an API as base types that you can use. To create a type provider, you must supply an API descriptor document. This can be an OpenAPI specification or a Google Discovery, adjust any necessary input mappings for the API. And then, register the type with Deployment Manager. Once created, you and other users with access to your project can use the types provided by the provider.

gcp cloud architect practice tests

Further, when you call a base type in your templates or configurations, you use one of the following syntaxes depending on the type.

For Google-managed base types, use:

type: [API].[VERSION].[RESOURCE]

For Google-managed type providers (beta), use:

type: gcp-types/[PROVIDER]:[RESOURCE]

For base types provided by a type provider, use:

type: [PROJECT_ID]/[TYPE_PROVIDER]:[COLLECTION]

Deleting deployments

When you delete a deployment, all resources that are part of the deployment are also deleted. However, if you want to delete specific resources from your deployment and keep the rest, delete those resources from your configuration file, and update the deployment instead.

Deleting deployments

If you want to delete a deployment, but keep all the underlying resources, you must use the gcloud command-line tool or the API.

  • Firstly, in the Cloud Console, open the Deployments page.
  • Secondly, in the list of deployments, select the checkboxes for the deployments that you want to delete.
  • Lastly, on the top of the page, click Delete.

Select a delete policy

The delete policy you use determines how the resources in the deployment are handled. You can use one of these policies:

  • Firstly, DELETE [Default]: Deletes the underlying resource. This is permanent and cannot be undone.
  • Secondly, ABANDON: This deletes the deployment, but does not delete the underlying resources. For example, if you have a VM instance in the deployment, it will still be available for you to use after the deployment is deleted.
Deployment and release management GCP cloud architect  online course

Reference: Google Documentation

Go back to GCP Tutorials

Menu