How aqibkhan-qa/vsphere-8-lab-deployment works
Project Type and Purpose
• This is an automation tool (PowerShell/PowerCLI script) for deploying a nested vSphere 8.x and vSAN lab in an existing vCenter environment.
• The script (vsphere-vsan-8-lab-deployment.ps1) uses a user‐supplied configuration file (sample-my-config.ps1) to drive the provisioning of a VCSA appliance and multiple nested ESXi VMs, set up networking, vSAN, and wrap them in a vApp.
File Structure Analysis
• Top‐level files:
• vsphere-vsan-8-lab-deployment.ps1 — main deployment script
• sample-my-config.ps1 — example environment/configuration file
• README.md — documentation and architecture overview
• screenshots/ — reference deployment state visuals
• No frontend/backend split—this is a single‐module CLI‐driven automation tool.
• No build or packaging subdirectories—execution is ad hoc via PowerShell Core with PowerCLI modules installed.
Extracted Architectural Insights from README
• The script communicates over the vSphere API to vCenter Server.
• It requires local access to the VCSA installer files & Nested ESXi OVA templates.
• It provisions:
• VCSA Appliance (via CLI installer)
• N nested ESXi VMs (OVA import + customization)
• Network configuration (port groups, IPs)
• vSAN cluster configuration
• Packaging of all workloads into a vApp
• Logging is written locally (vsphere-vsan-8-lab-deployment.log).
Main Components
a. User Workstation (PowerShell Core + PowerCLI)
b. Configuration Source (sample-my-config.ps1)
c. Deployment Script (vsphere-vsan-8-lab-deployment.ps1)
d. vCenter Server (API endpoint)
e. vSphere Infrastructure:
• Datacenter & Cluster
• vSAN datastore
• VM Network / Portgroups
f. Artifacts/Inputs:
• VCSA Installer directory
• Nested ESXi OVA template
g. Outputs:
• Deployed VCSA VM
• Nested ESXi VMs (3+)
• vApp container
• Log file
Relationships and Interactions
• The User Workstation loads the Configuration Source and invokes the Deployment Script.
• The Script reads variables (credentials, IPs, resources, file paths).
• The Script connects to vCenter Server over PowerCLI (HTTPS).
• It uploads/deploys the VCSA installer, runs CLI-based deployment.
• It imports the Nested ESXi OVA(s), applies custom CPU/Memory/Disk/Network settings.
• It creates/configures the Datacenter, Cluster, vDS, Portgroups, and vSAN cluster.
• It groups all deployed VMs into a vApp.
• Throughout, it writes verbose logs locally.
Architectural Patterns & Design Principles
• Infrastructure-as-Code / Declarative Configuration: all variables are externalized.
• Single orchestration module driving multiple steps (no microservices).
• Clear separation of “what” (config file) vs. “how” (script).
• Idempotent operations where possible (re-running script picks up from state).
Technologies, Frameworks, Libraries
• PowerShell Core
• PowerCLI 12.1 Core modules
• VMware vSphere API (SOAP/REST under the hood)
• VCSA CLI installer