Master (#34)
* Update MongoDB Test Provision VM is required to upload test files to the client * update MongoDB Test Do not install any packages on client and server vms at this time * DEPLOYMENT with captured VHD Renamed DEPLOYMENT cycle as LEGACY-DEPLOYMENT cycle. Added DEPLOYMENT cycle test to capture a VHD and then run the cycle with the captured VHD.
This commit is contained in:
Родитель
4bb2ad250d
Коммит
0075634749
|
@ -1,2 +1,7 @@
|
|||
.idea/*
|
||||
|
||||
TestResults*
|
||||
tools*
|
||||
report*
|
||||
report/AdditionalInfo.html
|
||||
Azure_ICA_all_*
|
||||
temp*
|
|
@ -61,17 +61,17 @@
|
|||
<Data>
|
||||
<!-- You can add your own distro and Image names here -->
|
||||
<Distro>
|
||||
<Name>SSU1604P</Name>
|
||||
<Name>CK</Name>
|
||||
<OsImage></OsImage>
|
||||
<!-- <OsImage>b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-16_04-LTS-amd64-server-20160907.1-en-us-30GB</OsImage> -->
|
||||
<ARMImage>
|
||||
<Publisher></Publisher>
|
||||
<Publisher>Canonical</Publisher>
|
||||
<!-- <Publisher>Canonical</Publisher> -->
|
||||
<Offer></Offer>
|
||||
<Offer>UbuntuServer</Offer>
|
||||
<!-- <Offer>UbuntuServer</Offer> -->
|
||||
<Sku></Sku>
|
||||
<Sku>16.04.0-LTS</Sku>
|
||||
<!-- <Sku>16.04.0-LTS</Sku> -->
|
||||
<Version></Version>
|
||||
<Version>latest</Version>
|
||||
<!-- <Version>latest</Version> -->
|
||||
</ARMImage>
|
||||
<OsVHD></OsVHD>
|
||||
|
@ -7206,6 +7206,12 @@
|
|||
<Name>ICA-DEPLOYMENT-ALL-SIZES-LOOP-TEST</Name>
|
||||
</test>
|
||||
</Cycle>
|
||||
<Cycle>
|
||||
<cycleName>LEGACY-DEPLOYMENT</cycleName>
|
||||
<test>
|
||||
<Name>ICA-DEPLOYMENT-ALL-SIZES-LOOP-TEST</Name>
|
||||
</test>
|
||||
</Cycle>
|
||||
<Cycle>
|
||||
<cycleName>UITEST</cycleName>
|
||||
<test>
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче