diff --git a/.gitignore b/.gitignore index c3da290..8196602 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ .idea/* - +TestResults* +tools* +report* +report/AdditionalInfo.html +Azure_ICA_all_* +temp* \ No newline at end of file diff --git a/Azure_ICA_all.xml b/Azure_ICA_all.xml index 50ea375..2bd2182 100644 --- a/Azure_ICA_all.xml +++ b/Azure_ICA_all.xml @@ -61,17 +61,17 @@ - SSU1604P + CK - + Canonical - + UbuntuServer - + 16.04.0-LTS - + latest @@ -7095,6 +7095,12 @@ ICA-DEPLOYMENT-ALL-SIZES-LOOP-TEST + + LEGACY-DEPLOYMENT + + ICA-DEPLOYMENT-ALL-SIZES-LOOP-TEST + + UITEST diff --git a/remote-scripts/ICA-DEPLOYMENT-ALL-SIZES-LOOP-TEST.ps1 b/remote-scripts/ICA-DEPLOYMENT-ALL-SIZES-LOOP-TEST.ps1 index 1710dc3..f846d30 100644 --- a/remote-scripts/ICA-DEPLOYMENT-ALL-SIZES-LOOP-TEST.ps1 +++ b/remote-scripts/ICA-DEPLOYMENT-ALL-SIZES-LOOP-TEST.ps1 @@ -84,6 +84,44 @@ $DeploymentCount = $NumberOfSizes*5 } return $DeploymentStatistics } + + #Do this only when CustomKernel or CustomLIS is set + if (($cycleName.ToUpper() -eq "DEPLOYMENT") -and ($customKernel -or $customLIS)) + { + #create a resource group and use the VHD for Deployment Test + $isDeployed = DeployVMS -setupType "SingleVM" -Distro $Distro -xmlConfig $xmlConfig -GetDeploymentStatistics $True + + foreach ($VM in $allVMData) + { + $ResourceGroupUnderTest = $VM.ResourceGroupName + $VHDuri = (Get-AzureRMVM -ResourceGroupName $VM.ResourceGroupName).StorageProfile.OsDisk.Vhd.Uri + #Deprovision VM + LogMsg "Executing: waagent -deprovision..." + $DeprovisionInfo = RunLinuxCmd -username $user -password $password -ip $VM.PublicIP -port $VM.SSHPort -command "/usr/sbin/waagent -force -deprovision" -runAsSudo + LogMsg $DeprovisionInfo + LogMsg "Execution of waagent -deprovision done successfully" + LogMsg "Stopping Virtual Machine ...." + $out = Stop-AzureRmVM -ResourceGroupName $VM.ResourceGroupName -Name $VM.RoleName -Force + WaitFor -seconds 60 + } + #get the VHD file name from the VHD uri + $VHDuri = Split-Path $VHDuri -Leaf + $Distros = @($xmlConfig.config.Azure.Deployment.Data.Distro) + #add OSVHD element to $xml so that deployment will pick the vhd + foreach ($distroname in $Distros) + { + if ($distroname.Name -eq $Distro) + { + $xmlConfig.config.Azure.Deployment.Data.Distro[$Distros.IndexOf($distroname)].OsVHD = $VHDuri.ToString() + } + } + + #Finally set customKernl and customLIS to null which are not required to be installed after deploying Virtual machine + $customKernel = $null + Set-Variable -Name customKernel -Value $customKernel -Scope Global + $customLIS = $null + Set-Variable -Name customLIS -Value $customLIS -Scope Global + } While ($count -lt $DeploymentCount) { $count += 1 @@ -94,6 +132,7 @@ $DeploymentCount = $NumberOfSizes*5 LogMsg "ATTEMPT : $count/$DeploymentCount : Deploying $($VMSizes[$VMSizeNumber]) VM.." Set-Variable -Name OverrideVMSize -Value $($VMSizes[$VMSizeNumber]) -Scope Global -Force $isDeployed = DeployVMS -setupType "SingleVM" -Distro $Distro -xmlConfig $xmlConfig -GetDeploymentStatistics $True + $DeploymentStatistics.VMSize = $($VMSizes[$VMSizeNumber]) $DeploymentStatistics.attempt = $count if ( !$UseAzureResourceManager ) @@ -112,10 +151,15 @@ $DeploymentCount = $NumberOfSizes*5 { if ( $UseAzureResourceManager ) { - $successCount += 1 - LogMsg "ATTEMPT : $count/$DeploymentCount : Deploying $($VMSizes[$VMSizeNumber]) VM.. SUCCESS" - LogMsg "deployment Time = $($DeploymentStatistics.DeploymentTime)" - $deployResult = "PASS" + #Added restart check for the deployment + $isRestarted = RestartAllDeployments -allVMData $allVMData + if($isRestarted) + { + $successCount += 1 + LogMsg "ATTEMPT : $count/$DeploymentCount : Deploying $($VMSizes[$VMSizeNumber]) VM.. SUCCESS" + LogMsg "deployment Time = $($DeploymentStatistics.DeploymentTime)" + $deployResult = "PASS" + } } else { @@ -242,6 +286,11 @@ $DeploymentCount = $NumberOfSizes*5 { $testResult = "Aborted" } + #delete the resource group with captured VHD + elseif ($testResult -eq "PASS") + { + $out = DeleteResourceGroup -RGName $ResourceGroupUnderTest + } $resultArr += $testResult } $result = GetFinalResultHeader -resultarr $resultArr