Update an application template and redeploy

This quickstart helps you modify the three tier web application by connecting a Memorystore for Redis component. This application update helps you cache data and improve performance.

A three tier web application in the design canvas with a Memorystore for Redis
component. The application includes frontend, backend, database, and cache
components.

You update the template by using the design canvas in Application Design Center. The changes you make are reflected in the application's Terraform code, which you can review before you deploy. For more information, see Overview of Terraform on Google Cloud.

After you update the template, deploy your application to verify your changes.

Before you begin

Complete the Create and verify a template quickstart.

Add a component

  1. In the Google Cloud console, go to the Templates page.

    Go to Templates

  2. Click the quickstart-three-tier-web-app template.

  3. In the design canvas, from the cloud-run-2 component, click Add and select Memorystore for Redis.

Your template now contains four components. Lines are displayed between components to represent connections.

Update the application draft

  1. From the design canvas, click Configure an app.

  2. Click Quickstart three tier test.

  3. Click Save.

The application draft is updated with the new template.

Configure the new component

  1. In the design canvas, click memorystore-1 and do the following in the Configuration area:

    1. From the Project ID list, select the descendant project you created in Create and verify a template.

    2. From the Zone list, select us-central1-a.

    3. In the Name field, enter cache-redis.

    4. Click Save.

Green check marks are displayed in each component to convey that you have specified the required parameters. The application draft is ready to be redeployed to the TEST environment for verification.

Redeploy the application

  1. Click Deploy.

  2. In the Select a service account area, do the following:

    1. Click Create a new service account.

    2. Click Proceed.

  3. To review the Terraform plan for your application, do the following:

    1. Click Preview. A Terraform plan is generated after a few minutes.

    2. Review the Terraform plan for your application.

    3. Click Copy and close.

    4. Paste the copied Terraform in a document.

  4. Click Deploy.

The application is deployed after a few minutes and resources are created in your project. The following details are displayed:

  • A link to App Hub, where you can view deployed resource details, including links to monitoring dashboards.
  • Links to Cloud Build logs, which you can use to troubleshoot deployment errors.
  • Outputs like service URIs are displayed, which you can use to interact with deployed resources.

Clean up

To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.

Delete the deployed application

  1. From the navigation menu, click Applications.

    Go to Applications

  2. From the table, click Quickstart three tier web app.

  3. Click Actions and select Delete Application.

  4. In the Delete field, enter Quickstart three tier web app.

  5. Click Delete.

The application is deleted, including the following:

  • The application details are removed from Application Design Center.
  • The underlying App Hub application is deleted.
  • The underlying resources are deleted.

Optional: Delete the project

To delete the descendant project you created in the Create and verify a template quickstart, do the following:

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. In the project list, select the project that you want to delete, and then click Delete.
  3. At the prompt, type the project ID, and then click Shut down.

What's next