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.
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
In the Google Cloud console, go to the Templates page.
Click the quickstart-three-tier-web-app template.
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
From the design canvas, click Configure an app.
Click Quickstart three tier test.
Click Save.
The application draft is updated with the new template.
Configure the new component
In the design canvas, click memorystore-1 and do the following in the Configuration area:
From the Project ID list, select the descendant project you created in Create and verify a template.
From the Zone list, select
us-central1-a
.In the Name field, enter
cache-redis
.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
Click Deploy.
In the Select a service account area, do the following:
Click Create a new service account.
Click Proceed.
To review the Terraform plan for your application, do the following:
Click Preview. A Terraform plan is generated after a few minutes.
Review the Terraform plan for your application.
Click Copy and close.
Paste the copied Terraform in a document.
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
From the navigation menu, click Applications.
From the table, click Quickstart three tier web app.
Click
Actions and select Delete Application.In the Delete field, enter
Quickstart three tier web app
.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:
- In the Google Cloud console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- At the prompt, type the project ID, and then click Shut down.