Skip to content

Commit f62786d

Browse files
authored
Merge pull request #246 from Azure/renamestaging
Renamestaging
2 parents e89fca8 + f168634 commit f62786d

34 files changed

Lines changed: 3601 additions & 4590 deletions

CanaryValidator/Canary.Tests.ps1

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -204,83 +204,83 @@ while ($runCount -le $NumberOfIterations)
204204
{
205205
Invoke-Usecase -Name 'GetAzureStackInfraRole' -Description "List all infrastructure roles" -UsecaseBlock `
206206
{
207-
Get-AzSInfraRole -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
207+
Get-AzsInfrastructureRole -Location $ResourceLocation
208208
}
209209

210210
Invoke-Usecase -Name 'GetAzureStackInfraRoleInstance' -Description "List all infrastructure role instances" -UsecaseBlock `
211211
{
212-
Get-AzSInfraRoleInstance -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
212+
Get-AzsInfrastructureRoleInstance -Location $ResourceLocation
213213
}
214214

215215
Invoke-Usecase -Name 'GetAzureStackLogicalNetwork' -Description "List all logical networks" -UsecaseBlock `
216216
{
217-
Get-AzSLogicalNetwork -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
217+
Get-AzsLogicalNetwork -Location $ResourceLocation
218218
}
219219

220220
Invoke-Usecase -Name 'GetAzureStackStorageCapacity' -Description "List storage capacity" -UsecaseBlock `
221221
{
222-
Get-AzSStorageSubsystem -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
222+
Get-AzSStorageSubsystem -Location $ResourceLocation
223223
}
224224

225225
Invoke-Usecase -Name 'GetAzureStackStorageShare' -Description "List all storage file shares" -UsecaseBlock `
226226
{
227-
Get-AzSStorageShare -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
227+
Get-AzsStorageShare -Location $ResourceLocation
228228
}
229229

230230
Invoke-Usecase -Name 'GetAzureStackScaleUnit' -Description "List Azure Stack scale units in specified Region" -UsecaseBlock `
231231
{
232-
Get-AzSScaleUnit -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
232+
Get-AzsScaleUnit -Location $ResourceLocation
233233
}
234234

235235
Invoke-Usecase -Name 'GetAzureStackScaleUnitNode' -Description "List nodes in scale unit" -UsecaseBlock `
236236
{
237-
Get-AzSScaleUnitNode -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
237+
Get-AzsScaleUnitNode -Location $ResourceLocation
238238
}
239239

240240
Invoke-Usecase -Name 'GetAzureStackIPPool' -Description "List all IP pools" -UsecaseBlock `
241241
{
242-
Get-AzSIPPool -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
242+
Get-AzsIpPool -Location $ResourceLocation
243243
}
244244

245245
Invoke-Usecase -Name 'GetAzureStackMacPool' -Description "List all MAC address pools " -UsecaseBlock `
246246
{
247-
Get-AzSMacPool -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
247+
Get-AzsMacPool -Location $ResourceLocation
248248
}
249249

250250
Invoke-Usecase -Name 'GetAzureStackGatewayPool' -Description "List all gateway pools" -UsecaseBlock `
251251
{
252-
Get-AzSGatewayPool -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
252+
Get-AzsGatewayPool -Location $ResourceLocation
253253
}
254254

255255
Invoke-Usecase -Name 'GetAzureStackSLBMux' -Description "List all SLB MUX instances" -UsecaseBlock `
256256
{
257-
Get-AzSSLBMUX -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
257+
Get-AzsSlbMux -Location $ResourceLocation
258258
}
259259

260260
Invoke-Usecase -Name 'GetAzureStackGateway' -Description "List all gateway" -UsecaseBlock `
261261
{
262-
Get-AzSGateway -AzureStackCredentials $ServiceAdminCredentials -TenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
262+
Get-AzsGateway -Location $ResourceLocation
263263
}
264264
}
265265

