Academy/VCAP — VCF Automation (3V0-21.25)/Lab: Build 3-Tier Web App Template with Parameter Validation
This lab targets VCF 9.0

Lab: Build 3-Tier Web App Template with Parameter Validation

VCF 9.0Intermediatevcap-advanced⏱ 120 min

Objectives

  • Create a reusable cloud template for a 3-tier web application (web, app, db) with YAML anchors, parameter validation, and cross-project sharing.

Prerequisites

VCF lab environment deployed and operational

Lab Environment

Standard VCF lab environment for Advanced VCF 9.0 Automation

Tasks

Task 1 Lab: Build 3-Tier Web App Template with Parameter Validation

Create a reusable cloud template for a 3-tier web application (web, app, db) with YAML anchors, parameter validation, and cross-project sharing.

Step 1

In VCF Automation project "Engineering", create new cloud template named "3Tier-Web-App-v2"

Step 2

Define inputs: tier (dev/staging/prod), app_version, db_password (with pattern for complexity)

Step 3

Use YAML anchors to define reusable network and VM specs

Step 4

Create 3 networks (web, app, db) and assign based on tier

Step 5

Provision 2 web servers with load balancer, 2 app servers, 1 DB server

Step 6

Add cloud-init to install and start application services

Step 7

Share template org-wide with read-only access

Step 8

Request from "Production" project and verify inputs are validated

Validation Gate

Check: Verify lab completion

Expected: Lab exercise completed successfully

Common Errors

Hardcoding resource values instead of using input parameters with constraints
Fix: Cloud Templates should use input parameters with constraints (min/max, enum, regex) to enforce T-shirt sizing. Hardcoded values require template edits for each deployment variation. Use: input: cpuCount: type: integer, enum: [2, 4, 8] for controlled sizing.
Not testing template deployment before publishing to catalog
Fix: A template that passes YAML validation may still fail deployment due to: insufficient cluster capacity, incorrect network segment references, or missing storage policies. Always deploy a test instance before publishing.
Missing error handling for dependent resources
Fix: If a template deploys VM + network + security group, and the security group creation fails, the VM and network are created but incomplete. Use dependsOn relationships and validate resource creation order in the template.

Final Validation

Lab completed successfully

✓ All steps completed → No errors observed

Cleanup / Restore

• Revert to snapshot if needed

Design Reflection (VCDX)

Cloud Template design demonstrates consumption architecture skills. VCDX panelists test whether your templates enforce governance (T-shirt sizes, naming conventions) while enabling self-service.

⚠ Known Pitfalls (from Community KB)

Publishing templates without testing — failed catalog items erode user trust.
Using free-form CPU/memory inputs instead of constrained T-shirt sizes — users will request 128 vCPU VMs.
Was this page useful?
Type to search. ↑ ↓ to move, Enter to open, Esc to close.