This commit is contained in:
Shital Savekar 2018-05-31 11:29:11 -07:00
Родитель 57c14e9af1 9420a5bf58
Коммит 349977db8e
20 изменённых файлов: 580 добавлений и 158 удалений

Просмотреть файл

@ -1,5 +1,7 @@
##############################################################################################
# AzureAutomationManager.ps1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description : This script manages all the setup and test operations in Azure environemnt.
# It is an entry script of Azure Automation
# Operations :
@ -7,8 +9,7 @@
# - VHD preparation : Installing packages required by ICA, LIS drivers and waagent
# - Uplaoding test VHD to cloud
# - Invokes azure test suite
## Author : v-shisav@microsoft.com
## Author : v-ampaw@microsoft.com
## Author : v-shisav@microsoft.com, v-ampaw@microsoft.com, lisasupport@microsoft.com
###############################################################################################
param (
[CmdletBinding()]

Просмотреть файл

@ -1,5 +1,12 @@
#v-shisav : STILL IN BETA VERSION
##############################################################################################
# AzureTestSuite.ps1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description :
# Operations :
#
## Author : v-shisav@microsoft.com, lisasupport@microsoft.com
###############################################################################################
param($xmlConfig, [string] $Distro, [string] $cycleName, [int] $TestIterations)
Function RunTestsOnCycle ($cycleName , $xmlConfig, $Distro, $TestIterations )
{

128
Documents/How-to-use.md Normal file
Просмотреть файл

@ -0,0 +1,128 @@
# Title: Partner Jenkins Pipeline Operation Instruction
`Updated: Tuesday, May 29, 2018`
## Objective
This document instructs for partners to create customized menu of Jenkins pipeline and run either/both Microsoft-provided tests or/and customized test cases in Jenkins. This instruction has 2 major parts; creating menu from xml files and executing tests.
## Prepare a VHD for tests.
1. Start PowerShell with the Run As Administrator option.
2. In powershell, Goto Automation Folder.
3. Run following command.
.\AzureAutomationManager.ps1 -xmlConfigFile .\Azure_ICA_all.xml -cycleName autosetup -Distro YourDistroName -runtests
This command will install "Minimum Required Packages" and will capture the VHD which can be used to run further tests like, Network tests & VNET tests.
List of minimum packages in VHD
iperf
mysql
gcc
bind
bind-utils
bind9
python
python-argparse
python-crypto
python-paramiko
libstdc++6
psmisc
nfs-utils
nfs-common
tcpdump
4.Once you get the prepared VHD Name, create a new element "Distro" in XML file and give prepared VHD name in Distro element.
## Develop tests in GitHub
`Source: https://github.com/LIS/LISAv2`
1. XML folder: it has pre-defined global configuration and account information. It also has Region information in xml files. This folder also has two sub folders; TestCases and VMConfigurations. VMConfigurations has the list of xml files for each test case. TestCases folder has the list of xml files for each test category. The master branch is owned by Microsoft, and actively manage the PR in LISAv2. New test case development and/or new menu development must be approved by Microsoft.
2. TestScripts folder has the number of test scripts defined in TestCases, and separated by OS type.
3. Tools folder has binary files required for test execution.
4. This repo will provide Microsoft-provided test cases as well as Partner-developed test cases.
a. Microsoft will share the test development plan and its log with partners. If this is the case, you can skip the next paragraph to Verify a published image on Azure.
b. Partners developed test cases should be followed below steps.
i. Sync up the local master branch from remote master branch in the GitHub project, if new work branch is in the LISAv2. Otherwise, you can folk the LISAv2 repo to your own GitHub account.
ii. Branch out for work and pull down to your local system.
iii. Once change is ready to review, create a PR from LISAv2 in your account to LIS account. Or, new working branch to master in LISAv2 repo.
iv. Add LisaSupport@microsoft.com to Reviewers.
v. Once it is approved, then you can merge the PR to master branch.
vi. In this case, you will need to rebuild menu by <Partner name>-Refresh-Test-Selection-Menus
## Verify a published image on Azure
`UI I Instructions`
1. Sign in to Jenkins page with the assigned user name & password
2. Browse to '<Partner name>-Refresh-Test-Selection-Menu', if you would like to apply new menu or test cases before test execution.
3. Click 'Build with Parameters' in left panel menu
a. Enter git repo ULR and branch name for menu xml file. Recommend keeping the default Repo URL and branch name.
b. Click 'Build' button.
c. Click the rotation icon of running job and verify 'SUCCESS' inside 'Console Output'. You have new menu/test cases in Jenkins.
4. Browse to '<Partner name>-Launch-Tests' and submit the job for test execution.
5. Click 'Build with Parameters' in left panel menu
a. Select 'ImageSource' or navigate to 'CustomVHD'. If you have external source URL, you can enter it in 'CustomVHDURL' text box.
b. Leave 'Kernel' unless you would like to change to customized kernel code or linux-next.
c. Next, there are 3 options regarding how to select test cases; TestName, Category and Tag.
i. Supported platform: Azure, etc.
ii. Available Category: BVT, Community, Functional, Performance, Smoke.
iii. Available Tags: boot, bvt, disk, ext4, gpu, hv_netvsc, etc.
6. Enter the email address for report notification.
`API/cmdline Instruction`
A single script executes the test launch/execute with pre-defined parameters.
TODO: TBD
`Script name and its parameters`
$TriggerTestPipelineRemotely 'parameters'
Example,
TODO: TBD
`Script name parameters`
## GlobalConfigurations.xml in XML folder
Pre-defined global configuration. Do not recommend to make change in the file.
## RegionAndStorageAccounts.xml in XML folder
It has pre-defined region information. Do not recommend to make change of this file.
## TestToRegionMapping.xml in XML folder
This XML file defines the regions per Category. It may require specific region only for available setup/resource. By default, 'global' has all regions.
## XML files in XML/TestCases folder
This location has the list of XML files for test cases. Each XML file names after category for each maintenance / sharing.
1. BVT.xml: BVT (Build Validation Test) test cases
2. CommunityTests.xml: Tests from Open Source Community.
3. FunctionalTests.xml: Feature tests for SR-IOV, GPU, DPDK, etc.
4. Other.xml: If any does not fall into existing Category, add to here.
5. PerformanceTests.xml: Performance test cases
6. RegressionTests.xml: Add any tests for regression cycle.
7. SmokeTests.xml: It will run before BVT test runs.
8. StressTests.xml: Under development. Network traffic and stroage IO testing under heavy CPU and Memory stress.
Here is the format inside of TestCases.xml file. TODO: Revise the definition, and required field or not.
<testName></testName>: Represent unique Test Case name
<testScript></testScript>
<PowershellScript></PowershellScript>: Actual PS script file name.
<files></files>
<setupType></setupType>: The name represents VM's size and its definition in TestsConfigurations.xml file, VMConfigurations folder.
<TestType></TestType>
<TestFeature></TestFeature>
<Platform></Platform>: Supported platform names. Azure, HyperV, etc.
<Category></Category>: Available Test Category
<Area></Area>: Test Area
<Tags></Tags>: Tag information seperated by comma
<TestID></TestID>: Unique Test ID used in Jenkins.
## TestsConfigurations.xml in XML/VMConfigurations
Per Category, each XML file has VM name, Resource Group name, etc. Do not recommend to make change of the file.
## Support Contact
Contact LisaSupport@microsoft.com (Linux Integration Service Support), when you have technical issues.

Просмотреть файл

@ -1,71 +0,0 @@
Download Latest Azure PowerShell
Download Web Platform Installer from : http://go.microsoft.com/fwlink/p/?linkid=320376&clcid=0x409
Start Web Platform Installer and select Azure PowerShell and proceed for Azure Powershell Installation.
Download 3rd Party utilities.
Download Putty executables from http://www.putty.org and keep them in ./AutomationDirectory/tools
You should have the following utilities:
plink.exe
pscp.exe
putty.exe
puttygen.exe
Update Azure_ICA_all.xml file.
Setup Subscription details.
Go to Config > Azure > General and update following fields :
1.SubscriptionID
2.SubscriptionName
3.CertificateThumbprint
Make sure you have installed a management certificate and can access it via the Azure Management Portal (SETTINGS->MANAGEMENT CERTIFICATES).
4.StorageAccount
5.Location
6.AffinityGroup
Make sure that you either use <Location> or <AffinityGroup>. Means, if you want to use Location, then AffinityGroup should be blank and vice versa.
Example :
<General>
<SubscriptionID>Your_Azure_Subscription_ID</SubscriptionID>
<SubscriptionName>Your_Azure_Subscription_Name</SubscriptionName>
<CertificateThumbprint>Certificate_Associated_With_Your_Subscription</CertificateThumbprint>
<ManagementEndpoint>https://management.core.windows.net</ManagementEndpoint>
<StorageAccount>Your_Storage_Account</StorageAccount>
<Location>Your_Preferred_Location</Location>
<AffinityGroup></AffinityGroup>
</General>
Add VHD details in XML File.
1. Goto Config > Azure > Deployment > Data.
2. Make sure that your "VHD under test" should be present here in one of <Distro>..</Distro> entries.
If your VHD is not listed here. Create a new Distro element and add your VHD details.
Example.
<Distro>
<Name>Distro_Name</Name>
<OsImage>Distro_OS_Image_Name_As_Appearing_under_Azure_OS_Images</OsImage>
</Distro>
3.Save file.
Prepare a VHD for tests.
1.Start PowerShell with the Run As Administrator option.
2.In powershell, Goto Automation Folder.
3.Run following command.
.\AzureAutomationManager.ps1 -xmlConfigFile .\Azure_ICA_all.xml -cycleName autosetup -Distro YourDistroName -runtests
This command will install "Minimum Required Packages" and will capture the VHD which can be used to run further tests like, Network tests & VNET tests.
List of minimum packages
iperf
mysql
gcc
bind
bind-utils
bind9
python
python-argparse
python-crypto
python-paramiko
libstdc++6
psmisc
nfs-utils
nfs-common
tcpdump
4.Once you get the prepared VHD Name, create a new element "Distro" in XML file and give prepared VHD name in Distro element.

Просмотреть файл

@ -1,3 +1,12 @@
##############################################################################################
# Azure.psm1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description : Azure PS module file having all required for test execution.
# Operations :
#
## Author : lisasupport@microsoft.com
###############################################################################################
Function ValidateSubscriptionUsage($subscriptionID, $RGXMLData)
{
#region VM Cores...

Просмотреть файл

@ -1,3 +1,12 @@
##############################################################################################
# CommonFunctions.psm1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description : Azure commone test modules.
# Operations :
#
## Author : lisasupport@microsoft.com
###############################################################################################
Function ThrowException($Exception)
{
$line = $Exception.InvocationInfo.ScriptLineNumber

Просмотреть файл

@ -1,4 +1,13 @@
Function VerifyExtensionFromAzure ([string]$ExtensionName, [string]$ServiceName, [string]$ResourceGroupName, $maxRetryCount=20, $retryIntervalInSeconds=10)
##############################################################################################
# ExtensionLibrary.psm1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description : Azure extension test library.
# Operations :
#
## Author : lisasupport@microsoft.com
###############################################################################################
Function VerifyExtensionFromAzure ([string]$ExtensionName, [string]$ServiceName, [string]$ResourceGroupName, $maxRetryCount=20, $retryIntervalInSeconds=10)
{
$retryCount = 1
do

Просмотреть файл

@ -1,3 +1,12 @@
##############################################################################################
# Framework.psm1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description : Pipeline framework modules.
# Operations :
#
## Author : lisasupport@microsoft.com
###############################################################################################
function GetTestSummary($testCycle, [DateTime] $StartTime, [string] $xmlFilename, [string] $distro, $testSuiteResultDetails)
{
<#

Просмотреть файл

@ -0,0 +1,245 @@
##############################################################################################
# parser.ps1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description : Parsing moduels for test log access.
# Operations :
#
## Author : lisasupport@microsoft.com
###############################################################################################
Import-Module .\AzureWinUtils.psm1 -Force
Function GetStringMatchCount([string] $logFile,[string] $beg,[string] $end, [string] $str){
$match=GetStringMatchObject -logFile $logFile -beg $beg -end $end -str $str
return $match.Count
}
Function GetTotalDataTransfer([string] $logFile,[string] $beg,[string] $end){
$dataTransfer=GetDataTxed -logFile $logFile -ptrn "\d*[bits,KBytes]/sec$"
return $dataTransfer
}
Function GetTotalUdpServerTransfer([string] $logFile,[string] $beg,[string] $end){
$dataTransfer=GetDataTxed -logFile $logFile -ptrn "[bits,bytes]/sec"
return $dataTransfer
}
Function GetCustomProbeMsgsCount([string] $logFile,[string] $beg,[string] $end) {
$match=GetStringMatchObject -logFile $logFile -beg $beg -end $end -str "0.00 KBytes 0.00 KBytes/sec"
return $match.Count
}
Function IsCustomProbeMsgsPresent ([string] $logFile,[string] $beg,[string] $end) {
$cpStr="0.00 KBytes 0.00 KBytes/sec"
$match=IsContainString -logFile $logFile -beg $beg -end $end -str $cpStr
return $match
}
Function GetUdpLoss([string] $logFile, [string] $beg,[string] $end) {
$match=GetStringMatchObject -logFile $logFile -beg $beg -end $end -str "\([\d,\d.\d]*%\)$"
Write-Host $match
$arr = @()
foreach ($item in $match) {
$item = $item.ToString()
$str2=@($item.Split(" ",[StringSplitOptions]'RemoveEmptyEntries'))
foreach ($a in $str2) {
if($a.Contains("%"))
{
$i=$str2.IndexOf($a)
$a=$str2[$i]
$b=$a.Split("%")
$num=$b[0].Split("(")
$arr += $num
}
}
$sum = ($arr | Measure-Object -Sum).Sum
}
Write-Host $sum
return $sum
}
Function GetDataTxed([string] $logFile,[string] $beg,[string] $end, [string] $ptrn) {
$match=GetStringMatchObject -logFile $logFile -beg $beg -end $end -str $ptrn
$match= $match | Select-String -Pattern "0.00 KBytes/sec" -NotMatch
$lastItem=$match.Item($match.Length-1)
$lastItem=$lastItem.ToString()
Write-Host $lastItem
$str1=@($lastItem.Split(']'))
$str2=@($lastItem.Split(" ",[StringSplitOptions]'RemoveEmptyEntries'))
Write-Host $str2
foreach ($a in $str2) {
if($a.Contains("Bytes") -and !($a.Contains("Bytes/sec")))
{
$i=$str2.IndexOf($a)
$result=$str2[$i-1]+$str2[$i]
}
}
return $result
}
Function AnalyseIperfServerConnectivity([string] $logFile,[string] $beg,[string] $end) {
$connectStr="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\sport\s\d*\sconnected with \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\sport\s\d"
$match=IsContainString -logFile $logFile -beg $beg -end $end -str $connectStr
$failure = 0
If($match) {
LogMsg "Server connected!"
return $true
} else {
LogMsg "Server connection Fails!"
return $false
}
}
Function AnalyseIperfClientConnectivity([string] $logFile,[string] $beg,[string] $end) {
$connectStr="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\sport\s\d*\sconnected with \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\sport\s\d"
$match=IsContainString -logFile $logFile -beg $beg -end $end -str $connectStr
$failure = 0
If($match) {
Write-Host "Success"
$match = IsContainString -logFile $logFile -beg $beg -end $end -str "failed"
If($match) {
$failure = $failure + 1
LogMsg "Client connected with some failed connections!"
}
$match = IsContainString -logFile $logFile -beg $beg -end $end -str "error"
If($match) {
$failure = $failure + 1
LogMsg "There were some errors in the connections!"
}
$match = IsContainString -logFile $logFile -beg $beg -end $end -str "refused"
If($match) {
$failure = $failure + 1
LogMsg "Some connections were refused!"
}
if ($failure -eq 0) {
LogMsg "Client was successfully connected to server"
return $true
} else {
LogMsg "Client connection fails"
return $false
}
} else {
$match = IsContainString -logFile $logFile -beg $beg -end $end -str "No address associated"
If($match) {
LogMsg "Client was not connected to server!"
LogMsg "No address associated with hostname"
return $false
}
elseif (($match= IsContainString -logFile $logFile -beg $beg -end $end -str "Connection refused")) {
LogMsg "Client was not connected to server."
LogMsg "Connection refused by the server."
return $false
}
elseif (($match= IsContainString -logFile $logFile -beg $beg -end $end -str "Name or service not known")) {
LogMsg "Client was not connected to server."
LogMsg "Name or service not known."
return $false
} else {
LogMsg "Client was not connected to server."
LogMsg "Unlisted error. Check logs for more information...!."
return $false
}
}
}
Function IsContainString([string] $logFile,[string] $beg,[string] $end, [string] $str) {
$match=GetStringMatchObject -logFile $logFile -beg $beg -end $end -str $str
If ($match.count -gt 0) {
return $true
} else {
return $false
}
}
Function GetStringMatchObject([string] $logFile,[string] $beg,[string] $end, [string] $str) {
if ($beg -eq "0") {
$begPos = 1
$match=Select-String -Pattern $end -Path $logFile
$endPos= $match.LineNumber
$lineArr = ($begPos-1)..($endPos-1)
$match=Get-Content -Path $logFile | Select-Object -Index $lineArr | Select-String -Pattern $str
} elseif ($beg -ne "" -and $end -ne "") {
$match=Select-String -Pattern $beg -Path $logFile
$begPos= $match.LineNumber
$match=Select-String -Pattern $end -Path $logFile
$endPos= $match.LineNumber
$lineArr = ($begPos-1)..($endPos-1)
$match=Get-Content -Path $logFile | Select-Object -Index $lineArr | Select-String -Pattern $str
} else {
$match=Select-String -Pattern $str -Path $logFile
}
#Write-Host $match
return $match
}
Function GetParallelConnectionCount([string] $logFile,[string] $beg,[string] $end){
$connectStr="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\sport\s\d*\sconnected with \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\sport\s\d"
$p=GetStringMatchCount -logFile $logFile -beg $beg -end $end -str $connectStr
return $p
}
Function GetMSSSize([string] $logFile,[string] $beg,[string] $end){
$match=GetStringMatchObject -logFile $logFile -beg $beg -end $end -str "MSS size \d*\sbytes"
If ($match.Length -gt 1) {
$lastItem=$match.Item($match.Length-1)
} else {
$lastItem=$match
}
$lastItem=$lastItem.ToString()
#$str1=@($lastItem.Split(']'))
$str2=@($lastItem.Split(" ",[StringSplitOptions]'RemoveEmptyEntries'))
foreach ($a in $str2) {
if($a.Contains("size"))
{
$i=$str2.IndexOf($a)
$result=$str2[$i+1]+$str2[$i+2]
}
}
return $result
}
Function GetParallelConnectionsCount($iperfClientoutput){
$iperfClientOutput = $iperfClientOutput.Split("")
$uniqueIds = @()
$AllConnectedIDs = @()
$NoofUniqueIds = 0
foreach ($word in $iperfClientOutput)
{
if ($word -imatch "]")
{
$word = $word.Replace("]","")
$word = $word.Replace("[","")
$word = $word -as [int]
if ($word)
{
$AllConnectedIDs += $word
$NotUnique = 0
foreach ($id in $uniqueIds)
{
if ($word -eq $id)
{
$NotUnique = $NotUnique + 1
}
}
if ($NotUnique -eq 0)
{
$uniqueIds += $word
}
}
}
}
$NoofUniqueIds = $uniqueIds.Count
#return $AllConnectedIDs, $uniqueIds, $NoofUniqueIds
return $NoofUniqueIds
}
#GetStringMatchObject -logFile ".\bookmark.txt" -beg "BookMark1" -end "BookMark3" -str "MSS size \d"
#GetStringMatchCount -logFile ".\bookmark.txt" -beg "BookMark1" -end "BookMark2" -str "connected"
GetTotalDataTransfer -logFile ".\cp.txt"
#GetMSSSize -logFile ".\bookmark.txt" -beg "BookMark2" -end "BookMark3"
#GetUdpLoss -logFile ".\udpclient.txt"
#GetTotalUdpServerTransfer -logFile "iperf-server.txt"
#GetParallelConnectionCount -logFile ".\bookmark.txt" -beg "BookMark1" -end "BookMark2"
#AnalyseIperfServerConnectivity ".\bookmark.txt"
#IsCustomProbeMsgsPresent ".\cp.txt"

Просмотреть файл

@ -1,11 +1,14 @@
# Test Automation for Microsoft Linux on Azure & Hyper-V
# Test Automation for Microsoft Linux on Azure & Hyper-V
Automation platform for Linux images testing on Microsoft Azure and Hyper-V
## Overview
LISA-v2 (Linux Integrated Service Automation) is the One-stop automation solution for Linux images/kernel testing on Microsoft Azure and Hyper-V. LISA-v2 supports both Microsoft Azure and Hyper-V automation, and they use PowerShell, BASH and python scripts. Tests for feature, performance, stress and regression about new Linux Operating Systems and kernels. The test suite provides Build Verification Tests (BVTs), Azure VNET Tests and Network tests.
LISAv2 (Linux Integrated Service Automation) is the One-stop automation solution for Linux images/kernel testing on Microsoft Azure and Hyper-V. LISA-v2 supports both Microsoft Azure and Hyper-V automation, and they use PowerShell, BASH and python scripts. Tests for feature, performance, stress and regression about new Linux Operating Systems and kernels. The test suite provides Build Verification Tests (BVTs), Azure VNET Tests and Network tests.
### Prerequisite
1. You must have a Windows Machine with PowerShell. Tested Platforms:
1. You must have a Windows Machine with PowerShell. Tested Platforms:
a. Windows 8x64
b. Windows 10x64
@ -13,20 +16,23 @@ LISA-v2 (Linux Integrated Service Automation) is the One-stop automation solutio
d. Server 2012 R2
e. Server 2016
2. You must be connected to Internet.
3. You must have a valid Windows Azure Subscription.
2. You must be connected to Internet.
3. You must have a valid Windows Azure Subscription.
a. Subscription Name
b. Subscription ID
### Download Latest Automation Code
1. Checkout from https://github.com/LIS/LISAv2.git to your local storage
1. Checkout from https://github.com/LIS/LISAv2.git to your local storage or folk to your GitHub account.
### Download Latest Azure PowerShell
1. Download Web Platform Installer from : http://go.microsoft.com/fwlink/p/?linkid=320376&clcid=0x409
2. Start Web Platform Installer and select Azure PowerShell and proceed for Azure PowerShell Installation.
1. Download Web Platform Installer from [here](http://go.microsoft.com/fwlink/p/?linkid=320376&clcid=0x409)
2. Start Web Platform Installer and select Azure PowerShell and proceed for Azure PowerShell Installation.
### Authenticate Your Machine with Your Azure Subscription
There are two ways to authenticate your machine with your subscription.
1. Azure AD method
@ -37,23 +43,8 @@ There are two ways to authenticate your machine with your subscription.
To learn more about how to configure your PowerShell with your subscription, please visit [here](http://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/#Connect).
### Download Public Utilities
Download Putty executables from http://www.putty.org and keep them in `.\TestScripts\Tools`. You should have the following utilities:
<20> plink.exe
<20> pscp.exe
<20> putty.exe
<20> puttygen.exe
Download dos2unix executables from http://sourceforge.net/projects/dos2unix/ and keep them in `.\TestScripts\Tools`. You should have the following utilities:
<20> dos2unix.exe
Download 7-zip executable from http://www.7-zip.org/ ( Direct Download Link : http://www.7-zip.org/a/7za920.zip ) and keep them in `.\TestScripts\Tools`. You should have the following utility:
<20> 7za.exe
### Update GlobalConfigurations.xml file
1. Setup Subscription details.
Go to Global > Azure and update following fields :
@ -65,7 +56,9 @@ Download 7-zip executable from http://www.7-zip.org/ ( Direct Download Link : ht
e. ARMStorageAccount
Example :
```xml
```xml
<Azure>
<Subscription>
<SubscriptionID>2cd20493-fe97-42ef-9ace-ab95b63d82c4</SubscriptionID>
@ -74,23 +67,25 @@ Download 7-zip executable from http://www.7-zip.org/ ( Direct Download Link : ht
<Environment>AzureCloud</Environment>
<ARMStorageAccount>ExistingStorage_Standard</ARMStorageAccount>
</Subscription>
```
```
2. Save file.
### Prepare VHD to work in Azure
`Applicable if you are uploading your own VHD with Linux OS to Azure.`
TODO: Need to revise ******
A VHD with Linux OS must be made compatible to work in Azure environment. This includes <20>
1. Installation of Linux Integration Services to Linux VM (if already not present)
2. Installation of Windows Azure Linux Agent to Linux VM (if already not installed.)
3. Installation of minimum required packages. (Applicable if you want to run Tests using Automation code)
Please follow the steps mentioned at:
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-create-upload-vhd/
Please follow the steps mentioned at [here](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic)
### Prepare VHD to work with Automation code
### Prepare VHD to work with Automation code.
`Applicable if you are using already uploaded VHD / Platform Image to run automation.`
To run automation code successfully, you need have following packages installed in your Linux VHD.
@ -115,6 +110,7 @@ To run automation code successfully, you need have following packages installed
18. tcpdump
### Create SSH Key Pair
`PublicKey.cer <20> PrivateKey.ppk`
A Linux Virtual machine login can be done with Password authentication or SSH key pair authentication. You must create a Public Key and Private key to run automation successfully. To learn more about how to create SSH key pair, please visit [here](http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-use-ssh-key/).
@ -122,15 +118,19 @@ A Linux Virtual machine login can be done with Password authentication or SSH ke
After creating Public Key (.cer) and putty compatible private key (.ppk), you must put it in your `automation_root_folder\ssh\` folder and mention their names in Azure XML file.
### VNET Preparation
`Required for executing Virtual Network Tests`
#### Create a Virtual Network in Azure
A virtual network should be created and connected to Customer Network before running VNET test cases. To learn about how to create a virtual network on Azure, please visit [here](https://azure.microsoft.com/documentation/articles/vpn-gateway-site-to-site-create/).
A virtual network should be created and connected to Customer Network before running VNET test cases. To learn about how to create a virtual network on Azure, please visit [here](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal).
#### Create A customer site using RRAS
Apart from Virtual Network in Azure, you also need a network (composed of Subnets and DNS server) to work as Customer Network. If you don<6F>t have separate network to run VNET, you can create a virtual customer network using RRAS. To learn more, please visit [here](https://msdn.microsoft.com/en-us/library/dn636917.aspx).
## How to Start Automation
Apart from Virtual Network in Azure, you also need a network (composed of Subnets and DNS server) to work as Customer Network. If you don<6F>t have separate network to run VNET, you can create a virtual customer network using RRAS. To learn more, please visit [here](https://social.msdn.microsoft.com/Forums/en-US/b7d15a76-37b3-4307-98e3-d9efef5767b8/azure-site-to-site-vpn-routing?forum=WAVirtualMachinesVirtualNetwork).
### How to Start Automation
Before starting Automation, make sure that you have completed steps in chapter [Prepare Your Machine for Automation Cycle](#prepare)
1. Start PowerShell with Administrator privileges
@ -138,28 +138,21 @@ Before starting Automation, make sure that you have completed steps in chapter [
3. Issue automation command
#### Automation Cycles Available
TODO: Revision *****
1. BVT
2. NETWORK
3. VNET
4. E2E-1
5. E2E-DISK
6. E2E-TIMESYNC
7. E2E-TIMESYNC-KERNBANCH
8. WORDPRESS1VM
9. WORDPRESS4VM
10. DAYTRADER1VM
11. DAYTRADER4VM
12. NETPERF
13. IOPERF-RAID
14. IOPERF-LVM
2. PERFORMANCE
3. FUNCTIONAL
4. COMMUNITY
5. SMOKE
#### Supported Azure Mode
- AzureResourceManager, if the value is present in the SupportedExecutionModes tag of the case definition
#### Command to Start any of the Automation Cycle
TODO: Revision ***
.\AzureAutomationManager.ps1 -xmlConfigFile .\Azure_ICA_ALL.xml -runtests -email <20>Distro <DistroName> -cycleName <TestCycleToExecute> -UseAzureResourceManager
#### More Information
For more details, please refer to the documents [here](https://github.com/LIS/LISAv2/tree/master/Documentation).
For more details, please refer to the documents [here](https://github.com/LIS/LISAv2/blob/master/Documents/How-to-use.md).

Просмотреть файл

@ -1,3 +1,12 @@
##############################################################################################
# RunTests.ps1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description :
# Operations :
#
## Author : v-shisav@microsoft.com, lisasupport@microsoft.com
###############################################################################################
Param(
#Do not use. Reserved for Jenkins use.

Просмотреть файл

@ -2,6 +2,9 @@
.SYNOPSIS
This script authenticates PS sessing using Azure principal account.
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
.DESCRIPTION
This script authenticates PS sessing using Azure principal account.
@ -15,7 +18,7 @@
.NOTES
Version: 1.0
Author: Shital Savekar <v-shisav@microsoft.com>
Author: Shital Savekar <v-shisav@microsoft.com>, lisasupport@microsoft.com
Creation Date: 14th December 2017
Purpose/Change: Initial script development

Просмотреть файл

@ -1,3 +1,26 @@
<#
.SYNOPSIS
This script authenticates PS sessing using All test results analysis.
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
.DESCRIPTION
This script authenticates PS sessing using Azure principal account.
.PARAMETER
.INPUTS
.NOTES
Version: 1.0
Author: lisasupport@microsoft.com
Creation Date:
Purpose/Change:
.EXAMPLE
#>
#Import Libraries.
Get-ChildItem .\Libraries -Recurse | Where-Object { $_.FullName.EndsWith(".psm1") } | ForEach-Object { Import-Module $_.FullName -Force -Global }

Просмотреть файл

@ -1,4 +1,25 @@
<#
.SYNOPSIS
This script copies VHD file to another storage account.
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
.DESCRIPTION
This script copies VHD files by another storage account.
.PARAMETER
.INPUTS
.NOTES
Version: 1.0
Author: lisasupport@microsoft.com
Creation Date:
Purpose/Change:
.EXAMPLE
#>
param
(

Просмотреть файл

Просмотреть файл

@ -1,3 +1,13 @@
##############################################################################################
# TriggerTestPipelineRemotely.sh
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description :
# Operations :
#
## Author : lisasupport@microsoft.com
###############################################################################################
#!/bin/bash
#####################################################################################################

Просмотреть файл

@ -1,3 +1,12 @@
##############################################################################################
# UpdateXMLs.ps1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description :
# Operations :
#
## Author : lisasupport@microsoft.com
###############################################################################################
param(
[string]$SubscriptionID,
[string]$LinuxUsername,

Просмотреть файл

@ -1,4 +1,13 @@
Param
##############################################################################################
# UploadVHDtoAzureStorage.ps1
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Description :
# Operations :
#
## Author : lisasupport@microsoft.com
###############################################################################################
Param
(
#Mandatory parameters

Просмотреть файл

@ -2,106 +2,106 @@
<AllRegions>
<eastasia>
<StandardStorage>eosgeastasia</StandardStorage>
<PremiumStorage>konkacieastasiaxiov2</PremiumStorage>
<PremiumStorage>eosgeastasiax</PremiumStorage>
</eastasia>
<southeastasia>
<StandardStorage>eosgsoutheastasia</StandardStorage>
<PremiumStorage>konkacisouthestasiaxiov2</PremiumStorage>
<PremiumStorage>eosgsouthestasiax</PremiumStorage>
</southeastasia>
<centralus>
<StandardStorage>eosgcentralus</StandardStorage>
<PremiumStorage>konkacicentralusxiov2</PremiumStorage>
<PremiumStorage>eosgcentralusx</PremiumStorage>
</centralus>
<eastus>
<StandardStorage>eosgeastus</StandardStorage>
<PremiumStorage>konkacieastusxiov2</PremiumStorage>
<PremiumStorage>eosgeastusx</PremiumStorage>
</eastus>
<eastus2>
<StandardStorage>eosgeastus2</StandardStorage>
<PremiumStorage>konkacieastus2xiov2</PremiumStorage>
<PremiumStorage>eosgeastus2x</PremiumStorage>
</eastus2>
<westus>
<StandardStorage>eosgwestus</StandardStorage>
<PremiumStorage>konkaciwestusxiov2</PremiumStorage>
<PremiumStorage>eosgwestusx</PremiumStorage>
</westus>
<northcentralus>
<StandardStorage>eosgnorthcentralus</StandardStorage>
<PremiumStorage>konkacinorthcntrlusxiov2</PremiumStorage>
<PremiumStorage>eosgnorthcntrlusx</PremiumStorage>
</northcentralus>
<southcentralus>
<StandardStorage>eosgsouthcentralus</StandardStorage>
<PremiumStorage>konkacisouthcntrlusxiov2</PremiumStorage>
<PremiumStorage>eosgsouthcntrlusx</PremiumStorage>
</southcentralus>
<northeurope>
<StandardStorage>eosgnortheurope</StandardStorage>
<PremiumStorage>konkacineuropexiov2</PremiumStorage>
<PremiumStorage>eosgneuropex</PremiumStorage>
</northeurope>
<westeurope>
<StandardStorage>eosgwesteurope</StandardStorage>
<PremiumStorage>konkaciwesteuropexiov2</PremiumStorage>
<PremiumStorage>eosgwesteuropex</PremiumStorage>
</westeurope>
<japanwest>
<StandardStorage>eosgjapanwest</StandardStorage>
<PremiumStorage>konkacijapanwestxiov2</PremiumStorage>
<PremiumStorage>eosgjapanwestx</PremiumStorage>
</japanwest>
<japaneast>
<StandardStorage>eosgjapaneast</StandardStorage>
<PremiumStorage>konkacijapaneastxiov2</PremiumStorage>
<PremiumStorage>eosgjapaneastx</PremiumStorage>
</japaneast>
<brazilsouth>
<StandardStorage>eosgbrazilsouth</StandardStorage>
<PremiumStorage>konkacibrazilsouthxiov2</PremiumStorage>
<PremiumStorage>eosgbrazilsouthx</PremiumStorage>
</brazilsouth>
<australiaeast>
<StandardStorage>eosgaustraliaeast</StandardStorage>
<PremiumStorage>konkaciaustraliaestxiov2</PremiumStorage>
<PremiumStorage>eosgaustraliaestx</PremiumStorage>
</australiaeast>
<australiasoutheast>
<StandardStorage>eosgaustraliasoutheast</StandardStorage>
<PremiumStorage>konkaciaussouthestxiov2</PremiumStorage>
<PremiumStorage>eosgaussouthestx</PremiumStorage>
</australiasoutheast>
<southindia>
<StandardStorage>eosgsouthindia</StandardStorage>
<PremiumStorage>konkacisouthindiaxiov2</PremiumStorage>
<PremiumStorage>eosgsouthindiax</PremiumStorage>
</southindia>
<centralindia>
<StandardStorage>eosgcentralindia</StandardStorage>
<PremiumStorage>konkacicentralindiaxiov2</PremiumStorage>
<PremiumStorage>eosgcentralindiax</PremiumStorage>
</centralindia>
<westindia>
<StandardStorage>eosgwestindia</StandardStorage>
<PremiumStorage>konkaciwestindiaxiov2</PremiumStorage>
<PremiumStorage>eosgwestindiax</PremiumStorage>
</westindia>
<canadacentral>
<StandardStorage>eosgcanadacentral</StandardStorage>
<PremiumStorage>konkacicanadacntralxiov2</PremiumStorage>
<PremiumStorage>eosgcanadacntralx</PremiumStorage>
</canadacentral>
<canadaeast>
<StandardStorage>eosgcanadaeast</StandardStorage>
<PremiumStorage>konkacicanadaeastxiov2</PremiumStorage>
<PremiumStorage>eosgcanadaeastx</PremiumStorage>
</canadaeast>
<uksouth>
<StandardStorage>eosguksouth</StandardStorage>
<PremiumStorage>konkaciuksouthxiov2</PremiumStorage>
<PremiumStorage>eosguksouthx</PremiumStorage>
</uksouth>
<ukwest>
<StandardStorage>eosgukwest</StandardStorage>
<PremiumStorage>konkaciukwestxiov2</PremiumStorage>
<PremiumStorage>eosgukwestx</PremiumStorage>
</ukwest>
<westcentralus>
<StandardStorage>eosgwestcentralus</StandardStorage>
<PremiumStorage>konkaciwestcentrlusxiov2</PremiumStorage>
<PremiumStorage>eosgwestcentrlusx</PremiumStorage>
</westcentralus>
<westus2>
<StandardStorage>eosgwestus2</StandardStorage>
<PremiumStorage>konkaciwestus2xiov2</PremiumStorage>
<PremiumStorage>eosgwestus2x</PremiumStorage>
</westus2>
<koreacentral>
<StandardStorage>eosgkoreacentral</StandardStorage>
<PremiumStorage>konkacikoreacentralxiov2</PremiumStorage>
<PremiumStorage>eosgkoreacentralx</PremiumStorage>
</koreacentral>
<koreasouth>
<StandardStorage>eosgkoreasouth</StandardStorage>
<PremiumStorage>konkacikoreasouthxiov2</PremiumStorage>
<PremiumStorage>eosgkoreasouthx</PremiumStorage>
</koreasouth>
</AllRegions>

Просмотреть файл

@ -1,7 +1,6 @@
<EnabledRegions global="eastasia,southeastasia,centralus,eastus,eastus2,westus,northcentralus,southcentralus,northeurope,westeurope,japanwest,japaneast,brazilsouth,australiaeast,australiasoutheast,southindia,centralindia,westindia,canadacentral,canadaeast,uksouth,ukwest,westcentralus,westus2,koreacentral,koreasouth,francecentral">
<!-- <enabledRegions global="eastasia,southeastasia,centralus,eastus,eastus2,westus,northcentralus,southcentralus,northeurope,westeurope,japanwest,japaneast,brazilsouth,australiaeast,australiasoutheast,southindia,centralindia,westindia,canadacentral,canadaeast,uksouth,ukwest,westcentralus,westus2,koreacentral,koreasouth,francecentral,francesouth,australiacentral,australiacentral2"> -->
<Category>
<Functional>eastus</Functional>
</Category>
<Area>
</Area>