266266
Invoke-Usecase -Name 'ListHealthResourceProviderAlerts' -Description "List all HealthResourceProvider(HRP) alerts " -UsecaseBlock `
267267
{
268268
Invoke-Usecase -Name 'GetAzureStackAlert' -Description "List all alerts" -UsecaseBlock `
269269
{
270-
Get-AzSAlert -TenantID $TenantID -AzureStackCredentials $ServiceAdminCredentials -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
270+
Get-AzsAlert -Location $ResourceLocation
271271
}
272272
}
273273

274274
Invoke-Usecase -Name 'ListUpdatesResourceProviderInfo' -Description "List URP information like summary of updates available, update to be applied, last update applied etc." -UsecaseBlock `
275275
{
276276
Invoke-Usecase -Name 'GetAzureStackUpdateSummary' -Description "List summary of updates status" -UsecaseBlock `
277277
{
278-
Get-AzSUpdateLocation -TenantID $TenantID -AzureStackCredentials $ServiceAdminCredentials -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
278+
Get-AzSUpdateLocation -Location $ResourceLocation
279279
}
280280

281281
Invoke-Usecase -Name 'GetAzureStackUpdateToApply' -Description "List all updates that can be applied" -UsecaseBlock `
282282
{
283-
Get-AzSUpdate -TenantID $TenantID -AzureStackCredentials $ServiceAdminCredentials -EnvironmentName $SvcAdminEnvironmentName -region $ResourceLocation
283+
Get-AzsUpdate -Location $ResourceLocation
284284
}
285285
}
286286

@@ -290,7 +290,7 @@ while ($runCount -le $NumberOfIterations)
290290
{
291291
if (-not (Get-AzureRmVMImage -Location $ResourceLocation -PublisherName "MicrosoftWindowsServer" -Offer "WindowsServer" -Sku "2016-Datacenter-Core" -ErrorAction SilentlyContinue))
292292
{
293-
New-Server2016VMImage -ISOPath $WindowsISOPath -TenantId $TenantID -EnvironmentName $SvcAdminEnvironmentName -Location $ResourceLocation -Version Core -AzureStackCredentials $ServiceAdminCredentials -CreateGalleryItem $false
293+
New-AzsServer2016VMImage -ISOPath $WindowsISOPath -Location $ResourceLocation -Version Core -CreateGalleryItem $false
294294
}
295295
}
296296
}
@@ -447,7 +447,7 @@ while ($runCount -le $NumberOfIterations)
447447
{
448448
$resourceProviders = Get-AzureRmResourceProvider -ListAvailable
449449
# Some of the RPs have not implemented their operations API yet. So update this exclusion list whenever any RP implements its operations API
450-
$rpOperationsExclusionList = @("Microsoft.Compute", "Microsoft.Commerce", "Microsoft.Gallery", "Microsoft.Insights")
450+
$rpOperationsExclusionList = @("Microsoft.Commerce", "Microsoft.Gallery", "Microsoft.Insights")
451451
$totalOperationsPerRP = @()
452452
foreach($rp in $resourceProviders)
453453
{
@@ -1120,10 +1120,9 @@ while ($runCount -le $NumberOfIterations)
11201120
{
11211121
if (Get-AzureRmVMImage -Location $ResourceLocation -PublisherName $linuxImagePublisher -Offer $linuxImageOffer -Sku $LinuxOSSku -ErrorAction SilentlyContinue)
11221122
{
1123-
Remove-VMImage -publisher $linuxImagePublisher -offer $linuxImageOffer -sku $LinuxOSSku -version $linuxImageVersion -tenantID $TenantID -EnvironmentName $SvcAdminEnvironmentName -Location $ResourceLocation -AzureStackCredentials $ServiceAdminCredentials
1123+
Remove-AzsVMImage -publisher $linuxImagePublisher -offer $linuxImageOffer -sku $LinuxOSSku -version $linuxImageVersion -Location $ResourceLocation
11241124
}
11251125
}
1126-
11271126
Invoke-Usecase -Name 'DeleteSubscriptionResourceGroup' -Description "Delete the resource group that contains subscription resources" -UsecaseBlock `
11281127
{
11291128
if ($removeRG = Get-AzureRmResourceGroup -Name $subscriptionRGName -ErrorAction Stop)

CanaryValidator/README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ Canary validator provides a breadth customer experience with the Azure Stack dep
44
Instructions are relative to the .\CanaryValidator directory.
55
Canary can be invoked either as Service Administrator or Tenant Administrator.
66

7-
# Download Canary
7+
## Download Canary
8+
89
```powershell
910
Invoke-WebRequest https://github.com/Azure/AzureStack-Tools/archive/master.zip -OutFile master.zip
1011
Expand-Archive master.zip -DestinationPath . -Force
1112
Set-Location -Path ".\AzureStack-Tools-master\CanaryValidator" -PassThru
1213
```
1314

14-
# To execute Canary as Tenant Administrator (if Windows Server 2016 or Windows Server 2012-R2 images are already present in the PIR)
15+
## To execute Canary as Tenant Administrator (if Windows Server 2016 or Windows Server 2012-R2 images are already present in the PIR)
16+
1517
```powershell
1618
# Install-Module -Name 'AzureRm.Bootstrapper' -Scope CurrentUser
1719
# Install-AzureRmProfile -profile '2017-03-09-profile' -Force -Scope CurrentUser
@@ -21,7 +23,8 @@ $ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Ser
2123
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "<Tenant ARM endpoint>" -TenantAdminCredentials $TenantAdminCreds
2224
```
2325

24-
# To execute Canary as Tenant Administrator (if Windows Server 2016 or Windows Server 2012-R2 images are not present in PIR)
26+
## To execute Canary as Tenant Administrator (if Windows Server 2016 or Windows Server 2012-R2 images are not present in PIR)
27+
2528
```powershell
2629
# Download the WS2016 ISO image from: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016, and place it on your local machine
2730
# Install-Module -Name 'AzureRm.Bootstrapper' -Scope CurrentUser
@@ -32,7 +35,8 @@ $ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Ser
3235
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "<Tenant ARM endpoint>" -TenantAdminCredentials $TenantAdminCreds -WindowsISOPath "<path where the WS2016 ISO is present>"
3336
```
3437

35-
# To execute Canary as Service Administrator
38+
## To execute Canary as Service Administrator
39+
3640
```powershell
3741
# Install-Module -Name 'AzureRm.Bootstrapper' -Scope CurrentUser
3842
# Install-AzureRmProfile -profile '2017-03-09-profile' -Force -Scope CurrentUser
@@ -41,7 +45,8 @@ $ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Ser
4145
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds
4246
```
4347

44-
# To list the usecases in Canary
48+
## To list the usecases in Canary
49+
4550
```powershell
4651
# Install-Module -Name 'AzureRm.Bootstrapper' -Scope CurrentUser
4752
# Install-AzureRmProfile -profile '2017-03-09-profile' -Force -Scope CurrentUser
@@ -126,7 +131,8 @@ List of scenarios in Canary:
126131
|--DeleteSubscriptionResourceGroup
127132
```
128133

129-
# To exclude certain usecases from getting executed
134+
## To exclude certain usecases from getting executed
135+
130136
```powershell
131137
# Install-Module -Name 'AzureRm.Bootstrapper' -Scope CurrentUser
132138
# Install-AzureRmProfile -profile '2017-03-09-profile' -Force -Scope CurrentUser
@@ -136,16 +142,17 @@ $ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Ser
136142
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds -ExclusionList "ListFabricResourceProviderInfo","ListUpdateResourceProviderInfo"
137143
```
138144

139-
# Reading the results & logs
145+
## Reading the results & logs
146+
140147
Canary generates log files in the TMP directory ($env:TMP). The logs can be found under the directory "CanaryLogs[DATETIME]". There are two types of logs generated, a text log and a JSON log. JSON log provides a quick and easy view of all the usecases and their corresponding results. Text log provides a more detailed output of each usecase execution, its output and results.
141148

142149
Each usecase entry in the JSON log consists of the following fields.
150+
143151
- Name
144152
- Description
145153
- StartTime
146154
- EndTime
147155
- Result
148156
- Exception (in case a scenario fails)
149157

150-
The exception field is helpful to debug failed usecases.
151-
158+
The exception field is helpful to debug failed use cases.

0 commit comments

Comments
 (0)