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.

750 lines
37 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. "webMvcHttpPort": {
  43. "type": "int",
  44. "defaultValue": 5100
  45. },
  46. "webSpaHttpPort": {
  47. "type": "int",
  48. "defaultValue": 5104
  49. },
  50. "webStatusHttpPort": {
  51. "type": "int",
  52. "defaultValue": 5107
  53. },
  54. "IdSrvHttpRule": {
  55. "type": "int",
  56. "defaultValue": 5105
  57. },
  58. "BasketApiHttpRule": {
  59. "type": "int",
  60. "defaultValue": 5103
  61. },
  62. "CatalogApiHttpRule": {
  63. "type": "int",
  64. "defaultValue": 5101
  65. },
  66. "OrderingApiHttpRule": {
  67. "type": "int",
  68. "defaultValue": 5102
  69. },
  70. "MarketingApiHttpRule": {
  71. "type": "int",
  72. "defaultValue": 5110
  73. },
  74. "LocationsApiHttpRule": {
  75. "type": "int",
  76. "defaultValue": 5109
  77. },
  78. "subnet0Name": {
  79. "type": "string",
  80. "defaultValue": "Subnet-0"
  81. },
  82. "subnet0Prefix": {
  83. "type": "string",
  84. "defaultValue": "10.0.0.0/24"
  85. },
  86. "computeLocation": {
  87. "type": "string"
  88. },
  89. "publicIPAddressName": {
  90. "type": "string",
  91. "defaultValue": "PublicIP-VM"
  92. },
  93. "publicIPAddressType": {
  94. "type": "string",
  95. "allowedValues": [
  96. "Dynamic"
  97. ],
  98. "defaultValue": "Dynamic"
  99. },
  100. "vmStorageAccountContainerName": {
  101. "type": "string",
  102. "defaultValue": "vhds"
  103. },
  104. "adminUserName": {
  105. "type": "string",
  106. "defaultValue": "testadm",
  107. "metadata": {
  108. "description": "Remote desktop user Id"
  109. }
  110. },
  111. "adminPassword": {
  112. "type": "securestring",
  113. "metadata": {
  114. "description": "Remote desktop user password. Must be a strong password"
  115. }
  116. },
  117. "virtualNetworkName": {
  118. "type": "string",
  119. "defaultValue": "VNet"
  120. },
  121. "addressPrefix": {
  122. "type": "string",
  123. "defaultValue": "10.0.0.0/16"
  124. },
  125. "dnsName": {
  126. "type": "string"
  127. },
  128. "nicName": {
  129. "type": "string",
  130. "defaultValue": "NIC"
  131. },
  132. "lbName": {
  133. "type": "string",
  134. "defaultValue": "LoadBalancer"
  135. },
  136. "lbIPName": {
  137. "type": "string",
  138. "defaultValue": "PublicIP-LB-FE"
  139. },
  140. "overProvision": {
  141. "type": "string",
  142. "defaultValue": "false"
  143. },
  144. "vmImagePublisher": {
  145. "type": "string",
  146. "defaultValue": "Microsoft.Azure.ServiceFabric"
  147. },
  148. "vmImageOffer": {
  149. "type": "string",
  150. "defaultValue": "UbuntuServer"
  151. },
  152. "vmImageSku": {
  153. "type": "string",
  154. "defaultValue": "16.04"
  155. },
  156. "vmImageVersion": {
  157. "type": "string",
  158. "defaultValue": "6.0.12"
  159. },
  160. "storageAccountType": {
  161. "type": "string",
  162. "allowedValues": [
  163. "Standard_LRS",
  164. "Standard_GRS"
  165. ],
  166. "defaultValue": "Standard_LRS",
  167. "metadata": {
  168. "description": "Replication option for the VM image storage account"
  169. }
  170. },
  171. "supportLogStorageAccountType": {
  172. "type": "string",
  173. "allowedValues": [
  174. "Standard_LRS",
  175. "Standard_GRS"
  176. ],
  177. "defaultValue": "Standard_LRS",
  178. "metadata": {
  179. "description": "Replication option for the support log storage account"
  180. }
  181. },
  182. "supportLogStorageAccountName": {
  183. "type": "string",
  184. "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]",
  185. "metadata": {
  186. "description": "Name for the storage account that contains support logs from the cluster"
  187. }
  188. },
  189. "applicationDiagnosticsStorageAccountType": {
  190. "type": "string",
  191. "allowedValues": [
  192. "Standard_LRS",
  193. "Standard_GRS"
  194. ],
  195. "defaultValue": "Standard_LRS",
  196. "metadata": {
  197. "description": "Replication option for the application diagnostics storage account"
  198. }
  199. },
  200. "applicationDiagnosticsStorageAccountName": {
  201. "type": "string",
  202. "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]",
  203. "metadata": {
  204. "description": "Name for the storage account that contains application diagnostics data from the cluster"
  205. }
  206. },
  207. "nt0InstanceCount": {
  208. "type": "int",
  209. "defaultValue": 1,
  210. "metadata": {
  211. "description": "Instance count for node type"
  212. }
  213. },
  214. "vmNodeType0Name": {
  215. "type": "string",
  216. "defaultValue": "primary",
  217. "maxLength": 9
  218. },
  219. "vmNodeType0Size": {
  220. "type": "string",
  221. "defaultValue": "Standard_D1_v2"
  222. }
  223. },
  224. "variables": {
  225. "vmssApiVersion": "2017-03-30",
  226. "lbApiVersion": "2015-06-15",
  227. "vNetApiVersion": "2015-06-15",
  228. "storageApiVersion": "2016-01-01",
  229. "publicIPApiVersion": "2015-06-15",
  230. "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]",
  231. "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]",
  232. "wadlogs": "<WadCfg><DiagnosticMonitorConfiguration>",
  233. "wadperfcounters1": "<PerformanceCounters scheduledTransferPeriod=\"PT1M\"><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\AvailableMemory\" sampleRate=\"PT15S\" unit=\"Bytes\"><annotation displayName=\"Memory available\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\PercentAvailableMemory\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"Mem. percent available\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\UsedMemory\" sampleRate=\"PT15S\" unit=\"Bytes\"><annotation displayName=\"Memory used\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\PercentUsedMemory\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"Memory percentage\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Memory\\PercentUsedByCache\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"Mem. used by cache\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Processor\\PercentIdleTime\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU idle time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Processor\\PercentUserTime\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU user time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Processor\\PercentProcessorTime\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU percentage guest OS\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\Processor\\PercentIOWaitTime\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU IO wait time\" locale=\"en-us\"/></PerformanceCounterConfiguration>",
  234. "wadperfcounters2": "<PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\BytesPerSecond\" sampleRate=\"PT15S\" unit=\"BytesPerSecond\"><annotation displayName=\"Disk total bytes\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\ReadBytesPerSecond\" sampleRate=\"PT15S\" unit=\"BytesPerSecond\"><annotation displayName=\"Disk read guest OS\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\WriteBytesPerSecond\" sampleRate=\"PT15S\" unit=\"BytesPerSecond\"><annotation displayName=\"Disk write guest OS\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\TransfersPerSecond\" sampleRate=\"PT15S\" unit=\"CountPerSecond\"><annotation displayName=\"Disk transfers\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\ReadsPerSecond\" sampleRate=\"PT15S\" unit=\"CountPerSecond\"><annotation displayName=\"Disk reads\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\WritesPerSecond\" sampleRate=\"PT15S\" unit=\"CountPerSecond\"><annotation displayName=\"Disk writes\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\AverageReadTime\" sampleRate=\"PT15S\" unit=\"Seconds\"><annotation displayName=\"Disk read time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\AverageWriteTime\" sampleRate=\"PT15S\" unit=\"Seconds\"><annotation displayName=\"Disk write time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\AverageTransferTime\" sampleRate=\"PT15S\" unit=\"Seconds\"><annotation displayName=\"Disk transfer time\" locale=\"en-us\"/></PerformanceCounterConfiguration><PerformanceCounterConfiguration counterSpecifier=\"\\PhysicalDisk\\AverageDiskQueueLength\" sampleRate=\"PT15S\" unit=\"Count\"><annotation displayName=\"Disk queue length\" locale=\"en-us\"/></PerformanceCounterConfiguration></PerformanceCounters>",
  235. "wadcfgxstart": "[concat(variables('wadlogs'),variables('wadperfcounters1'),variables('wadperfcounters2'),'<Metrics resourceId=\"')]",
  236. "wadcfgxend": "[concat('\"><MetricAggregation scheduledTransferPeriod=\"PT1H\"/><MetricAggregation scheduledTransferPeriod=\"PT1M\"/></Metrics></DiagnosticMonitorConfiguration></WadCfg>')]",
  237. "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]",
  238. "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]",
  239. "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]",
  240. "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]",
  241. "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]",
  242. "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]",
  243. "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]",
  244. "wadmetricsresourceid0": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name ,'/providers/','Microsoft.Compute/virtualMachineScaleSets/', parameters('vmNodeType0Name'))]"
  245. },
  246. "resources": [
  247. {
  248. "apiVersion": "[variables('storageApiVersion')]",
  249. "type": "Microsoft.Storage/storageAccounts",
  250. "name": "[parameters('supportLogStorageAccountName')]",
  251. "location": "[parameters('computeLocation')]",
  252. "dependsOn": [],
  253. "properties": {},
  254. "kind": "Storage",
  255. "sku": {
  256. "name": "[parameters('supportLogStorageAccountType')]"
  257. },
  258. "tags": {
  259. "resourceType": "Service Fabric",
  260. "clusterName": "[parameters('clusterName')]"
  261. }
  262. },
  263. {
  264. "apiVersion": "[variables('storageApiVersion')]",
  265. "type": "Microsoft.Storage/storageAccounts",
  266. "name": "[parameters('applicationDiagnosticsStorageAccountName')]",
  267. "location": "[parameters('computeLocation')]",
  268. "dependsOn": [],
  269. "properties": {},
  270. "kind": "Storage",
  271. "sku": {
  272. "name": "[parameters('applicationDiagnosticsStorageAccountType')]"
  273. },
  274. "tags": {
  275. "resourceType": "Service Fabric",
  276. "clusterName": "[parameters('clusterName')]"
  277. }
  278. },
  279. {
  280. "apiVersion": "[variables('vNetApiVersion')]",
  281. "type": "Microsoft.Network/virtualNetworks",
  282. "name": "[parameters('virtualNetworkName')]",
  283. "location": "[parameters('computeLocation')]",
  284. "dependsOn": [],
  285. "properties": {
  286. "addressSpace": {
  287. "addressPrefixes": [
  288. "[parameters('addressPrefix')]"
  289. ]
  290. },
  291. "subnets": [
  292. {
  293. "name": "[parameters('subnet0Name')]",
  294. "properties": {
  295. "addressPrefix": "[parameters('subnet0Prefix')]"
  296. }
  297. }
  298. ]
  299. },
  300. "tags": {
  301. "resourceType": "Service Fabric",
  302. "clusterName": "[parameters('clusterName')]"
  303. }
  304. },
  305. {
  306. "apiVersion": "[variables('publicIPApiVersion')]",
  307. "type": "Microsoft.Network/publicIPAddresses",
  308. "name": "[concat(parameters('lbIPName'),'-','0')]",
  309. "location": "[parameters('computeLocation')]",
  310. "properties": {
  311. "dnsSettings": {
  312. "domainNameLabel": "[parameters('dnsName')]"
  313. },
  314. "publicIPAllocationMethod": "Dynamic"
  315. },
  316. "tags": {
  317. "resourceType": "Service Fabric",
  318. "clusterName": "[parameters('clusterName')]"
  319. }
  320. },
  321. {
  322. "apiVersion": "[variables('lbApiVersion')]",
  323. "type": "Microsoft.Network/loadBalancers",
  324. "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]",
  325. "location": "[parameters('computeLocation')]",
  326. "dependsOn": [
  327. "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]"
  328. ],
  329. "properties": {
  330. "frontendIPConfigurations": [
  331. {
  332. "name": "LoadBalancerIPConfig",
  333. "properties": {
  334. "publicIPAddress": {
  335. "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]"
  336. }
  337. }
  338. }
  339. ],
  340. "backendAddressPools": [
  341. {
  342. "name": "LoadBalancerBEAddressPool",
  343. "properties": {}
  344. }
  345. ],
  346. "loadBalancingRules": [
  347. {
  348. "name": "LBRule",
  349. "properties": {
  350. "backendAddressPool": {
  351. "id": "[variables('lbPoolID0')]"
  352. },
  353. "backendPort": "[parameters('nt0fabricTcpGatewayPort')]",
  354. "enableFloatingIP": "false",
  355. "frontendIPConfiguration": {
  356. "id": "[variables('lbIPConfig0')]"
  357. },
  358. "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]",
  359. "idleTimeoutInMinutes": "5",
  360. "probe": {
  361. "id": "[variables('lbProbeID0')]"
  362. },
  363. "protocol": "tcp"
  364. }
  365. },
  366. {
  367. "name": "LBHttpRule",
  368. "properties": {
  369. "backendAddressPool": {
  370. "id": "[variables('lbPoolID0')]"
  371. },
  372. "backendPort": "[parameters('nt0fabricHttpGatewayPort')]",
  373. "enableFloatingIP": "false",
  374. "frontendIPConfiguration": {
  375. "id": "[variables('lbIPConfig0')]"
  376. },
  377. "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]",
  378. "idleTimeoutInMinutes": "5",
  379. "probe": {
  380. "id": "[variables('lbHttpProbeID0')]"
  381. },
  382. "protocol": "tcp"
  383. }
  384. },
  385. {
  386. "name": "WebMVCHttpRule",
  387. "properties": {
  388. "backendAddressPool": {
  389. "id": "[variables('lbPoolID0')]"
  390. },
  391. "backendPort": "[parameters('webMvcHttpPort')]",
  392. "enableFloatingIP": "false",
  393. "frontendIPConfiguration": {
  394. "id": "[variables('lbIPConfig0')]"
  395. },
  396. "frontendPort": "[parameters('webMvcHttpPort')]",
  397. "idleTimeoutInMinutes": "5",
  398. "protocol": "tcp"
  399. }
  400. },
  401. {
  402. "name": "WebSPAHttpRule",
  403. "properties": {
  404. "backendAddressPool": {
  405. "id": "[variables('lbPoolID0')]"
  406. },
  407. "backendPort": "[parameters('webSpaHttpPort')]",
  408. "enableFloatingIP": "false",
  409. "frontendIPConfiguration": {
  410. "id": "[variables('lbIPConfig0')]"
  411. },
  412. "frontendPort": "[parameters('webSpaHttpPort')]",
  413. "idleTimeoutInMinutes": "5",
  414. "protocol": "tcp"
  415. }
  416. },
  417. {
  418. "name": "WebStatusHttpRule",
  419. "properties": {
  420. "backendAddressPool": {
  421. "id": "[variables('lbPoolID0')]"
  422. },
  423. "backendPort": "[parameters('webStatusHttpPort')]",
  424. "enableFloatingIP": "false",
  425. "frontendIPConfiguration": {
  426. "id": "[variables('lbIPConfig0')]"
  427. },
  428. "frontendPort": "[parameters('webStatusHttpPort')]",
  429. "idleTimeoutInMinutes": "5",
  430. "protocol": "tcp"
  431. }
  432. },
  433. {
  434. "name": "IdSrvHttpRule",
  435. "properties": {
  436. "backendAddressPool": {
  437. "id": "[variables('lbPoolID0')]"
  438. },
  439. "backendPort": "[parameters('IdSrvHttpRule')]",
  440. "enableFloatingIP": "false",
  441. "frontendIPConfiguration": {
  442. "id": "[variables('lbIPConfig0')]"
  443. },
  444. "frontendPort": "[parameters('IdSrvHttpRule')]",
  445. "idleTimeoutInMinutes": "5",
  446. "protocol": "tcp"
  447. }
  448. },
  449. {
  450. "name": "BasketApiHttpRule",
  451. "properties": {
  452. "backendAddressPool": {
  453. "id": "[variables('lbPoolID0')]"
  454. },
  455. "backendPort": "[parameters('BasketApiHttpRule')]",
  456. "enableFloatingIP": "false",
  457. "frontendIPConfiguration": {
  458. "id": "[variables('lbIPConfig0')]"
  459. },
  460. "frontendPort": "[parameters('BasketApiHttpRule')]",
  461. "idleTimeoutInMinutes": "5",
  462. "protocol": "tcp"
  463. }
  464. },
  465. {
  466. "name": "CatalogApiHttpRule",
  467. "properties": {
  468. "backendAddressPool": {
  469. "id": "[variables('lbPoolID0')]"
  470. },
  471. "backendPort": "[parameters('CatalogApiHttpRule')]",
  472. "enableFloatingIP": "false",
  473. "frontendIPConfiguration": {
  474. "id": "[variables('lbIPConfig0')]"
  475. },
  476. "frontendPort": "[parameters('CatalogApiHttpRule')]",
  477. "idleTimeoutInMinutes": "5",
  478. "protocol": "tcp"
  479. }
  480. },
  481. {
  482. "name": "OrderingApiHttpRule",
  483. "properties": {
  484. "backendAddressPool": {
  485. "id": "[variables('lbPoolID0')]"
  486. },
  487. "backendPort": "[parameters('OrderingApiHttpRule')]",
  488. "enableFloatingIP": "false",
  489. "frontendIPConfiguration": {
  490. "id": "[variables('lbIPConfig0')]"
  491. },
  492. "frontendPort": "[parameters('OrderingApiHttpRule')]",
  493. "idleTimeoutInMinutes": "5",
  494. "protocol": "tcp"
  495. }
  496. },
  497. {
  498. "name": "MarketingApiHttpRule",
  499. "properties": {
  500. "backendAddressPool": {
  501. "id": "[variables('lbPoolID0')]"
  502. },
  503. "backendPort": "[parameters('MarketingApiHttpRule')]",
  504. "enableFloatingIP": "false",
  505. "frontendIPConfiguration": {
  506. "id": "[variables('lbIPConfig0')]"
  507. },
  508. "frontendPort": "[parameters('MarketingApiHttpRule')]",
  509. "idleTimeoutInMinutes": "5",
  510. "protocol": "tcp"
  511. }
  512. },
  513. {
  514. "name": "LocationsApiHttpRule",
  515. "properties": {
  516. "backendAddressPool": {
  517. "id": "[variables('lbPoolID0')]"
  518. },
  519. "backendPort": "[parameters('LocationsApiHttpRule')]",
  520. "enableFloatingIP": "false",
  521. "frontendIPConfiguration": {
  522. "id": "[variables('lbIPConfig0')]"
  523. },
  524. "frontendPort": "[parameters('LocationsApiHttpRule')]",
  525. "idleTimeoutInMinutes": "5",
  526. "protocol": "tcp"
  527. }
  528. }
  529. ],
  530. "probes": [
  531. {
  532. "name": "FabricGatewayProbe",
  533. "properties": {
  534. "intervalInSeconds": 5,
  535. "numberOfProbes": 2,
  536. "port": "[parameters('nt0fabricTcpGatewayPort')]",
  537. "protocol": "tcp"
  538. }
  539. },
  540. {
  541. "name": "FabricHttpGatewayProbe",
  542. "properties": {
  543. "intervalInSeconds": 5,
  544. "numberOfProbes": 2,
  545. "port": "[parameters('nt0fabricHttpGatewayPort')]",
  546. "protocol": "tcp"
  547. }
  548. }
  549. ],
  550. "inboundNatPools": [
  551. {
  552. "name": "LoadBalancerBEAddressNatPool",
  553. "properties": {
  554. "backendPort": "22",
  555. "frontendIPConfiguration": {
  556. "id": "[variables('lbIPConfig0')]"
  557. },
  558. "frontendPortRangeEnd": "4500",
  559. "frontendPortRangeStart": "3389",
  560. "protocol": "tcp"
  561. }
  562. }
  563. ]
  564. },
  565. "tags": {
  566. "resourceType": "Service Fabric",
  567. "clusterName": "[parameters('clusterName')]"
  568. }
  569. },
  570. {
  571. "apiVersion": "[variables('vmssApiVersion')]",
  572. "type": "Microsoft.Compute/virtualMachineScaleSets",
  573. "name": "[parameters('vmNodeType0Name')]",
  574. "location": "[parameters('computeLocation')]",
  575. "dependsOn": [
  576. "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
  577. "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]",
  578. "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]",
  579. "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]"
  580. ],
  581. "properties": {
  582. "overprovision": "[parameters('overProvision')]",
  583. "upgradePolicy": {
  584. "mode": "Automatic"
  585. },
  586. "virtualMachineProfile": {
  587. "extensionProfile": {
  588. "extensions": [
  589. {
  590. "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricLinuxNode')]",
  591. "properties": {
  592. "type": "ServiceFabricLinuxNode",
  593. "autoUpgradeMinorVersion": true,
  594. "protectedSettings": {
  595. "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]",
  596. "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]"
  597. },
  598. "publisher": "Microsoft.Azure.ServiceFabric",
  599. "settings": {
  600. "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]",
  601. "nodeTypeRef": "[parameters('vmNodeType0Name')]",
  602. "durabilityLevel": "Bronze",
  603. "enableParallelJobs": true,
  604. "nicPrefixOverride": "[parameters('subnet0Prefix')]"
  605. },
  606. "typeHandlerVersion": "1.0"
  607. }
  608. },
  609. {
  610. "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]",
  611. "properties": {
  612. "type": "LinuxDiagnostic",
  613. "autoUpgradeMinorVersion": true,
  614. "protectedSettings": {
  615. "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]",
  616. "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]",
  617. "storageAccountEndPoint": "https://core.windows.net/"
  618. },
  619. "publisher": "Microsoft.OSTCExtensions",
  620. "settings": {
  621. "xmlCfg": "[base64(concat(variables('wadcfgxstart'),variables('wadmetricsresourceid0'),variables('wadcfgxend')))]",
  622. "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]"
  623. },
  624. "typeHandlerVersion": "2.3"
  625. }
  626. }
  627. ]
  628. },
  629. "networkProfile": {
  630. "networkInterfaceConfigurations": [
  631. {
  632. "name": "[concat(parameters('nicName'), '-0')]",
  633. "properties": {
  634. "ipConfigurations": [
  635. {
  636. "name": "[concat(parameters('nicName'),'-',0)]",
  637. "properties": {
  638. "loadBalancerBackendAddressPools": [
  639. {
  640. "id": "[variables('lbPoolID0')]"
  641. }
  642. ],
  643. "loadBalancerInboundNatPools": [
  644. {
  645. "id": "[variables('lbNatPoolID0')]"
  646. }
  647. ],
  648. "subnet": {
  649. "id": "[variables('subnet0Ref')]"
  650. }
  651. }
  652. }
  653. ],
  654. "primary": true
  655. }
  656. }
  657. ]
  658. },
  659. "osProfile": {
  660. "adminPassword": "[parameters('adminPassword')]",
  661. "adminUsername": "[parameters('adminUsername')]",
  662. "computernamePrefix": "[parameters('vmNodeType0Name')]"
  663. },
  664. "storageProfile": {
  665. "imageReference": {
  666. "publisher": "[parameters('vmImagePublisher')]",
  667. "offer": "[parameters('vmImageOffer')]",
  668. "sku": "[parameters('vmImageSku')]",
  669. "version": "[parameters('vmImageVersion')]"
  670. },
  671. "osDisk": {
  672. "caching": "ReadOnly",
  673. "createOption": "FromImage",
  674. "managedDisk": {
  675. "storageAccountType": "[parameters('storageAccountType')]"
  676. }
  677. }
  678. }
  679. }
  680. },
  681. "sku": {
  682. "name": "[parameters('vmNodeType0Size')]",
  683. "capacity": "[parameters('nt0InstanceCount')]",
  684. "tier": "Standard"
  685. },
  686. "tags": {
  687. "resourceType": "Service Fabric",
  688. "clusterName": "[parameters('clusterName')]"
  689. }
  690. },
  691. {
  692. "apiVersion": "2017-07-01-preview",
  693. "type": "Microsoft.ServiceFabric/clusters",
  694. "name": "[parameters('clusterName')]",
  695. "location": "[parameters('clusterLocation')]",
  696. "dependsOn": [
  697. "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]"
  698. ],
  699. "properties": {
  700. "addonFeatures": [
  701. "DnsService"
  702. ],
  703. "clientCertificateCommonNames": [],
  704. "clientCertificateThumbprints": [],
  705. "clusterCodeVersion": "6.0.120.1",
  706. "clusterState": "Default",
  707. "diagnosticsStorageAccountConfig": {
  708. "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]",
  709. "protectedAccountKeyName": "StorageAccountKey1",
  710. "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]",
  711. "storageAccountName": "[parameters('supportLogStorageAccountName')]",
  712. "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]"
  713. },
  714. "fabricSettings": [],
  715. "managementEndpoint": "[concat('http://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]",
  716. "nodeTypes": [
  717. {
  718. "name": "[parameters('vmNodeType0Name')]",
  719. "applicationPorts": {
  720. "endPort": "[parameters('nt0applicationEndPort')]",
  721. "startPort": "[parameters('nt0applicationStartPort')]"
  722. },
  723. "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]",
  724. "durabilityLevel": "Bronze",
  725. "ephemeralPorts": {
  726. "endPort": "[parameters('nt0ephemeralEndPort')]",
  727. "startPort": "[parameters('nt0ephemeralStartPort')]"
  728. },
  729. "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]",
  730. "isPrimary": true,
  731. "vmInstanceCount": "[parameters('nt0InstanceCount')]"
  732. }
  733. ],
  734. "provisioningState": "Default",
  735. "reliabilityLevel": "None",
  736. "upgradeMode": "Manual",
  737. "vmImage": "Linux"
  738. },
  739. "tags": {
  740. "resourceType": "Service Fabric",
  741. "clusterName": "[parameters('clusterName')]"
  742. }
  743. }
  744. ],
  745. "outputs": {
  746. "clusterProperties": {
  747. "value": "[reference(parameters('clusterName'))]",
  748. "type": "object"
  749. }
  750. }
  751. }