Skip to content

Commit 2937a1a

Browse files
authored
Merge pull request #13 from majguo/master
Only assign a public IP address to dmgr VM
2 parents 824bed5 + ba6fb1d commit 2937a1a

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<groupId>com.ibm.websphere.azure</groupId>
2222
<artifactId>azure.websphere-traditional.cluster</artifactId>
23-
<version>1.3.2</version>
23+
<version>1.3.4</version>
2424

2525
<parent>
2626
<groupId>com.microsoft.azure.iaas</groupId>

src/main/arm/createUiDefinition.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@
199199
"sshPublicKey": "SSH key for admin account of VMs."
200200
},
201201
"constraints": {
202-
"required": true,
203-
"customPasswordRegex": "^((?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])|(?=.*[0-9])(?=.*[a-z])(?=.*[!@#$%^&*])|(?=.*[0-9])(?=.*[A-Z])(?=.*[!@#$%^&*])|(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*])).{12,72}$",
204-
"customValidationMessage": "Password must be at least 12 characters long and have 3 out of the following: one number, one lower case, one upper case, or one special character."
202+
"required": true
205203
},
206204
"options": {
207205
"hideConfirmation": false,

src/main/arm/mainTemplate.json

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
"name_storageAccount": "[concat('storage',take(replace(parameters('guidValue'),'-',''),6))]",
136136
"name_virtualNetwork": "[concat(variables('const_dnsLabelPrefix'), '-vnet')]",
137137
"ref_networkSecurityGroup": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('name_networkSecurityGroup'))]",
138+
"ref_publicIPAddress": "[resourceId('Microsoft.Network/publicIPAddresses', variables('name_publicIPAddress'))]",
138139
"ref_storage": "[resourceId('Microsoft.Storage/storageAccounts', variables('name_storageAccount'))]",
139140
"ref_subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('name_virtualNetwork'), variables('const_subnetName'))]",
140141
"ref_virtualNetwork": "[resourceId('Microsoft.Network/virtualNetworks', variables('name_virtualNetwork'))]"
@@ -230,30 +231,51 @@
230231
{
231232
"type": "Microsoft.Network/publicIPAddresses",
232233
"apiVersion": "${azure.apiVersion}",
233-
"name": "[concat(if(equals(copyIndex(), 0), variables('name_dmgrVM'), concat(variables('const_managedVMPrefix'), copyIndex())), '-ip')]",
234+
"name": "[variables('name_publicIPAddress')]",
234235
"location": "[parameters('location')]",
235-
"copy": {
236-
"name": "publicIPLoop",
237-
"count": "[parameters('numberOfNodes')]"
238-
},
239236
"properties": {
240237
"publicIPAllocationMethod": "Dynamic",
241238
"dnsSettings": {
242-
"domainNameLabel": "[concat(toLower(variables('const_dnsLabelPrefix')), if(equals(copyIndex(), 0), '', concat('-mn', copyIndex())))]"
239+
"domainNameLabel": "[concat(toLower(variables('const_dnsLabelPrefix')))]"
243240
}
244241
}
245242
},
246243
{
247244
"type": "Microsoft.Network/networkInterfaces",
248245
"apiVersion": "${azure.apiVersion}",
249-
"name": "[concat(if(equals(copyIndex(), 0), variables('name_dmgrVM'), concat(variables('const_managedVMPrefix'), copyIndex())), '-if')]",
246+
"name": "[concat(variables('name_dmgrVM'), '-if')]",
247+
"location": "[parameters('location')]",
248+
"dependsOn": [
249+
"[variables('ref_publicIPAddress')]",
250+
"[variables('ref_subnet')]"
251+
],
252+
"properties": {
253+
"ipConfigurations": [
254+
{
255+
"name": "ipconfig1",
256+
"properties": {
257+
"privateIPAllocationMethod": "Dynamic",
258+
"publicIPAddress": {
259+
"id": "[variables('ref_publicIPAddress')]"
260+
},
261+
"subnet": {
262+
"id": "[variables('ref_subnet')]"
263+
}
264+
}
265+
}
266+
]
267+
}
268+
},
269+
{
270+
"type": "Microsoft.Network/networkInterfaces",
271+
"apiVersion": "${azure.apiVersion}",
272+
"name": "[concat(variables('const_managedVMPrefix'), copyIndex(1), '-if')]",
250273
"location": "[parameters('location')]",
251274
"copy": {
252275
"name": "nicLoop",
253-
"count": "[parameters('numberOfNodes')]"
276+
"count": "[sub(parameters('numberOfNodes'), 1)]"
254277
},
255278
"dependsOn": [
256-
"publicIPLoop",
257279
"[variables('ref_subnet')]"
258280
],
259281
"properties": {
@@ -262,9 +284,6 @@
262284
"name": "ipconfig1",
263285
"properties": {
264286
"privateIPAllocationMethod": "Dynamic",
265-
"publicIPAddress": {
266-
"id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(if(equals(copyIndex(), 0), variables('name_dmgrVM'), concat(variables('const_managedVMPrefix'), copyIndex())), '-ip'))]"
267-
},
268287
"subnet": {
269288
"id": "[variables('ref_subnet')]"
270289
}
@@ -283,6 +302,7 @@
283302
"count": "[parameters('numberOfNodes')]"
284303
},
285304
"dependsOn": [
305+
"[resourceId('Microsoft.Network/networkInterfaces', concat(variables('name_dmgrVM'), '-if'))]",
286306
"nicLoop"
287307
],
288308
"properties": {

0 commit comments

Comments
 (0)