Skip to content

Commit

Permalink
Disable Batch pool virtual network for dev environment (#2559)
Browse files Browse the repository at this point in the history
#### Details

Disable Batch pool virtual network for dev environment.

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->

- [ ] Addresses an existing issue: Fixes #0000
- [ ] Added relevant unit test for your changes. (`yarn test`)
- [ ] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [ ] Ran precheckin (`yarn precheckin`)
- [x] Validated in an Azure resource group
  • Loading branch information
lamaks committed Jul 10, 2024
1 parent e25e1f8 commit 0fc9f3b
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 62 deletions.
7 changes: 4 additions & 3 deletions packages/resource-deployment/scripts/create-batch-account.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ batchTemplateFile="${0%/*}/../templates/batch-account.template.json"

exitWithUsageInfo() {
echo "
Usage: ${BASH_SOURCE} -r <resource group> -e <environment> [-t <batch template file (optional)>] [-d <pass \"true\" to force pools to drop>]
Usage: ${BASH_SOURCE} -r <resource group> -e <environment> -b <Azure Batch object ID> [-t <batch template file (optional)>] [-d <pass \"true\" to force pools to drop>]
"
exit 1
}
Expand Down Expand Up @@ -67,18 +67,19 @@ function deployBatch() {
}

# Read script arguments
while getopts ":r:t:e:d:" option; do
while getopts ":r:t:e:d:b:" option; do
case $option in
r) resourceGroupName=${OPTARG} ;;
t) batchTemplateFile=${OPTARG} ;;
e) environment=${OPTARG} ;;
d) dropPools=${OPTARG} ;;
b) azureBatchObjectId=${OPTARG} ;;
*) exitWithUsageInfo ;;
esac
done

# Print script usage help
if [[ -z $resourceGroupName ]] || [[ -z $batchTemplateFile ]] || [[ -z $environment ]]; then
if [[ -z $resourceGroupName ]] || [[ -z $batchTemplateFile ]] || [[ -z $environment ]] || [[ -z $azureBatchObjectId ]]; then
exitWithUsageInfo
fi

Expand Down
2 changes: 1 addition & 1 deletion packages/resource-deployment/scripts/create-key-vault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ setupKeyVaultResourcesTemplateFile="${0%/*}/../templates/key-vault-setup-resourc

exitWithUsageInfo() {
echo "
Usage: ${BASH_SOURCE} -r <resource group> -c <web API client ID> [-e <environment>]
Usage: ${BASH_SOURCE} -r <resource group> -c <web API client ID> -b <Azure Batch object ID> [-e <environment>]
"
exit 1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environment": {
"value": "dev"
},
"onDemandScanRequestPoolNodes": {
"value": "1"
},
"onDemandScanRequestPoolVmSize": {
"value": "standard_e8d_v5"
"value": "standard_e8ds_v5"
},
"onDemandScanRequestPoolTaskSlotsPerNode": {
"value": "8"
Expand All @@ -15,7 +18,7 @@
"value": "1"
},
"onDemandUrlScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"onDemandUrlScanPoolTaskSlotsPerNode": {
"value": "2"
Expand All @@ -24,7 +27,7 @@
"value": "1"
},
"privacyScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"privacyScanPoolTaskSlotsPerNode": {
"value": "4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environment": {
"value": "ppe"
},
"onDemandScanRequestPoolNodes": {
"value": "2"
},
"onDemandScanRequestPoolVmSize": {
"value": "standard_e8d_v5"
"value": "standard_e8ds_v5"
},
"onDemandScanRequestPoolTaskSlotsPerNode": {
"value": "8"
Expand All @@ -15,7 +18,7 @@
"value": "2"
},
"onDemandUrlScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"onDemandUrlScanPoolTaskSlotsPerNode": {
"value": "2"
Expand All @@ -24,7 +27,7 @@
"value": "6"
},
"privacyScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"privacyScanPoolTaskSlotsPerNode": {
"value": "4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environment": {
"value": "ppe"
},
"onDemandScanRequestPoolNodes": {
"value": "2"
},
"onDemandScanRequestPoolVmSize": {
"value": "standard_e8d_v5"
"value": "standard_e8ds_v5"
},
"onDemandScanRequestPoolTaskSlotsPerNode": {
"value": "8"
Expand All @@ -15,7 +18,7 @@
"value": "6"
},
"onDemandUrlScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"onDemandUrlScanPoolTaskSlotsPerNode": {
"value": "2"
Expand All @@ -24,7 +27,7 @@
"value": "2"
},
"privacyScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"privacyScanPoolTaskSlotsPerNode": {
"value": "4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environment": {
"value": "prod"
},
"onDemandScanRequestPoolNodes": {
"value": "2"
},
"onDemandScanRequestPoolVmSize": {
"value": "standard_e8d_v5"
"value": "standard_e8ds_v5"
},
"onDemandScanRequestPoolTaskSlotsPerNode": {
"value": "8"
Expand All @@ -15,7 +18,7 @@
"value": "2"
},
"onDemandUrlScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"onDemandUrlScanPoolTaskSlotsPerNode": {
"value": "2"
Expand All @@ -24,7 +27,7 @@
"value": "19"
},
"privacyScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"privacyScanPoolTaskSlotsPerNode": {
"value": "4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environment": {
"value": "prod"
},
"onDemandScanRequestPoolNodes": {
"value": "4"
},
"onDemandScanRequestPoolVmSize": {
"value": "standard_e8d_v5"
"value": "standard_e8ds_v5"
},
"onDemandScanRequestPoolTaskSlotsPerNode": {
"value": "8"
Expand All @@ -15,7 +18,7 @@
"value": "15"
},
"onDemandUrlScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"onDemandUrlScanPoolTaskSlotsPerNode": {
"value": "2"
Expand All @@ -24,7 +27,7 @@
"value": "2"
},
"privacyScanPoolVmSize": {
"value": "standard_e4d_v5"
"value": "standard_e4ds_v5"
},
"privacyScanPoolTaskSlotsPerNode": {
"value": "4"
Expand Down
Loading

0 comments on commit 0fc9f3b

Please sign in to comment.