Skip to content

Commit

Permalink
feat: update hrm for new appliance (#701)
Browse files Browse the repository at this point in the history
- Enhanced `Export-HrmJsonSpec` cmdlet to consume the latest appliance for the virtual host machine.

Signed-off-by: Gary Blake <gblake@vmware.com>
  • Loading branch information
GaryJBlake authored Jul 23, 2024
1 parent 951e409 commit 08689ca
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
- Enhanced `Install-vRLIContentPack` cmdlet to compress the and stream the content pack JSON payload to VMware Aria Operations for Logs.
- Enhanced all `Export-***JsonSpec` cmdlets to check for 'N/A', 'n/a' and '#VALUE' values extracted from the Planning and Preparation Workbook and warn.
- Enhanced `Test-PcaPrerequisite` cmdlet to verify the Aria Automation to NSX service account is created.
- Enhanced `Export-HrmJsonSpec` cmdlet to consume the latest appliance for the virtual host machine.
- Converted `aria-operations-notifications-vcf.csv` to `aria-operations-notifications-vcf.json`.
- Converted `aria-operations-notifications-srm.csv` to `aria-operations-notifications-srm.json`.

Expand Down
2 changes: 1 addition & 1 deletion PowerValidatedSolutions.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'PowerValidatedSolutions.psm1'

# Version number of this module.
ModuleVersion = '2.11.0.1056'
ModuleVersion = '2.11.0.1057'

# ID used to uniquely identify this module
GUID = 'a6dfed7b-65d2-4da2-bdcc-7f3d3df9b75d'
Expand Down
23 changes: 9 additions & 14 deletions PowerValidatedSolutions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -26566,8 +26566,8 @@ Function Export-HrmJsonSpec {
'dns' = ($pnpWorkbook.Workbook.Names["region_dns1_ip"].Value + " " + $pnpWorkbook.Workbook.Names["region_dns2_ip"].Value)
'searchDomain' = $pnpWorkbook.Workbook.Names["child_dns_zone"].Value
'ntp' = $pnpWorkbook.Workbook.Names["region_ntp1_server"].Value
'rootPassword' = $pnpWorkbook.Workbook.Names["hrm_vm_root_password"].Value
'ova' = "vvs_appliance_v0.0.1.ova"
'adminPassword' = $pnpWorkbook.Workbook.Names["hrm_vm_root_password"].Value
'ova' = "vvs-appliance-0.1.0.ova"
'stretchedCluster' = $pnpWorkbook.Workbook.Names["mgmt_stretched_cluster_chosen"].Value
'domainFqdn' = $pnpWorkbook.Workbook.Names["region_ad_child_fqdn"].Value
'domainBindUser' = $pnpWorkbook.Workbook.Names["child_svc_vsphere_ad_user"].Value
Expand Down Expand Up @@ -26704,7 +26704,7 @@ Function Invoke-HrmDeployment {

if (!$failureDetected) {
Show-PowerValidatedSolutionsOutput -message "Deploying the Host Virtual Machine for $solutionName"
$StatusMsg = Deploy-PhotonAppliance -server $jsonInput.sddcManagerFqdn -user $jsonInput.sddcManagerUser -pass $jsonInput.sddcManagerPass -sddcDomain $jsonInput.mgmtSddcDomainName -domain $jsonInput.searchDomain -hostname $jsonInput.vmName -ipAddress $jsonInput.ipAddress -netmask $jsonInput.netmask -gateway $jsonInput.gateway -dnsServer $jsonInput.dns -ntpServer $jsonInput.ntp -rootPassword $jsonInput.rootPassword -enableSsh True -enableDebug False -folder $jsonInput.vmFolder -ovaPath ($binaries + $jsonInput.ova) -WarningAction SilentlyContinue -ErrorAction SilentlyContinue -WarningVariable WarnMsg -ErrorVariable ErrorMsg
$StatusMsg = Deploy-PhotonAppliance -server $jsonInput.sddcManagerFqdn -user $jsonInput.sddcManagerUser -pass $jsonInput.sddcManagerPass -sddcDomain $jsonInput.mgmtSddcDomainName -domain $jsonInput.searchDomain -hostname $jsonInput.vmName -ipAddress $jsonInput.ipAddress -netmask $jsonInput.netmask -gateway $jsonInput.gateway -dnsServer $jsonInput.dns -ntpServer $jsonInput.ntp -adminPassword $jsonInput.adminPassword -enableSsh True -folder $jsonInput.vmFolder -ovaPath ($binaries + $jsonInput.ova) -WarningAction SilentlyContinue -ErrorAction SilentlyContinue -WarningVariable WarnMsg -ErrorVariable ErrorMsg
messageHandler -statusMessage $StatusMsg -warningMessage $WarnMsg -errorMessage $ErrorMsg; if ($ErrorMsg) { $failureDetected = $true }
}

Expand Down Expand Up @@ -26846,7 +26846,7 @@ Function Deploy-PhotonAppliance {
- Deploys the Photon Appliance into a vSphere Cluster

.EXAMPLE
Deploy-PhotonAppliance -server sfo-vcf01.sfo.rainpole.io -user administrator@vsphere.local -pass VMw@re1! -sddcDomain sfo-m01 -hostname sfo-m01-hrm01 -ipAddress 172.18.95.50 -netmask "24 (255.255.255.0)" -gateway 172.18.95.1 -domain sfo.rainpole.io -dnsServer "172.18.95.4 172.18.95.5" -ntpServer ntp.sfo.rainpole.io -rootPassword VMw@re1! -enableSsh True -enableDebug False -folder sfo-m01-fd-hrm -ovaPath .\vvs_appliance_v0.0.1.ova
Deploy-PhotonAppliance -server sfo-vcf01.sfo.rainpole.io -user administrator@vsphere.local -pass VMw@re1! -sddcDomain sfo-m01 -hostname sfo-m01-hrm01 -ipAddress 172.18.95.50 -netmask "24 (255.255.255.0)" -gateway 172.18.95.1 -domain sfo.rainpole.io -dnsServer "172.18.95.4 172.18.95.5" -ntpServer ntp.sfo.rainpole.io -adminPassword VMw@re1! -enableSsh True -folder sfo-m01-fd-hrm -ovaPath .\vvs-appliance-v0.1.0.ova
This example deploys the Photon appliance named sfo-m01-hrm01.

.PARAMETER server
Expand Down Expand Up @@ -26882,15 +26882,12 @@ Function Deploy-PhotonAppliance {
.PARAMETER ntpServer
The NTP servers for the Photon appliance.

.PARAMETER rootPassword
The root password for the Photon appliance.
.PARAMETER adminPassword
The admin password for the Photon appliance.

.PARAMETER enableSsh
Enable SSH on the Photon appliance.

.PARAMETER enableDebug
Enable debug mode on the Photon appliance.

.PARAMETER folder
The virtual machine folder to place the Photon appliance in.

Expand All @@ -26910,9 +26907,8 @@ Function Deploy-PhotonAppliance {
[Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$gateway,
[Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$dnsServer,
[Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$ntpServer,
[Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$rootPassword,
[Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$adminPassword,
[Parameter (Mandatory = $true)] [ValidateSet('True', 'False')] [String]$enableSsh,
[Parameter (Mandatory = $true)] [ValidateSet('True', 'False')] [String]$enableDebug,
[Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$folder,
[Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$ovaPath
)
Expand Down Expand Up @@ -26940,10 +26936,9 @@ Function Deploy-PhotonAppliance {
$ovfConfiguration.Common.guestinfo.dns.Value = $dnsServer
$ovfConfiguration.Common.guestinfo.domain.Value = $domain
$ovfConfiguration.Common.guestinfo.ntp.Value = $ntpServer
$ovfConfiguration.Common.guestinfo.root_password.Value = $rootPassword
$ovfConfiguration.Common.guestinfo.admin_password.Value = $adminPassword
$ovfConfiguration.Common.guestinfo.enable_ssh.Value = $enableSsh
$ovfConfiguration.Common.guestinfo.debug.Value = $enableDebug
$ovfConfiguration.NetworkMapping.DHCP.Value = $portgroup
$ovfConfiguration.NetworkMapping.VM_Network.Value = $portgroup
Import-vApp -Source $ovaPath -OvfConfiguration $ovfConfiguration -Name $hostname -VMHost (Get-VMHost -Server $vcfVcenterDetails.fqdn).Name[-1] -Location $cluster -InventoryLocation $folder -Datastore $datastore -DiskStorageFormat Thin -Server $vcfVcenterDetails.fqdn -Confirm:$false -Force | Out-Null
if (Get-VM -Name $hostname -Server ($vcfVcenterDetails.fqdn).Name -ErrorAction Ignore) {
Start-VM -VM $hostname -Server ($vcfVcenterDetails.fqdn).Name | Out-Null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Deploy a Photon appliance.
## Syntax

```powershell
Deploy-PhotonAppliance [-server] <String> [-user] <String> [-pass] <String> [-sddcDomain] <String> [-hostname] <String> [-domain] <String> [-ipAddress] <String> [-netmask] <String> [-gateway] <String> [-dnsServer] <String> [-ntpServer] <String> [-rootPassword] <String> [-enableSsh] <String> [-enableDebug] <String> [-folder] <String> [[-ovaPath] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Deploy-PhotonAppliance [-server] <String> [-user] <String> [-pass] <String> [-sddcDomain] <String> [-hostname] <String> [-domain] <String> [-ipAddress] <String> [-netmask] <String> [-gateway] <String> [-dnsServer] <String> [-ntpServer] <String> [-adminPassword] <String> [-enableSsh] <String> [-folder] <String> [[-ovaPath] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## Description
Expand All @@ -24,7 +24,7 @@ The cmdlet connects to SDDC Manager using the -server, -user, and -password valu
### Example 1

```powershell
Deploy-PhotonAppliance -server sfo-vcf01.sfo.rainpole.io -user administrator@vsphere.local -pass VMw@re1! -sddcDomain sfo-m01 -hostname sfo-m01-hrm01 -ipAddress 172.18.95.50 -netmask "24 (255.255.255.0)" -gateway 172.18.95.1 -domain sfo.rainpole.io -dnsServer "172.18.95.4 172.18.95.5" -ntpServer ntp.sfo.rainpole.io -rootPassword VMw@re1! -enableSsh True -enableDebug False -folder sfo-m01-fd-hrm -ovaPath .\vvs_appliance_v0.0.1.ova
Deploy-PhotonAppliance -server sfo-vcf01.sfo.rainpole.io -user administrator@vsphere.local -pass VMw@re1! -sddcDomain sfo-m01 -hostname sfo-m01-hrm01 -ipAddress 172.18.95.50 -netmask "24 (255.255.255.0)" -gateway 172.18.95.1 -domain sfo.rainpole.io -dnsServer "172.18.95.4 172.18.95.5" -ntpServer ntp.sfo.rainpole.io -rootPassword VMw@re1! -enableSsh True -folder sfo-m01-fd-hrm -ovaPath .\vvs-appliance-v0.1.0.ova
```

This example deploys the Photon appliance named sfo-m01-hrm01.
Expand Down Expand Up @@ -207,9 +207,9 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -rootPassword
### -adminPassword
The root password for the Photon appliance.
The admin password for the Photon appliance.
```yaml
Type: String
Expand Down Expand Up @@ -239,22 +239,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -enableDebug
Enable debug mode on the Photon appliance.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -folder
The virtual machine folder to place the Photon appliance in.
Expand Down

0 comments on commit 08689ca

Please sign in to comment.