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.

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