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.

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