-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nested-VM-Perf-Azure-Parallel.txt
362 lines (293 loc) · 13.2 KB
/
Nested-VM-Perf-Azure-Parallel.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
def location = "${env.location}"
// L2 VM image
def nestedImageUrl = "${env.NestedImageUrl}"
def nested_KVM_image_qcow2 = ""
def nested_HyperV_image_vhd = ""
def raidOption = "${env.RaidOption}"
def List<String>raidOptionsToBeTested = new ArrayList<String>()
// L1 VM image
def armImageName = "${env.ARMImageName}"
def armImage_HyperV = ""
def armImage_KVM = ""
def vmSize = "${env.VMSize}"
def RunPowershellCommand(psCmd) {
println "Command: ${psCmd}"
bat "powershell.exe -NonInteractive -ExecutionPolicy Bypass -Command \"[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;$psCmd;EXIT \$global:LastExitCode\""
}
def UpdateTestParameters( String paras) {
withCredentials(bindings: [
string(credentialsId: 'NestedKVM_User', variable: 'NestedKVM_User'),
string(credentialsId: 'NestedKVM_Password', variable: 'NestedKVM_Password'),
file(credentialsId: 'AzureCredential', variable: 'AzureCredential')]) {
echo "${AzureCredential}"
cleanWs()
git poll: false, changelog: false, url: "https://github.com/LIS/LISAv2.git", branch: "master"
String command = '.\\Utilities\\UpdateNestedTestParameters.ps1 '
command += " -NestedUser '${NestedKVM_User}'"
command += " -NestedUserPassword '${NestedKVM_Password}'"
command += paras
RunPowershellCommand(command)
}
}
pipeline {
parameters {
choice(choices: 'No RAID\nRAID in L1\nRAID in L2\nALL', description: 'raid option', name: 'RaidOption')
choice(choices: 'Standard_D16s_v3\nStandard_D32s_v3\nStandard_D64s_v3', description: 'It ONLY works for storage test with MULTIPLE disks.', name: 'VMSize')
string(defaultValue: "https://xhxlongtermst.blob.core.windows.net/vhds/nested-ubuntu-4.15.0-23-generic-noop-azure.vhd,https://lizstoragesoutheastasia.blob.core.windows.net/nested/nested-ubuntu-4.15.0-23-generic-noop.qcow2", description: 'nested image url for test', name: 'NestedImageUrl')
string(defaultValue: "MicrosoftWindowsServer WindowsServer 2016-Datacenter latest,canonical ubuntuserver 18.04-lts Latest", description: 'The image name using for L1 VM.', name: 'ARMImageName')
booleanParam(defaultValue: false, description: 'Enable the multiple disks test against storage perf if it is true.', name: 'Storage_MultiDisks')
booleanParam(defaultValue: false, description: 'Enable the single disk test against storage perf if it is true.', name: 'Storage_SingleDisk')
booleanParam(defaultValue: false, description: 'Enable the network of private bridge test if it is true.', name: 'Network_Private')
booleanParam(defaultValue: true, description: 'Enable the Network_NTTTCP_DIFFERENT_L1_NAT test if it is true.', name: 'Network_NAT')
choice(choices: 'westcentralus\nwestus\neastus2\naustraliaeast\nsoutheastasia\neastus', description: 'Data center location.', name: 'location')
}
agent {
node {
label '43f23-36'
}
}
stages {
stage('Prepare test parameters') {
steps {
script {
def nestedImages = nestedImageUrl.split(",")
for( image in nestedImages ){
if( image.toString().endsWith("qcow2") ){
nested_KVM_image_qcow2 = image
println "The KVM image: $nested_KVM_image_qcow2"
}
if( image.toString().endsWith(".vhd") ){
nested_HyperV_image_vhd = image
println "The HyperV image: $nested_HyperV_image_vhd"
}
}
def armImages = armImageName.split(",")
for( armImage in armImages ){
if( armImage.toString().contains("MicrosoftWindowsServer") ){
armImage_HyperV = armImage
} else {
armImage_KVM = armImage
}
}
if( armImage_KVM ) {
println "The arm image of KVM: $armImage_KVM"
}
if( armImage_HyperV ) {
println "The arm image of HyperV: $armImage_HyperV"
}
if( raidOption!='ALL'){
raidOptionsToBeTested.add("${raidOption}")
} else {
raidOptionsToBeTested.add('No RAID')
raidOptionsToBeTested.add('RAID in L1')
raidOptionsToBeTested.add('RAID in L2')
}
println "The following raid option(s) will be tested:"
for (int i = 0; i < raidOptionsToBeTested.size(); i++) {
println " ${raidOptionsToBeTested[i]}"
}
}
}
}
stage("Test Storage and Network"){
parallel {
stage("Storage Test") {
agent{ label '43f23-36' }
stages {
stage('Single Disk Perf Test of Nested HyperV dependencies') {
when {
expression { env.Storage_SingleDisk.contains('true') && nested_HyperV_image_vhd }
}
steps {
script {
withCredentials(bindings: [
file(credentialsId: 'AzureCredential', variable: 'AzureCredential')]) {
String testParas = " -RaidOption 'No RAID'"
testParas += " -NestedImageUrl '${nested_HyperV_image_vhd}'"
testParas += " -TestName AZURE-WINDOWS-NESTED-HYPERV-STORAGE-SINGLE-DISK "
UpdateTestParameters(testParas)
$cmd = ".\\Run-LisaV2.ps1"
$cmd += " -TestPlatform 'Azure'"
$cmd += " -testLocation '${location}'"
$cmd += " -TestArea 'Storage'"
$cmd += " -TestCategory 'Performance'"
$cmd += " -TestNames 'AZURE-WINDOWS-NESTED-HYPERV-STORAGE-SINGLE-DISK'"
$cmd += " -ARMImageName '${armImage_HyperV}'"
$cmd += " -StorageAccount 'NewStorage_Premium'"
$cmd += " -RGIdentifier 'nested'"
$cmd += " -XMLSecretFile '${AzureCredential}' -UpdateGlobalConfigurationFromSecretsFile"
$cmd += " -ResultDBTable 'Nested_Hyperv_Storage_Perf'"
$cmd += " -ResultDBTestTag 'AZURE-WINDOWS-NESTED-HYPERV-STORAGE-SINGLE-DISK'"
RunPowershellCommand($cmd)
}
}
}
}
stage('Multiple Disks Perf Test of Nested HyperV dependencies') {
when {
expression { env.Storage_MultiDisks.contains('true') && nested_HyperV_image_vhd }
}
steps {
script {
withCredentials(bindings: [
file(credentialsId: 'AzureCredential', variable: 'AzureCredential')]) {
for (int i = 0; i < raidOptionsToBeTested.size(); i++) {
String testParas = " -RaidOption '${raidOptionsToBeTested[i]}'"
testParas += " -NestedImageUrl '${nested_HyperV_image_vhd}'"
testParas += " -TestName AZURE-WINDOWS-NESTED-HYPERV-STORAGE-MULTIDISK "
if(vmSize != 'Standard_D16s_v3'){
testParas += " -setupType D32SV3DISK12 "
}
UpdateTestParameters(testParas)
$cmd = ".\\Run-LisaV2.ps1"
$cmd += " -TestPlatform 'Azure'"
$cmd += " -testLocation '${location}'"
$cmd += " -TestArea 'Storage'"
$cmd += " -TestCategory 'Performance'"
$cmd += " -TestNames 'AZURE-WINDOWS-NESTED-HYPERV-STORAGE-MULTIDISK'"
$cmd += " -ARMImageName '${armImage_HyperV}'"
$cmd += " -StorageAccount 'NewStorage_Premium'"
$cmd += " -RGIdentifier 'nested'"
$cmd += " -XMLSecretFile '${AzureCredential}' -UpdateGlobalConfigurationFromSecretsFile"
$cmd += " -OverrideVMSize '${vmSize}'"
$cmd += " -ResultDBTable 'Nested_Hyperv_Storage_Perf'"
$cmd += " -ResultDBTestTag 'AZURE-WINDOWS-NESTED-HYPERV-STORAGE-MULTIDISK'"
RunPowershellCommand($cmd)
}
}
}
}
}
stage('Single Disk Perf Test of Nested KVM dependencies') {
when {
expression { env.Storage_SingleDisk.contains('true') && nested_KVM_image_qcow2 && armImage_KVM }
}
steps {
script {
withCredentials(bindings: [
file(credentialsId: 'AzureCredential', variable: 'AzureCredential')]) {
String testParas = " -RaidOption 'No RAID' "
testParas += " -NestedImageUrl '${nested_KVM_image_qcow2}' "
testParas += " -TestName AZURE-NESTED-KVM-STORAGE-SINGLE-DISK "
UpdateTestParameters(testParas)
$cmd = ".\\Run-LisaV2.ps1"
$cmd += " -TestPlatform 'Azure'"
$cmd += " -testLocation '${location}'"
$cmd += " -TestArea 'Nested'"
$cmd += " -TestCategory 'Performance'"
$cmd += " -TestNames 'AZURE-NESTED-KVM-STORAGE-SINGLE-DISK'"
$cmd += " -ARMImageName '${armImage_KVM}'"
$cmd += " -StorageAccount 'NewStorage_Premium'"
$cmd += " -RGIdentifier 'nested'"
$cmd += " -XMLSecretFile '${AzureCredential}' -UpdateGlobalConfigurationFromSecretsFile"
$cmd += " -OverrideVMSize '${vmSize}'"
$cmd += " -ResultDBTable 'Nested_KVM_Storage_Perf'"
$cmd += " -ResultDBTestTag 'AZURE-NESTED-KVM-STORAGE-SINGLE-DISK'"
RunPowershellCommand($cmd)
}
}
}
}
stage('Multiple Disks Perf Test of Nested KVM dependencies') {
when {
expression { env.Storage_MultiDisks.contains('true') && nested_KVM_image_qcow2 && armImage_KVM }
}
steps {
script {
withCredentials(bindings: [
file(credentialsId: 'AzureCredential', variable: 'AzureCredential')]) {
for (int i = 0; i < raidOptionsToBeTested.size(); i++) {
String testParas = " -RaidOption '${raidOptionsToBeTested[i]}'"
testParas += " -NestedImageUrl '${nested_KVM_image_qcow2}'"
testParas += " -TestName AZURE-NESTED-KVM-STORAGE-MULTIDISK "
if(vmSize != 'Standard_D16s_v3'){
testParas += " -setupType D32SV3DISK12 "
}
UpdateTestParameters(testParas)
$cmd = ".\\Run-LisaV2.ps1"
$cmd += " -TestPlatform 'Azure'"
$cmd += " -testLocation '${location}'"
$cmd += " -TestArea 'Nested'"
$cmd += " -TestCategory 'Performance'"
$cmd += " -TestNames 'AZURE-NESTED-KVM-STORAGE-MULTIDISK'"
$cmd += " -ARMImageName '${armImage_KVM}'"
$cmd += " -StorageAccount 'NewStorage_Premium'"
$cmd += " -RGIdentifier 'nested'"
$cmd += " -XMLSecretFile '${AzureCredential}' -UpdateGlobalConfigurationFromSecretsFile"
$cmd += " -OverrideVMSize '${vmSize}'"
$cmd += " -ResultDBTable 'Nested_KVM_Storage_Perf'"
$cmd += " -ResultDBTestTag 'AZURE-NESTED-KVM-STORAGE-MULTIDISK'"
RunPowershellCommand($cmd)
}
}
}
}
}
}
}
stage("Network Test") {
agent{ label '43f23-36' }
stages{
stage('Private Network of Nested KVM dependencies') {
when {
expression { env.Network_Private.contains('true') && nested_KVM_image_qcow2 && armImage_KVM }
}
steps {
script {
withCredentials(bindings: [
file(credentialsId: 'AzureCredential', variable: 'AzureCredential')]) {
String testParas = " -NestedImageUrl '${nested_KVM_image_qcow2}'"
testParas += " -TestName NESTED-KVM-NTTTCP-PRIVATE-BRIDGE "
UpdateTestParameters(testParas)
$cmd = ".\\Run-LisaV2.ps1"
$cmd += " -TestPlatform 'Azure'"
$cmd += " -testLocation '${location}'"
$cmd += " -TestArea 'Nested'"
$cmd += " -TestCategory 'Performance'"
$cmd += " -TestNames 'NESTED-KVM-NTTTCP-PRIVATE-BRIDGE'"
$cmd += " -ARMImageName '${armImage_KVM}'"
$cmd += " -StorageAccount 'NewStorage_Premium'"
$cmd += " -RGIdentifier 'nested'"
$cmd += " -XMLSecretFile '${AzureCredential}' -UpdateGlobalConfigurationFromSecretsFile"
$cmd += " -ResultDBTable 'Nested_KVM_NTTTCP_SAME_L1'"
$cmd += " -ResultDBTestTag 'NESTED-KVM-NTTTCP-PRIVATE-BRIDGE'"
RunPowershellCommand($cmd)
}
}
}
}
stage('Network of Network_NAT dependencies') {
when {
expression { env.Network_NAT.contains('true') && nested_KVM_image_qcow2 && armImage_KVM }
}
steps {
script {
withCredentials(bindings: [
file(credentialsId: 'AzureCredential', variable: 'AzureCredential')]) {
String testParas = " -NestedImageUrl '${nested_KVM_image_qcow2}'"
testParas += " -TestName AZURE-NESTED-KVM-NTTTCP-DIFFERENT-L1-NAT "
UpdateTestParameters(testParas)
$cmd = ".\\Run-LisaV2.ps1"
$cmd += " -TestPlatform 'Azure'"
$cmd += " -testLocation '${location}'"
$cmd += " -TestArea 'Nested'"
$cmd += " -TestCategory 'Performance'"
$cmd += " -TestNames 'AZURE-NESTED-KVM-NTTTCP-DIFFERENT-L1-NAT'"
$cmd += " -ARMImageName '${armImage_KVM}'"
$cmd += " -StorageAccount 'NewStorage_Premium'"
$cmd += " -RGIdentifier 'nested'"
$cmd += " -XMLSecretFile '${AzureCredential}' -UpdateGlobalConfigurationFromSecretsFile"
$cmd += " -UseManagedDisks -OverrideVMSize Standard_D16s_v3"
$cmd += " -ResultDBTable 'Nested_KVM_NTTTCP_NAT'"
$cmd += " -ResultDBTestTag 'AZURE-NESTED-KVM-NTTTCP-DIFFERENT-L1-NAT'"
RunPowershellCommand($cmd)
}
}
}
}
}
}
}
}
}
}