83 строки
4.0 KiB
JSON
83 строки
4.0 KiB
JSON
{
|
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.16.8.5",
|
|
"parameters": {
|
|
"TestControllerVMName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "Name of the existing test controller VM resource to use"
|
|
},
|
|
"defaultValue": "sprg-tc-0"
|
|
},
|
|
"TargetSPServerVMName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "Name of the existing SharePoint server VM resource to test"
|
|
},
|
|
"defaultValue": "sprg-sp-0"
|
|
},
|
|
"TargetSPSiteURL": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "URL of the SharePoint end point to test."
|
|
},
|
|
"defaultValue": "http://sprg-sp-0.contoso.com"
|
|
},
|
|
"TargetSPTestUserName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "User name an existing user account to be used for load testing. User must have access to the target SharePoint endpoint."
|
|
},
|
|
"defaultValue": "spadmin@contoso.com"
|
|
},
|
|
"TargetSPTestUserPassword": {
|
|
"type": "securestring",
|
|
"metadata": {
|
|
"description": "Password of the user account to be used for lad testing."
|
|
}
|
|
},
|
|
"assetLocation": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The location of resources that the template is dependent on such as scripts and load test package"
|
|
},
|
|
"defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/sharepoint-2013-sample-loadtest"
|
|
}
|
|
},
|
|
"variables": {
|
|
"DownloadLoadTestPackageScriptName": "DownloadLoadTestPackage.ps1",
|
|
"DownloadLoadTestPackageScriptURL": "[concat(parameters('assetLocation'),'/',variables('DownloadLoadTestPackageScriptName'))]",
|
|
"PrepareSampleLTForRunScriptName": "PrepareSampleLTForRun.ps1",
|
|
"PrepareSampleLTForRunScriptURL": "[concat(parameters('assetLocation'),'/',variables('PrepareSampleLTForRunScriptName'))]",
|
|
"StartLoadTestRunScriptName": "StartLoadTestRun.ps1",
|
|
"StartLoadTestRunScriptURL": "[concat(parameters('assetLocation'),'/',variables('StartLoadTestRunScriptName'))]",
|
|
"RunnerScriptName": "ScriptExtensionRunner.ps1",
|
|
"RunnerScriptURL": "[concat(parameters('assetLocation'),'/',variables('RunnerScriptName'))]",
|
|
"LoadTestPackageURL": "[concat(parameters('assetLocation'),'/SPSampleLT.zip')]",
|
|
"LoadTestUnpackLocation": "%SystemDrive%\\LoadTests\\SPSampleLT"
|
|
},
|
|
"resources": [
|
|
{
|
|
"type": "Microsoft.Compute/virtualMachines/extensions",
|
|
"name": "[concat(parameters('TestControllerVMName'),'/RunSampleLoadTest')]",
|
|
"apiVersion": "2015-06-15",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"publisher": "Microsoft.Compute",
|
|
"type": "CustomScriptExtension",
|
|
"typeHandlerVersion": "1.8",
|
|
"autoUpgradeMinorVersion": "true",
|
|
"settings": {
|
|
"fileUris": [
|
|
"[variables('DownloadLoadTestPackageScriptURL')]",
|
|
"[variables('PrepareSampleLTForRunScriptURL')]",
|
|
"[variables('StartLoadTestRunScriptURL')]",
|
|
"[variables('RunnerScriptURL')]"
|
|
],
|
|
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -file ',variables('RunnerScriptName'),' ',variables('LoadTestPackageURL'),' ',variables('LoadTestUnpackLocation'),' ',parameters('TargetSPSiteURL'),' ',parameters('TargetSPServerVMName'),' ',parameters('TargetSPTestUserName'),' ',parameters('TargetSPTestUserPassword'),' ',parameters('TestControllerVMName'))]"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"outputs": {}
|
|
} |