Skip to content

Commit d4c7f51

Browse files
authored
Custom Naming release (Azure#266)
1 parent e98c9a7 commit d4c7f51

24 files changed

+7089
-1712
lines changed

AVS-Landing-Zone/GreenField/PortalUI/ARM/ESLZDeploy.deploy.json

+3,598-1,025
Large diffs are not rendered by default.

AVS-Landing-Zone/GreenField/PortalUI/ARM/ESLZdeploy.PortalUI.json

+770-341
Large diffs are not rendered by default.

AVS-Landing-Zone/GreenField/PortalUI/Bicep/ESLZDeploy.bicep

+107-52
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ param Location string = deployment().location
1010
//Private Cloud
1111
@description('Set this to false if the Private Cloud already exists')
1212
param DeployPrivateCloud bool = false
13+
@description('Optional: The location the private cloud should be deployed to, by default this will be the location of the deployment')
14+
param PrivateCloudName string = '${Prefix}-sddc'
15+
@description('Optional: The location the private cloud should be deployed to, by default this will be the location of the deployment')
16+
param PrivateCloudResourceGroupName string = '${Prefix}-PrivateCloud'
1317
@description('The address space used for the AVS Private Cloud management networks. Must be a non-overlapping /22')
1418
param PrivateCloudAddressSpace string = ''
1519
@description('The SKU that should be used for the first cluster, ensure you have quota for the given SKU before deploying')
@@ -29,26 +33,22 @@ param ExistingPrivateCloudName string = ''
2933
param ExistingPrivateCloudResourceId string = ''
3034

3135
//Azure Networking
32-
@description('Set this to true if you are redeploying, and the VNet already exists')
33-
param VNetExists bool = false
3436
@description('A string value to skip the networking deployment')
3537
param DeployNetworking bool = false
3638
@description('Set this to true if you are redeploying, and the VNet already exists')
37-
param GatewayExists bool = false
38-
@description('Does the GatewaySubnet Exist')
39-
param GatewaySubnetExists bool = false
39+
param VNetExists bool = false
40+
@description('The address space used for the VNet attached to AVS. Must be non-overlapping with existing networks')
41+
param NewNetworkResourceGroupName string = '${Prefix}-Network'
42+
@description('The address space used for the VNet attached to AVS. Must be non-overlapping with existing networks')
43+
param NewNetworkName string = '${Prefix}-vnet'
4044
@description('The address space used for the VNet attached to AVS. Must be non-overlapping with existing networks')
4145
param NewVNetAddressSpace string = ''
4246
@description('The subnet CIDR used for the Gateway Subnet. Must be a /24 or greater within the VNetAddressSpace')
4347
param NewVnetNewGatewaySubnetAddressPrefix string = ''
44-
@description('The Existing VNet name')
45-
param ExistingVnetName string = ''
48+
@description('The Existing Gateway name')
49+
param ExistingNetworkResourceId string = ''
4650
@description('The Existing Gateway name')
4751
param ExistingGatewayName string = ''
48-
@description('The existing vnet gatewaysubnet id')
49-
param ExistingGatewaySubnetId string = ''
50-
@description('The existing vnet new gatewaysubnet prefix')
51-
param ExistingVnetNewGatewaySubnetPrefix string = ''
5252

5353
//Jumpbox
5454
@description('Should a Jumpbox & Bastion be deployed to access the Private Cloud')
@@ -61,35 +61,56 @@ param JumpboxPassword string = ''
6161
@description('The subnet CIDR used for the Jumpbox VM Subnet. Must be a /26 or greater within the VNetAddressSpace')
6262
param JumpboxSubnet string = ''
6363
@description('The sku to use for the Jumpbox VM, must have quota for this within the target region')
64-
param JumpboxSku string = 'Standard_D2s_v3'
64+
param JumpboxSku string = 'Standard_B2ms'
65+
@description('Set the OS version to use')
66+
@allowed([
67+
'win2022'
68+
'win2019'
69+
'win11'
70+
'win11ms'
71+
'ubuntu2004gen2'
72+
])
73+
param operatingSystemSKU string = 'win2019'
74+
75+
76+
//Jumpbox Bootstrap OS
77+
param BootstrapJumpboxVM bool = false
78+
@description('The path for Jumpbox VM bootstrap PowerShell script file (expecting "bootstrap.ps1" file)')
79+
param BootstrapPath string = 'https://raw.githubusercontent.com/shaunjacob/AVSLevelUpFY23/master/LevelUp/LZwtihAVS/Bicep/Bootstrap.ps1'
80+
@description('The command to trigger running the bootstrap script. If was not provided, then the expected script file name must be "bootstrap.ps1")')
81+
param BootstrapCommand string = 'powershell.exe -ExecutionPolicy Unrestricted -File bootstrap.ps1'
6582
@description('The subnet CIDR used for the Bastion Subnet. Must be a /26 or greater within the VNetAddressSpace')
6683
param BastionSubnet string = ''
6784

68-
//On-premise Networking
69-
@description('A boolean flag to deploy a Route Serrver or skip')
70-
param DeployRouteServer bool = false
71-
@description('A boolean flag to deploy a Route Serrver or skip')
72-
param RouteServerVNetName string = ''
73-
@description('Does a RouteServerSubnet exists?')
74-
param RouteServerSubnetExists bool = false
75-
@description('Flag to check onpremise connectivity method, ExpressRoute or VPN')
76-
param OnPremConnectivity string = ''
77-
@description('The subnet CIDR used for the RouteServer Subnet')
78-
param RouteServerSubnetPrefix string = ''
79-
80-
//Monitoring
81-
@description('Deploy AVS Dashboard')
85+
// Monitoring Module Parameters
86+
param MonitoringResourceGroupName string = '${Prefix}-Operational'
87+
param DeployMonitoring bool = false
8288
param DeployDashboard bool = false
83-
@description('Deploy Azure Monitor metric alerts for your AVS Private Cloud')
8489
param DeployMetricAlerts bool = false
85-
@description('Deploy Service Health Alerts for AVS')
8690
param DeployServiceHealth bool = false
87-
@description('Email addresses to be added to the alerting action group. Use the format ["[email protected]","[email protected]"].')
8891
param AlertEmails string = ''
92+
param CPUUsageThreshold int = 60
93+
param MemoryUsageThreshold int = 60
94+
param StorageUsageThreshold int = 60
95+
96+
//Diagnostic Module Parameters
97+
param LoggingResourceGroupName string = '${Prefix}-Operational'
98+
param DeployDiagnostics bool = false
99+
param EnableAVSLogsWorkspaceSetting bool = false
100+
param DeployActivityLogDiagnostics bool = false
101+
param EnableAVSLogsStorageSetting bool = false
102+
param DeployWorkbook bool = false
103+
param DeployWorkspace bool = false
104+
param NewWorkspaceName string = '${Prefix}-log'
105+
param NewStorageAccountName string = ''
106+
param DeployStorageAccount bool = false
107+
param ExistingWorkspaceId string = ''
108+
param ExistingStorageAccountId string = ''
109+
param StorageRetentionDays int = 1
89110

90111
//Addons
91112
@description('Should HCX be deployed as part of the deployment')
92-
param DeployHCX bool = true
113+
param DeployHCX bool = false
93114
@description('Should SRM be deployed as part of the deployment')
94115
param DeploySRM bool = false
95116
@description('License key to be used if SRM is deployed')
@@ -102,15 +123,35 @@ param VRServerCount int = 1
102123
@description('Opt-out of deployment telemetry')
103124
param TelemetryOptOut bool = false
104125

126+
param utc string = utcNow()
127+
105128
//Variables
106129
var deploymentPrefix = 'AVS-${uniqueString(deployment().name, Location)}'
107130
var varCuaid = '1cf4a3e3-529c-4fb2-ba6a-63dff7d71586'
108131

132+
//Custom Naming
133+
@description('Optional. AVS resources custom naming. (Default: false)')
134+
param avsUseCustomNaming bool = true
135+
var PrefixLowercase = toLower(Prefix)
136+
var uniquestorageaccountname = '${PrefixLowercase}${uniqueString(utc)}'
137+
var customPrivateCloudResourceGroupName = avsUseCustomNaming ? PrivateCloudResourceGroupName : '${Prefix}-PrivateCloud'
138+
var customSDDCName = avsUseCustomNaming ? PrivateCloudName : '${Prefix}-sddc'
139+
var customNetworkResourceGroupName = avsUseCustomNaming ? NewNetworkResourceGroupName : '${Prefix}-Network'
140+
var customNetworkName = avsUseCustomNaming ? NewNetworkName : '${Prefix}-vnet'
141+
var customMonitoringResourceGroupName = avsUseCustomNaming ? MonitoringResourceGroupName : '${Prefix}-Operational'
142+
var customLoggingResourceGroupName = avsUseCustomNaming ? LoggingResourceGroupName : '${Prefix}-Operational'
143+
var customWorkspaceName = avsUseCustomNaming ? NewWorkspaceName : '${Prefix}-log'
144+
var customStorageAccountName = avsUseCustomNaming ? NewStorageAccountName : uniquestorageaccountname
145+
146+
147+
109148
module AVSCore 'Modules/AVSCore.bicep' = {
110149
name: '${deploymentPrefix}-AVS'
111150
params: {
112151
Prefix: Prefix
113152
Location: Location
153+
PrivateCloudName: customSDDCName
154+
PrivateCloudResourceGroupName: customPrivateCloudResourceGroupName
114155
PrivateCloudAddressSpace: PrivateCloudAddressSpace
115156
PrivateCloudHostCount: PrivateCloudHostCount
116157
PrivateCloudSKU: PrivateCloudSKU
@@ -125,12 +166,10 @@ module AzureNetworking 'Modules/AzureNetworking.bicep' = if (DeployNetworking) {
125166
Prefix: Prefix
126167
Location: Location
127168
VNetExists: VNetExists
128-
ExistingVnetName : ExistingVnetName
129-
GatewayExists : GatewayExists
169+
NewNetworkName: customNetworkName
170+
NewNetworkResourceGroupName: customNetworkResourceGroupName
171+
ExistingNetworkResourceId : ExistingNetworkResourceId
130172
ExistingGatewayName : ExistingGatewayName
131-
GatewaySubnetExists : GatewaySubnetExists
132-
ExistingGatewaySubnetId : ExistingGatewaySubnetId
133-
ExistingVnetNewGatewaySubnetPrefix : ExistingVnetNewGatewaySubnetPrefix
134173
NewVNetAddressSpace: NewVNetAddressSpace
135174
NewVnetNewGatewaySubnetAddressPrefix: NewVnetNewGatewaySubnetAddressPrefix
136175
}
@@ -148,18 +187,6 @@ module VNetConnection 'Modules/VNetConnection.bicep' = if (DeployNetworking) {
148187
}
149188
}
150189

151-
module RouteServer 'Modules/RouteServer.bicep' = if ((OnPremConnectivity == 'VPN') && (DeployRouteServer)) {
152-
name: '${deploymentPrefix}-RouteServer'
153-
params: {
154-
Prefix: Prefix
155-
Location: Location
156-
VNetName: DeployNetworking ? AzureNetworking.outputs.VNetName : RouteServerVNetName
157-
RouteServerSubnetPrefix : RouteServerSubnetPrefix
158-
RouteServerSubnetExists : RouteServerSubnetExists
159-
}
160-
}
161-
162-
163190
module Jumpbox 'Modules/JumpBox.bicep' = if (DeployJumpbox) {
164191
name: '${deploymentPrefix}-Jumpbox'
165192
params: {
@@ -172,21 +199,49 @@ module Jumpbox 'Modules/JumpBox.bicep' = if (DeployJumpbox) {
172199
BastionSubnet: BastionSubnet
173200
JumpboxSubnet: JumpboxSubnet
174201
JumpboxSku: JumpboxSku
202+
operatingSystemSKU: operatingSystemSKU
203+
BootstrapJumpboxVM: BootstrapJumpboxVM
204+
BootstrapPath: BootstrapPath
205+
BootstrapCommand: BootstrapCommand
175206
}
176207
}
177208

178-
module OperationalMonitoring 'Modules/Monitoring.bicep' = if ((DeployMetricAlerts) || (DeployServiceHealth) || (DeployDashboard)) {
209+
module OperationalMonitoring 'Modules/Monitoring.bicep' = if ((DeployMonitoring)) {
179210
name: '${deploymentPrefix}-Monitoring'
180211
params: {
181212
AlertEmails: AlertEmails
182213
Prefix: Prefix
183-
PrimaryLocation: Location
214+
Location: Location
215+
MonitoringResourceGroupName : customMonitoringResourceGroupName
184216
DeployMetricAlerts : DeployMetricAlerts
185217
DeployServiceHealth : DeployServiceHealth
186218
DeployDashboard : DeployDashboard
187-
PrimaryPrivateCloudName : DeployPrivateCloud ? AVSCore.outputs.PrivateCloudName : ExistingPrivateCloudName
188-
PrimaryPrivateCloudResourceId : DeployPrivateCloud ? AVSCore.outputs.PrivateCloudResourceId : ExistingPrivateCloudResourceId
189-
ExRConnectionResourceId : DeployNetworking ? VNetConnection.outputs.ExRConnectionResourceId : ''
219+
DeployWorkbook : DeployWorkbook
220+
PrivateCloudName : DeployPrivateCloud ? AVSCore.outputs.PrivateCloudName : ExistingPrivateCloudName
221+
PrivateCloudResourceId : DeployPrivateCloud ? AVSCore.outputs.PrivateCloudResourceId : ExistingPrivateCloudResourceId
222+
CPUUsageThreshold: CPUUsageThreshold
223+
MemoryUsageThreshold: MemoryUsageThreshold
224+
StorageUsageThreshold: StorageUsageThreshold
225+
}
226+
}
227+
228+
module Diagnostics 'Modules/Diagnostics.bicep' = if ((DeployDiagnostics)) {
229+
name: '${deploymentPrefix}-Diagnostics'
230+
params: {
231+
Location: Location
232+
LoggingResourceGroupName: customLoggingResourceGroupName
233+
EnableAVSLogsWorkspaceSetting: EnableAVSLogsWorkspaceSetting
234+
DeployActivityLogDiagnostics: DeployActivityLogDiagnostics
235+
EnableAVSLogsStorageSetting: EnableAVSLogsStorageSetting
236+
DeployWorkspace: DeployWorkspace
237+
NewWorkspaceName: customWorkspaceName
238+
DeployStorageAccount: DeployStorageAccount
239+
NewStorageAccountName: customStorageAccountName
240+
PrivateCloudName: DeployPrivateCloud ? AVSCore.outputs.PrivateCloudName : ExistingPrivateCloudName
241+
PrivateCloudResourceId: DeployPrivateCloud ? AVSCore.outputs.PrivateCloudResourceId : ExistingPrivateCloudResourceId
242+
ExistingWorkspaceId: ExistingWorkspaceId
243+
ExistingStorageAccountId: ExistingStorageAccountId
244+
StorageRetentionDays: StorageRetentionDays
190245
}
191246
}
192247

AVS-Landing-Zone/GreenField/PortalUI/Bicep/ESLZDeploy.parameters.json

+41-11
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,55 @@
33
"contentVersion": "1.0.0.0",
44
"parameters": {
55
"Prefix": {
6-
"value": "ESLZ"
6+
"value": "SJTEST2"
7+
},
8+
"DeployPrivateCloud": {
9+
"value": false
10+
},
11+
"PrivateCloudName": {
12+
"value": "SA-SDDC-1"
13+
},
14+
"ExistingPrivateCloudName": {
15+
"value": "SA-SDDC-1"
16+
},
17+
"ExistingPrivateCloudResourceId": {
18+
"value": "/subscriptions/1caa5ab4-523f-4851-952b-1b689c48fae9/resourceGroups/SA-SDDC-1/providers/Microsoft.AVS/privateClouds/SA-SDDC-1"
19+
},
20+
"PrivateCloudResourceGroupName": {
21+
"value": "SA-SDDC-1"
722
},
823
"PrivateCloudAddressSpace": {
9-
"value": "10.0.0.0/22"
24+
"value": "10.20.0.0/22"
1025
},
1126
"PrivateCloudSKU": {
1227
"value": "AV36"
1328
},
1429
"PrivateCloudHostCount": {
1530
"value": 3
1631
},
17-
"VNetAddressSpace": {
18-
"value": "10.1.0.0/16"
32+
"DeployNetworking": {
33+
"value": true
34+
},
35+
"VNetExists": {
36+
"value": false
37+
},
38+
"NewNetworkName": {
39+
"value": "SJTESTNET2-vnet"
40+
},
41+
"NewNetworkResourceGroupName": {
42+
"value": "SJTESTNET2"
43+
},
44+
"NewVNetAddressSpace": {
45+
"value": "10.111.0.0/16"
46+
},
47+
"NewVnetNewGatewaySubnetAddressPrefix": {
48+
"value": "10.111.0.0/24"
1949
},
20-
"VNetGatewaySubnet": {
21-
"value": "10.1.0.0/24"
50+
"ExistingNetworkResourceId": {
51+
"value": "/subscriptions/1caa5ab4-523f-4851-952b-1b689c48fae9/resourceGroups/SJTESTNET1/providers/Microsoft.Network/virtualNetworks/SJTESTNET1-vnet"
52+
},
53+
"ExistingGatewayName": {
54+
"value": "SJTEST2-gw"
2255
},
2356
"AlertEmails": {
2457
"value": "[email protected]"
@@ -33,13 +66,10 @@
3366
"value": "ChangeM3!"
3467
},
3568
"JumpboxSubnet": {
36-
"value": "10.1.1.0/25"
69+
"value": "10.111.2.0/24"
3770
},
3871
"BastionSubnet": {
39-
"value": "10.1.1.128/25"
40-
},
41-
"VNetExists": {
42-
"value": false
72+
"value": "10.111.1.0/24"
4373
}
4474
}
4575
}

AVS-Landing-Zone/GreenField/PortalUI/Bicep/Modules/AVSCore.bicep

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
targetScope = 'subscription'
22

3-
param Location string
43
param Prefix string
4+
param Location string
55
param PrivateCloudAddressSpace string
6+
param PrivateCloudName string
7+
param PrivateCloudResourceGroupName string = 'avs-rg'
68
param PrivateCloudSKU string
79
param PrivateCloudHostCount int
810
param DeployPrivateCloud bool
@@ -11,7 +13,7 @@ param ExistingPrivateCloudResourceId string
1113
//var DeployNew = empty(ExistingPrivateCloudId)
1214

1315
resource PrivateCloudResourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = if (DeployPrivateCloud) {
14-
name: '${Prefix}-PrivateCloud'
16+
name: PrivateCloudResourceGroupName
1517
location: Location
1618
}
1719

@@ -21,6 +23,7 @@ module PrivateCloud 'AVSCore/PrivateCloud.bicep' = if (DeployPrivateCloud) {
2123
params: {
2224
Prefix: Prefix
2325
Location: Location
26+
PrivateCloudName: PrivateCloudName
2427
NetworkBlock: PrivateCloudAddressSpace
2528
SKUName: PrivateCloudSKU
2629
ManagementClusterSize: PrivateCloudHostCount

AVS-Landing-Zone/GreenField/PortalUI/Bicep/Modules/AVSCore/PrivateCloud.bicep

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
12
param Prefix string
3+
param PrivateCloudName string = '${Prefix}-SDDC'
24
param NetworkBlock string
35
param ManagementClusterSize int
46
param SKUName string
57
param Location string
68

79
resource PrivateCloud 'Microsoft.AVS/privateClouds@2021-12-01' = {
8-
name: '${Prefix}-SDDC'
10+
name: PrivateCloudName
911
sku: {
1012
name: SKUName
1113
}

0 commit comments

Comments
 (0)