Automating ESXi Host Lifecycle Management

Everpure Cloud Dedicated for Azure

Audience
Public
Source Type
Documentation

An important component of any AVS deployment centers around ESXi host lifecycle management. A given AVS host will be replaced automatically if it encounters a hardware failure or undergoes a planned ESXi version upgrade. Furthermore, AVS administrators have the ability to scale up or scale down an existing AVS cluster or create a net new AVS cluster inside of an existing AVS instance. Once the AVS host population is updated for whatever reason, the Build-PCBSCluster command needs to be executed against the cluster so that the software iSCSI adapter can be enabled and Everpure Cloud Dedicated array can be updated with the appropriate host IQNs.

AVS host lifecycle management can be completely automated by leveraging the Deploy-PCBSMonitor PowerShell function. This function utilizes native Azure components to poll a specific AVS cluster (or a set of clusters inside of the same AVS instance) and when it detects a host-level change, it will automatically kick off the Build-PCBSCluster command to update AVS and Everpure Cloud Dedicated to the latest configuration. This command will create a new Azure Resource Group and populate it with the various components shown in the below screenshot. This command only deploys the monitoring infrastructure itself. Upon successful deployment, the Add-PCBSAVSMonitorArray command shown below is utilized to add one or more Everpure Cloud Dedicated arrays for monitoring.

Note that some command arguments shown below, such as -ClusterName are case-sensitive.

Function name: Deploy-PCBSAVSMonitor

Function action: This function deploys a new Azure Resource Group that contains all of the components needed to poll an AVS instance for automated AVS host lifecycle management.

Invoked when: This is deployed once per AVS instance. It will poll for updates to any AVS cluster inside of the AVS instance so long as the cluster has had the build-pcbscluster Build-PCBSClustercommand executed against it previously.

Example:

Deploy-PCBSAVSMonitor -AVSCloudName "my-avs" -AVSResourceGroup "avs-resourcegroup" -MonitorResourceGroup "NewResourceGroup" -MonitorResourceGroupRegion "westus2" -vNetName "avs-vnet" -VNetResourceGroup "vnet-resourcegroup" -vNEtSubnetAddress "192.168.10.0/29" 

The Deploy-PCBSAVSMonitor command requires a few important arguments for deployment. Those arguments specific usage are expanded upon below:

AVSCloudName: This is the AVS SDDC name as it appears in the Azure Portal.

AVSResourceGroup: This is the Azure Resource Group that AVS has been deployed into.

MonitorResourceGroup: This is the name for the new Azure Resource Group that will be created for the AVS polling Azure components.

MonitorResourceGroupRegion: This is the region that the Azure Monitor Resource Group and its components will be deployed into. It is recommended that this region is the same region as the AVS instance.

VNETName: This is the name of the Azure VNET that Everpure Cloud Dedicated is utilizing and that AVS has an ExpressRoute connection with.

VNETResourceGroup: This is the Resource Group that contains the Azure VNET that Everpure Cloud Dedicated is utilizing and that AVS has an ExpressRoute connection with.

VNETSubnetAddress: This is a net new CIDR block that the Azure polling function will utilize. It must be an unutilized part of the IP address space of the Azure VNET that Everpure Cloud Dedicated is utilizing. The subnet only requires a few IP addresses, the minimum size for this function subnet is /29 network block which should be enough in most cases.

MonitorIntervalinMinute: The user can optionally specify what polling interval that want the monitoring function to query their AVS instance for changes between 10 and 60 minutes. The default value is 10 minutes if left blank.

The specific function of each component for the polling function is broken out in the below screenshot:

  1. App Service Plan: An App Service plan defines a set of compute resources for a web app or Azure Function to run. For this use case, the App Service Plan it used for the Azure Function App. The App Service Plan utilizes the economical B1 App Service plan SKU, which normally costs around $50 USD per month.
  2. Application Insights: This Azure component collects metrics and telemetry data about the Azure function app, and is used for troubleshooting should any issues arise. Furthermore, it provides live metrics and availability and usage metrics for the Function App and App Service plan.
  3. Function App: This Azure function polls the AVS vCenter instance for host changes over a user-specified interval of time. If no interval is specified, then it defaults to polling the AVS vCenter every ten minutes. If a host change is detected inside of a cluster initialized to use AVS with Everpure Cloud Dedicated, the Build-PCBSCluster run command is executed via the FunctionApp so that the updated host makeup of the cluster can be used with Pure Storage Cloud Dedicated.
  4. Key Vault: This stores Everpure Cloud Dedicated array credentials that are registered against the polling infrastructure.
  5. Storage Account: The storage account is used to store Azure monitor logs that are utilized by the Application Insights component.

    Once the polling infrastructure has been created, there are additional PowerShell commands that can be executed against it. Notably, if there are multiple Everpure Cloud Dedicated arrays attached to a single AVS instance, those arrays can also be added to the polling infrastructure so that AVS host updates can occur across all Everpure Cloud Dedicated arrays attached to the AVS instance.

    Function Name

    Function Action

    Invoked When

    Example

    Add-PCBSAVSMonitorArray

    Adds an additional Everpure Cloud Dedicated instance to an existing polling infrastructure for AVS.

    An additional Everpure Cloud Dedicated instance or instances are to be used with an AVS deployment.

    
    Add-PCBSAVSMonitorArray -MonitorResourceGroup myMonitorGroup -PureCloudBlockStoreEndpoint myArray -PureCloudBlockStoreCredential (Get-Credential)

    Get-PCBSAVSMonitorArray

    Lists the Everpure Cloud Dedicated arrays that are registered against an AVS polling infrastructure.

    You want to know what Everpure Cloud Dedicated arrays are or are not currently registered against an AVS monitoring instance.

    
    Get-PCBSAVSMonitorArray -MonitorResourceGroup myMonitor
    Get-PCBSAVSMonitor Provides information about the Host Monitor Resource Group including VNET CIDR block. You want to see deployment information about your Host Monitor Resource Group.
    Get-PCBSAVSMonitor -MonitorResourceGroup myMonitor

    Remove-PCBSAVSMonitorArray

    Removes an Everpure Cloud Dedicated array from an AVS monitoring instance.

    An Everpure Cloud Dedicated array needs to be removed from the AVS polling infrastructure. If executed, no further AVS host changes will be updated on the Everpure Cloud Dedicated array specified.

    
    Remove-PCBSAVSMonitorArray -MonitorResourceGroup myMonitorGroup -PureCloudBlockStoreEndpoint myArray
    

    Remove-PCBSAVSMonitor

    Removes the resource group that contains the AVS polling infrastructure.

    The polling infrastructure Azure Resource Group that contains all of the components for automatic lifecycle management for AVS hosts needs to be removed.

    
    Remove-PCBSAVSMonitor -MonitorResourceGroup "myAVSMonitorResourceGroup"