This PowerShell automation script is designed to streamline the deployment of a single-node vSphere Supervisor in VMware Cloud Foundation (VCF) 9.x environments. It automates critical steps from initial setup to the creation of the supervisor, including network configuration and content library verification. The script leverages VCF.PowerCLI cmdlets and relies on pre-configured JSON input files (infrastructure.json and supervisor.json) to tailor the deployment to your environment. Additionally, it addresses the prerequisites for integrating Argo CD operator services and ensures the necessary CLI tools are available for a comprehensive, end-to-end automated solution.
- VCF 9.x Environment: A VCF 9.x environment running with a vCenter instance must be available
- Supervisor Version: 9.0.0.0100-24845085 or later
- Host Preparation: The host is already prepped with ESX and has appropriate network setup
- Network Connectivity: ESX and vCenter network connectivity is established
- Provisioning Access: Connectivity must be available from the Provisioning host to Supervisor Management Network
- Datacenter Setup: Datacenter defined in
infrastructure.jsonmust already be created and ESX image already populated in the vLCM depot - PowerShell: Version 7.0 or later installed on your system. If not, download and install it from the official Microsoft website
- kubectl: Installed on your system. kubectl can be downloaded from upstream at: https://kubernetes.io/docs/tasks/tools/
This automation script will cover the following key functions:
-
Cluster Creation and Host Addition: It will create a new cluster in vCenter and add the specified host to this cluster
-
Cluster Configuration:
- Distributed Resource Scheduler (DRS) will be set to Automatic
- High Availability (HA) admission control will be disabled
-
Creation of VDS and related port groups: A vSphere Distributed Switch (VDS) will be created, along with necessary port groups for edge application and services
-
Datastore Configuration:
- VMFS datastore will be configured based on available disk
- Local storage only, no external storage
-
Storage Policy for Edge Datastore: A storage policy will be created specifically for the Edge Datastore
-
vSphere Supervisor Enablement: The vSphere Supervisor feature will be enabled on the newly configured cluster
-
Supervisor Services: VM Operator service, VKS Kubernetes Service, Velero backup and restore service, Argo CD Operator Service
-
Argo CD Instance Creation: An instance of Argo CD will be created and configured for use
Install the required PowerCLI module for VCF.
Download the provided zip file. The downloaded file has the following structure:
OneNodeDeployment.ps1is the main launcher file1.0.1-24896502.ymlis the ArgoCD Operator YAML file supplied by Broadcom- Neither file requires any modifications for a standard one node deployment
infrastructure.json,supervisor.jsonandargocd-deployment.ymlare parameter templates that require updating to align with your edge environmentinfrastructure.jsoncontains vSphere configuration detailssupervisor.jsoncontains Supervisor networking, availability and sizing parametersargocd-deployment.ymlis the ArgoCD instance YAML that defines ArgoCD resource deployment
Open argocd-deployment.yml and populate the fields with the details required to run ArgoCD instances to manage your edge application. Follow ArgoCD Instance configuration details in the provided documentation as reference.
Open infrastructure.json and review all the fields, updating as required for your environment using the table in Admin.Guide.Single.Node.Supervisor.rtf reference. Accuracy here is crucial for successful deployment.
Open supervisor.json and review all the fields, updating as required for your environment using the table in Admin.Guide.Single.Node.Supervisor.rtf as reference.
Download the necessary YAML file for Argo CD operator creation by following the instructions in the provided documentation.
- Follow the installation guide at the official VMware documentation site
- Important: After installation, rename file
vcf.exeon Windows orvcfon MacOS or Linux
Execute the automation script to configure the edge cluster:
PS > OneNodeDeployment.ps1 -infrastructureJson /path/to/infrastructure.json -supervisorJson /path/to/supervisor.json-
Network Configuration: The automation currently creates a supervisor with four networks: one for management, one for workload, and two for load balancer. The
infrastructure.jsonfile expects four VLAN IDs for the virtual distributed switch section accordingly. While there are options to reduce network usage by reusing resource pools, this script adheres to the four-network design as per the linked design documents. -
CLI Plugin Availability: For a fully automated end-to-end process, it is required that VCF-CLI and KUBECTL are available on your testbed before running this script. Refer to step 7 for VCF CLI installation. Kubectl can be downloaded from upstream at: https://kubernetes.io/docs/tasks/tools/
-
Supported Environment: This script has been tested and validated on the Mac and Windows platforms. Ensure your execution environment matches this specification for optimal performance and compatibility.