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.

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