You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

823 lines
38 KiB

  1. {
  2. "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
  3. "contentVersion": "1.0.0.0",
  4. "parameters": {
  5. "clusterLocation": {
  6. "type": "string",
  7. "metadata": {
  8. "description": "Location of the Cluster"
  9. }
  10. },
  11. "clusterName": {
  12. "type": "string",
  13. "defaultValue": "Cluster",
  14. "metadata": {
  15. "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only"
  16. }
  17. },
  18. "nt0applicationStartPort": {
  19. "type": "int",
  20. "defaultValue": 20000
  21. },
  22. "nt0applicationEndPort": {
  23. "type": "int",
  24. "defaultValue": 30000
  25. },
  26. "nt0ephemeralStartPort": {
  27. "type": "int",
  28. "defaultValue": 49152
  29. },
  30. "nt0ephemeralEndPort": {
  31. "type": "int",
  32. "defaultValue": 65534
  33. },
  34. "nt0fabricTcpGatewayPort": {
  35. "type": "int",
  36. "defaultValue": 19000
  37. },
  38. "nt0fabricHttpGatewayPort": {
  39. "type": "int",
  40. "defaultValue": 19080
  41. },
  42. "nt0reverseProxyEndpointPort": {
  43. "type": "int",
  44. "defaultValue": 19081
  45. },
  46. "webMvcHttpPort": {
  47. "type": "int",
  48. "defaultValue": 5100
  49. },
  50. "webSpaHttpPort": {
  51. "type": "int",
  52. "defaultValue": 5104
  53. },
  54. "webStatusHttpPort": {
  55. "type": "int",
  56. "defaultValue": 5107
  57. },
  58. "IdSrvHttpRule": {
  59. "type": "int",
  60. "defaultValue": 5105
  61. },
  62. "subnet0Name": {
  63. "type": "string",
  64. "defaultValue": "Subnet-0"
  65. },
  66. "subnet0Prefix": {
  67. "type": "string",
  68. "defaultValue": "10.0.0.0/24"
  69. },
  70. "computeLocation": {
  71. "type": "string"
  72. },
  73. "publicIPAddressName": {
  74. "type": "string",
  75. "defaultValue": "PublicIP-VM"
  76. },
  77. "publicIPAddressType": {
  78. "type": "string",
  79. "allowedValues": [
  80. "Dynamic"
  81. ],
  82. "defaultValue": "Dynamic"
  83. },
  84. "vmStorageAccountContainerName": {
  85. "type": "string",
  86. "defaultValue": "vhds"
  87. },
  88. "adminUserName": {
  89. "type": "string",
  90. "defaultValue": "testadm",
  91. "metadata": {
  92. "description": "Remote desktop user Id"
  93. }
  94. },
  95. "adminPassword": {
  96. "type": "securestring",
  97. "metadata": {
  98. "description": "Remote desktop user password. Must be a strong password"
  99. }
  100. },
  101. "virtualNetworkName": {
  102. "type": "string",
  103. "defaultValue": "VNet"
  104. },
  105. "addressPrefix": {
  106. "type": "string",
  107. "defaultValue": "10.0.0.0/16"
  108. },
  109. "dnsName": {
  110. "type": "string"
  111. },
  112. "nicName": {
  113. "type": "string",
  114. "defaultValue": "NIC"
  115. },
  116. "lbName": {
  117. "type": "string",
  118. "defaultValue": "LoadBalancer"
  119. },
  120. "lbIPName": {
  121. "type": "string",
  122. "defaultValue": "PublicIP-LB-FE"
  123. },
  124. "overProvision": {
  125. "type": "string",
  126. "defaultValue": "false"
  127. },
  128. "vmImagePublisher": {
  129. "type": "string",
  130. "defaultValue": "MicrosoftWindowsServer"
  131. },
  132. "vmImageOffer": {
  133. "type": "string",
  134. "defaultValue": "WindowsServer"
  135. },
  136. "vmImageSku": {
  137. "type": "string",
  138. "defaultValue": "2012-R2-Datacenter"
  139. },
  140. "vmImageVersion": {
  141. "type": "string",
  142. "defaultValue": "latest"
  143. },
  144. "clusterProtectionLevel": {
  145. "type": "string",
  146. "allowedValues": [
  147. "None",
  148. "Sign",
  149. "EncryptAndSign"
  150. ],
  151. "defaultValue": "EncryptAndSign",
  152. "metadata": {
  153. "description": "Protection level.Three values are allowed - EncryptAndSign, Sign, None. It is best to keep the default of EncryptAndSign, unless you have a need not to"
  154. }
  155. },
  156. "certificateStoreValue": {
  157. "type": "string",
  158. "allowedValues": [
  159. "My"
  160. ],
  161. "defaultValue": "My",
  162. "metadata": {
  163. "description": "The store name where the cert will be deployed in the virtual machine"
  164. }
  165. },
  166. "certificateThumbprint": {
  167. "type": "string",
  168. "metadata": {
  169. "description": "Certificate Thumbprint"
  170. }
  171. },
  172. "sourceVaultValue": {
  173. "type": "string",
  174. "metadata": {
  175. "description": "Resource Id of the key vault, is should be in the format of /subscriptions/<Sub ID>/resourceGroups/<Resource group name>/providers/Microsoft.KeyVault/vaults/<vault name>"
  176. }
  177. },
  178. "certificateUrlValue": {
  179. "type": "string",
  180. "metadata": {
  181. "description": "Refers to the location URL in your key vault where the certificate was uploaded, it is should be in the format of https://<name of the vault>.vault.azure.net:443/secrets/<exact location>"
  182. }
  183. },
  184. "storageAccountType": {
  185. "type": "string",
  186. "allowedValues": [
  187. "Standard_LRS",
  188. "Standard_GRS"
  189. ],
  190. "defaultValue": "Standard_LRS",
  191. "metadata": {
  192. "description": "Replication option for the VM image storage account"
  193. }
  194. },
  195. "supportLogStorageAccountType": {
  196. "type": "string",
  197. "allowedValues": [
  198. "Standard_LRS",
  199. "Standard_GRS"
  200. ],
  201. "defaultValue": "Standard_LRS",
  202. "metadata": {
  203. "description": "Replication option for the support log storage account"
  204. }
  205. },
  206. "supportLogStorageAccountName": {
  207. "type": "string",
  208. "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]",
  209. "metadata": {
  210. "description": "Name for the storage account that contains support logs from the cluster"
  211. }
  212. },
  213. "applicationDiagnosticsStorageAccountType": {
  214. "type": "string",
  215. "allowedValues": [
  216. "Standard_LRS",
  217. "Standard_GRS"
  218. ],
  219. "defaultValue": "Standard_LRS",
  220. "metadata": {
  221. "description": "Replication option for the application diagnostics storage account"
  222. }
  223. },
  224. "applicationDiagnosticsStorageAccountName": {
  225. "type": "string",
  226. "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]",
  227. "metadata": {
  228. "description": "Name for the storage account that contains application diagnostics data from the cluster"
  229. }
  230. },
  231. "nt0InstanceCount": {
  232. "type": "int",
  233. "defaultValue": 5,
  234. "metadata": {
  235. "description": "Instance count for node type"
  236. }
  237. },
  238. "vmNodeType0Name": {
  239. "type": "string",
  240. "defaultValue": "primary",
  241. "maxLength": 9
  242. },
  243. "vmNodeType0Size": {
  244. "type": "string",
  245. "defaultValue": "Standard_D2_v2"
  246. }
  247. },
  248. "variables": {
  249. "vmssApiVersion": "2017-03-30",
  250. "lbApiVersion": "2015-06-15",
  251. "vNetApiVersion": "2015-06-15",
  252. "storageApiVersion": "2016-01-01",
  253. "publicIPApiVersion": "2015-06-15",
  254. "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]",
  255. "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]",
  256. "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]",
  257. "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]",
  258. "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]",
  259. "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]",
  260. "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]",
  261. "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]",
  262. "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]",
  263. "uniqueStringArray0": [
  264. "[concat(variables('vmStorageAccountName0'), '0')]",
  265. "[concat(variables('vmStorageAccountName0'), '1')]",
  266. "[concat(variables('vmStorageAccountName0'), '2')]",
  267. "[concat(variables('vmStorageAccountName0'), '3')]",
  268. "[concat(variables('vmStorageAccountName0'), '4')]"
  269. ]
  270. },
  271. "resources": [
  272. {
  273. "apiVersion": "[variables('storageApiVersion')]",
  274. "type": "Microsoft.Storage/storageAccounts",
  275. "name": "[parameters('supportLogStorageAccountName')]",
  276. "location": "[parameters('computeLocation')]",
  277. "dependsOn": [],
  278. "properties": {},
  279. "kind": "Storage",
  280. "sku": {
  281. "name": "[parameters('supportLogStorageAccountType')]"
  282. },
  283. "tags": {
  284. "resourceType": "Service Fabric",
  285. "clusterName": "[parameters('clusterName')]"
  286. }
  287. },
  288. {
  289. "apiVersion": "[variables('storageApiVersion')]",
  290. "type": "Microsoft.Storage/storageAccounts",
  291. "name": "[parameters('applicationDiagnosticsStorageAccountName')]",
  292. "location": "[parameters('computeLocation')]",
  293. "dependsOn": [],
  294. "properties": {},
  295. "kind": "Storage",
  296. "sku": {
  297. "name": "[parameters('applicationDiagnosticsStorageAccountType')]"
  298. },
  299. "tags": {
  300. "resourceType": "Service Fabric",
  301. "clusterName": "[parameters('clusterName')]"
  302. }
  303. },
  304. {
  305. "apiVersion": "[variables('vNetApiVersion')]",
  306. "type": "Microsoft.Network/virtualNetworks",
  307. "name": "[parameters('virtualNetworkName')]",
  308. "location": "[parameters('computeLocation')]",
  309. "dependsOn": [],
  310. "properties": {
  311. "addressSpace": {
  312. "addressPrefixes": [
  313. "[parameters('addressPrefix')]"
  314. ]
  315. },
  316. "subnets": [
  317. {
  318. "name": "[parameters('subnet0Name')]",
  319. "properties": {
  320. "addressPrefix": "[parameters('subnet0Prefix')]"
  321. }
  322. }
  323. ]
  324. },
  325. "tags": {
  326. "resourceType": "Service Fabric",
  327. "clusterName": "[parameters('clusterName')]"
  328. }
  329. },
  330. {
  331. "apiVersion": "[variables('publicIPApiVersion')]",
  332. "type": "Microsoft.Network/publicIPAddresses",
  333. "name": "[concat(parameters('lbIPName'),'-','0')]",
  334. "location": "[parameters('computeLocation')]",
  335. "properties": {
  336. "dnsSettings": {
  337. "domainNameLabel": "[parameters('dnsName')]"
  338. },
  339. "publicIPAllocationMethod": "Dynamic"
  340. },
  341. "tags": {
  342. "resourceType": "Service Fabric",
  343. "clusterName": "[parameters('clusterName')]"
  344. }
  345. },
  346. {
  347. "apiVersion": "[variables('lbApiVersion')]",
  348. "type": "Microsoft.Network/loadBalancers",
  349. "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]",
  350. "location": "[parameters('computeLocation')]",
  351. "dependsOn": [
  352. "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]"
  353. ],
  354. "properties": {
  355. "frontendIPConfigurations": [
  356. {
  357. "name": "LoadBalancerIPConfig",
  358. "properties": {
  359. "publicIPAddress": {
  360. "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]"
  361. }
  362. }
  363. }
  364. ],
  365. "backendAddressPools": [
  366. {
  367. "name": "LoadBalancerBEAddressPool",
  368. "properties": {}
  369. }
  370. ],
  371. "loadBalancingRules": [
  372. {
  373. "name": "LBRule",
  374. "properties": {
  375. "backendAddressPool": {
  376. "id": "[variables('lbPoolID0')]"
  377. },
  378. "backendPort": "[parameters('nt0fabricTcpGatewayPort')]",
  379. "enableFloatingIP": "false",
  380. "frontendIPConfiguration": {
  381. "id": "[variables('lbIPConfig0')]"
  382. },
  383. "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]",
  384. "idleTimeoutInMinutes": "5",
  385. "probe": {
  386. "id": "[variables('lbProbeID0')]"
  387. },
  388. "protocol": "tcp"
  389. }
  390. },
  391. {
  392. "name": "LBHttpRule",
  393. "properties": {
  394. "backendAddressPool": {
  395. "id": "[variables('lbPoolID0')]"
  396. },
  397. "backendPort": "[parameters('nt0fabricHttpGatewayPort')]",
  398. "enableFloatingIP": "false",
  399. "frontendIPConfiguration": {
  400. "id": "[variables('lbIPConfig0')]"
  401. },
  402. "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]",
  403. "idleTimeoutInMinutes": "5",
  404. "probe": {
  405. "id": "[variables('lbHttpProbeID0')]"
  406. },
  407. "protocol": "tcp"
  408. }
  409. },
  410. {
  411. "name": "ReverseProxyHttpRule",
  412. "properties": {
  413. "backendAddressPool": {
  414. "id": "[variables('lbPoolID0')]"
  415. },
  416. "backendPort": "[parameters('nt0reverseProxyEndpointPort')]",
  417. "enableFloatingIP": "false",
  418. "frontendIPConfiguration": {
  419. "id": "[variables('lbIPConfig0')]"
  420. },
  421. "frontendPort": "[parameters('nt0reverseProxyEndpointPort')]",
  422. "idleTimeoutInMinutes": "5",
  423. "probe": {
  424. "id": "[variables('lbHttpProbeID0')]"
  425. },
  426. "protocol": "tcp"
  427. }
  428. },
  429. {
  430. "name": "WebMVCHttpRule",
  431. "properties": {
  432. "backendAddressPool": {
  433. "id": "[variables('lbPoolID0')]"
  434. },
  435. "backendPort": "[parameters('webMvcHttpPort')]",
  436. "enableFloatingIP": "false",
  437. "frontendIPConfiguration": {
  438. "id": "[variables('lbIPConfig0')]"
  439. },
  440. "frontendPort": "[parameters('webMvcHttpPort')]",
  441. "idleTimeoutInMinutes": "5",
  442. "probe": {
  443. "id": "[variables('lbHttpProbeID0')]"
  444. },
  445. "protocol": "tcp"
  446. }
  447. },
  448. {
  449. "name": "WebSPAHttpRule",
  450. "properties": {
  451. "backendAddressPool": {
  452. "id": "[variables('lbPoolID0')]"
  453. },
  454. "backendPort": "[parameters('webSpaHttpPort')]",
  455. "enableFloatingIP": "false",
  456. "frontendIPConfiguration": {
  457. "id": "[variables('lbIPConfig0')]"
  458. },
  459. "frontendPort": "[parameters('webSpaHttpPort')]",
  460. "idleTimeoutInMinutes": "5",
  461. "probe": {
  462. "id": "[variables('lbHttpProbeID0')]"
  463. },
  464. "protocol": "tcp"
  465. }
  466. },
  467. {
  468. "name": "WebStatusHttpRule",
  469. "properties": {
  470. "backendAddressPool": {
  471. "id": "[variables('lbPoolID0')]"
  472. },
  473. "backendPort": "[parameters('webStatusHttpPort')]",
  474. "enableFloatingIP": "false",
  475. "frontendIPConfiguration": {
  476. "id": "[variables('lbIPConfig0')]"
  477. },
  478. "frontendPort": "[parameters('webStatusHttpPort')]",
  479. "idleTimeoutInMinutes": "5",
  480. "probe": {
  481. "id": "[variables('lbHttpProbeID0')]"
  482. },
  483. "protocol": "tcp"
  484. }
  485. },
  486. {
  487. "name": "IdSrvHttpRule",
  488. "properties": {
  489. "backendAddressPool": {
  490. "id": "[variables('lbPoolID0')]"
  491. },
  492. "backendPort": "[parameters('IdSrvHttpRule')]",
  493. "enableFloatingIP": "false",
  494. "frontendIPConfiguration": {
  495. "id": "[variables('lbIPConfig0')]"
  496. },
  497. "frontendPort": "[parameters('IdSrvHttpRule')]",
  498. "idleTimeoutInMinutes": "5",
  499. "probe": {
  500. "id": "[variables('lbHttpProbeID0')]"
  501. },
  502. "protocol": "tcp"
  503. }
  504. }
  505. ],
  506. "probes": [
  507. {
  508. "name": "FabricGatewayProbe",
  509. "properties": {
  510. "intervalInSeconds": 5,
  511. "numberOfProbes": 2,
  512. "port": "[parameters('nt0fabricTcpGatewayPort')]",
  513. "protocol": "tcp"
  514. }
  515. },
  516. {
  517. "name": "FabricHttpGatewayProbe",
  518. "properties": {
  519. "intervalInSeconds": 5,
  520. "numberOfProbes": 2,
  521. "port": "[parameters('nt0fabricHttpGatewayPort')]",
  522. "protocol": "tcp"
  523. }
  524. }
  525. ],
  526. "inboundNatPools": [
  527. {
  528. "name": "LoadBalancerBEAddressNatPool",
  529. "properties": {
  530. "backendPort": "3389",
  531. "frontendIPConfiguration": {
  532. "id": "[variables('lbIPConfig0')]"
  533. },
  534. "frontendPortRangeEnd": "4500",
  535. "frontendPortRangeStart": "3389",
  536. "protocol": "tcp"
  537. }
  538. }
  539. ]
  540. },
  541. "tags": {
  542. "resourceType": "Service Fabric",
  543. "clusterName": "[parameters('clusterName')]"
  544. }
  545. },
  546. {
  547. "apiVersion": "[variables('storageApiVersion')]",
  548. "type": "Microsoft.Storage/storageAccounts",
  549. "name": "[variables('uniqueStringArray0')[copyIndex()]]",
  550. "location": "[parameters('computeLocation')]",
  551. "dependsOn": [],
  552. "properties": {},
  553. "copy": {
  554. "name": "storageLoop",
  555. "count": 5
  556. },
  557. "kind": "Storage",
  558. "sku": {
  559. "name": "[parameters('storageAccountType')]"
  560. },
  561. "tags": {
  562. "resourceType": "Service Fabric",
  563. "clusterName": "[parameters('clusterName')]"
  564. }
  565. },
  566. {
  567. "apiVersion": "[variables('vmssApiVersion')]",
  568. "type": "Microsoft.Compute/virtualMachineScaleSets",
  569. "name": "[parameters('vmNodeType0Name')]",
  570. "location": "[parameters('computeLocation')]",
  571. "dependsOn": [
  572. "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
  573. "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0])]",
  574. "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1])]",
  575. "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2])]",
  576. "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3])]",
  577. "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4])]",
  578. "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]",
  579. "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]",
  580. "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]"
  581. ],
  582. "properties": {
  583. "overprovision": "[parameters('overProvision')]",
  584. "upgradePolicy": {
  585. "mode": "Automatic"
  586. },
  587. "virtualMachineProfile": {
  588. "extensionProfile": {
  589. "extensions": [
  590. {
  591. "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricNode')]",
  592. "properties": {
  593. "type": "ServiceFabricNode",
  594. "autoUpgradeMinorVersion": true,
  595. "protectedSettings": {
  596. "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]",
  597. "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]"
  598. },
  599. "publisher": "Microsoft.Azure.ServiceFabric",
  600. "settings": {
  601. "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]",
  602. "nodeTypeRef": "[parameters('vmNodeType0Name')]",
  603. "dataPath": "D:\\\\SvcFab",
  604. "durabilityLevel": "Bronze",
  605. "enableParallelJobs": true,
  606. "nicPrefixOverride": "[parameters('subnet0Prefix')]",
  607. "certificate": {
  608. "thumbprint": "[parameters('certificateThumbprint')]",
  609. "x509StoreName": "[parameters('certificateStoreValue')]"
  610. }
  611. },
  612. "typeHandlerVersion": "1.0"
  613. }
  614. },
  615. {
  616. "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]",
  617. "properties": {
  618. "type": "IaaSDiagnostics",
  619. "autoUpgradeMinorVersion": true,
  620. "protectedSettings": {
  621. "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]",
  622. "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]",
  623. "storageAccountEndPoint": "https://core.windows.net/"
  624. },
  625. "publisher": "Microsoft.Azure.Diagnostics",
  626. "settings": {
  627. "WadCfg": {
  628. "DiagnosticMonitorConfiguration": {
  629. "overallQuotaInMB": "50000",
  630. "EtwProviders": {
  631. "EtwEventSourceProviderConfiguration": [
  632. {
  633. "provider": "Microsoft-ServiceFabric-Actors",
  634. "scheduledTransferKeywordFilter": "1",
  635. "scheduledTransferPeriod": "PT5M",
  636. "DefaultEvents": {
  637. "eventDestination": "ServiceFabricReliableActorEventTable"
  638. }
  639. },
  640. {
  641. "provider": "Microsoft-ServiceFabric-Services",
  642. "scheduledTransferPeriod": "PT5M",
  643. "DefaultEvents": {
  644. "eventDestination": "ServiceFabricReliableServiceEventTable"
  645. }
  646. }
  647. ],
  648. "EtwManifestProviderConfiguration": [
  649. {
  650. "provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8",
  651. "scheduledTransferLogLevelFilter": "Information",
  652. "scheduledTransferKeywordFilter": "4611686018427387904",
  653. "scheduledTransferPeriod": "PT5M",
  654. "DefaultEvents": {
  655. "eventDestination": "ServiceFabricSystemEventTable"
  656. }
  657. }
  658. ]
  659. }
  660. }
  661. },
  662. "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]"
  663. },
  664. "typeHandlerVersion": "1.5"
  665. }
  666. }
  667. ]
  668. },
  669. "networkProfile": {
  670. "networkInterfaceConfigurations": [
  671. {
  672. "name": "[concat(parameters('nicName'), '-0')]",
  673. "properties": {
  674. "ipConfigurations": [
  675. {
  676. "name": "[concat(parameters('nicName'),'-',0)]",
  677. "properties": {
  678. "loadBalancerBackendAddressPools": [
  679. {
  680. "id": "[variables('lbPoolID0')]"
  681. }
  682. ],
  683. "loadBalancerInboundNatPools": [
  684. {
  685. "id": "[variables('lbNatPoolID0')]"
  686. }
  687. ],
  688. "subnet": {
  689. "id": "[variables('subnet0Ref')]"
  690. }
  691. }
  692. }
  693. ],
  694. "primary": true
  695. }
  696. }
  697. ]
  698. },
  699. "osProfile": {
  700. "adminPassword": "[parameters('adminPassword')]",
  701. "adminUsername": "[parameters('adminUsername')]",
  702. "computernamePrefix": "[parameters('vmNodeType0Name')]",
  703. "secrets": [
  704. {
  705. "sourceVault": {
  706. "id": "[parameters('sourceVaultValue')]"
  707. },
  708. "vaultCertificates": [
  709. {
  710. "certificateStore": "[parameters('certificateStoreValue')]",
  711. "certificateUrl": "[parameters('certificateUrlValue')]"
  712. }
  713. ]
  714. }
  715. ]
  716. },
  717. "storageProfile": {
  718. "imageReference": {
  719. "publisher": "[parameters('vmImagePublisher')]",
  720. "offer": "[parameters('vmImageOffer')]",
  721. "sku": "[parameters('vmImageSku')]",
  722. "version": "[parameters('vmImageVersion')]"
  723. },
  724. "osDisk": {
  725. "caching": "ReadOnly",
  726. "createOption": "FromImage",
  727. "vhdContainers": [
  728. "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]",
  729. "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]",
  730. "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]",
  731. "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]",
  732. "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]"
  733. ],
  734. "name": "vmssosdisk"
  735. }
  736. }
  737. }
  738. },
  739. "sku": {
  740. "name": "[parameters('vmNodeType0Size')]",
  741. "capacity": "[parameters('nt0InstanceCount')]",
  742. "tier": "Standard"
  743. },
  744. "tags": {
  745. "resourceType": "Service Fabric",
  746. "clusterName": "[parameters('clusterName')]"
  747. }
  748. },
  749. {
  750. "apiVersion": "2017-07-01-preview",
  751. "type": "Microsoft.ServiceFabric/clusters",
  752. "name": "[parameters('clusterName')]",
  753. "location": "[parameters('clusterLocation')]",
  754. "dependsOn": [
  755. "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]"
  756. ],
  757. "properties": {
  758. "addonFeatures": [
  759. "DnsService"
  760. ],
  761. "certificate": {
  762. "thumbprint": "[parameters('certificateThumbprint')]",
  763. "x509StoreName": "[parameters('certificateStoreValue')]"
  764. },
  765. "clientCertificateCommonNames": [],
  766. "clientCertificateThumbprints": [],
  767. "clusterCodeVersion": "5.7.207.9494",
  768. "clusterState": "Default",
  769. "diagnosticsStorageAccountConfig": {
  770. "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]",
  771. "protectedAccountKeyName": "StorageAccountKey1",
  772. "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]",
  773. "storageAccountName": "[parameters('supportLogStorageAccountName')]",
  774. "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]"
  775. },
  776. "fabricSettings": [
  777. {
  778. "parameters": [
  779. {
  780. "name": "ClusterProtectionLevel",
  781. "value": "[parameters('clusterProtectionLevel')]"
  782. }
  783. ],
  784. "name": "Security"
  785. }
  786. ],
  787. "managementEndpoint": "[concat('https://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]",
  788. "nodeTypes": [
  789. {
  790. "name": "[parameters('vmNodeType0Name')]",
  791. "applicationPorts": {
  792. "endPort": "[parameters('nt0applicationEndPort')]",
  793. "startPort": "[parameters('nt0applicationStartPort')]"
  794. },
  795. "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]",
  796. "durabilityLevel": "Bronze",
  797. "ephemeralPorts": {
  798. "endPort": "[parameters('nt0ephemeralEndPort')]",
  799. "startPort": "[parameters('nt0ephemeralStartPort')]"
  800. },
  801. "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]",
  802. "isPrimary": true,
  803. "reverseProxyEndpointPort": "[parameters('nt0reverseProxyEndpointPort')]",
  804. "vmInstanceCount": "[parameters('nt0InstanceCount')]"
  805. }
  806. ],
  807. "provisioningState": "Default",
  808. "reliabilityLevel": "Silver",
  809. "upgradeMode": "Manual",
  810. "vmImage": "Windows"
  811. },
  812. "tags": {
  813. "resourceType": "Service Fabric",
  814. "clusterName": "[parameters('clusterName')]"
  815. }
  816. }
  817. ],
  818. "outputs": {
  819. "clusterProperties": {
  820. "value": "[reference(parameters('clusterName'))]",
  821. "type": "object"
  822. }
  823. }
  824. }