|
| 1 | +{ |
| 2 | + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", |
| 3 | + "contentVersion": "1.0.0.0", |
| 4 | + "parameters": { |
| 5 | + "clusterName": { |
| 6 | + "type": "string", |
| 7 | + "defaultValue": "Cluster", |
| 8 | + "metadata": { |
| 9 | + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only." |
| 10 | + } |
| 11 | + }, |
| 12 | + "applicationTypeName": { |
| 13 | + "type": "string", |
| 14 | + "defaultValue": "ApplicationType", |
| 15 | + "metadata": { |
| 16 | + "description": "The application type name." |
| 17 | + } |
| 18 | + }, |
| 19 | + "applicationTypeVersion": { |
| 20 | + "type": "string", |
| 21 | + "defaultValue": "1", |
| 22 | + "metadata": { |
| 23 | + "description": "The application type version." |
| 24 | + } |
| 25 | + }, |
| 26 | + "appPackageUrl": { |
| 27 | + "type": "string", |
| 28 | + "metadata": { |
| 29 | + "description": "The URL to the application package sfpkg file." |
| 30 | + } |
| 31 | + }, |
| 32 | + "applicationName": { |
| 33 | + "type": "string", |
| 34 | + "defaultValue": "Application1", |
| 35 | + "metadata": { |
| 36 | + "description": "The name of the application resource." |
| 37 | + } |
| 38 | + }, |
| 39 | + "serviceName": { |
| 40 | + "type": "string", |
| 41 | + "defaultValue": "Service1", |
| 42 | + "metadata": { |
| 43 | + "description": "The name of the service resource in the format of {applicationName}~{serviceName}." |
| 44 | + } |
| 45 | + }, |
| 46 | + "serviceTypeName": { |
| 47 | + "type": "string", |
| 48 | + "defaultValue": "Service1Type", |
| 49 | + "metadata": { |
| 50 | + "description": "The name of the service type." |
| 51 | + } |
| 52 | + }, |
| 53 | + "serviceName2": { |
| 54 | + "type": "string", |
| 55 | + "defaultValue": "Service2", |
| 56 | + "metadata": { |
| 57 | + "description": "The name of the service resource in the format of {applicationName}~{serviceName}." |
| 58 | + } |
| 59 | + }, |
| 60 | + "serviceTypeName2": { |
| 61 | + "type": "string", |
| 62 | + "defaultValue": "Service2Type", |
| 63 | + "metadata": { |
| 64 | + "description": "The name of the service type." |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
| 68 | + "variables": { |
| 69 | + "clusterLocation": "[resourcegroup().location]" |
| 70 | + }, |
| 71 | + "resources": [ |
| 72 | + { |
| 73 | + "apiVersion": "2019-03-01", |
| 74 | + "type": "Microsoft.ServiceFabric/clusters/applicationTypes", |
| 75 | + "name": "[concat(parameters('clusterName'), '/', parameters('applicationTypeName'))]", |
| 76 | + "location": "[variables('clusterLocation')]", |
| 77 | + "dependsOn": [], |
| 78 | + "properties": { |
| 79 | + "provisioningState": "Default" |
| 80 | + } |
| 81 | + }, |
| 82 | + { |
| 83 | + "apiVersion": "2019-03-01", |
| 84 | + "type": "Microsoft.ServiceFabric/clusters/applicationTypes/versions", |
| 85 | + "name": "[concat(parameters('clusterName'), '/', parameters('applicationTypeName'), '/', parameters('applicationTypeVersion'))]", |
| 86 | + "location": "[variables('clusterLocation')]", |
| 87 | + "dependsOn": [ |
| 88 | + "[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applicationTypes/', parameters('applicationTypeName'))]" |
| 89 | + ], |
| 90 | + "properties": { |
| 91 | + "provisioningState": "Default", |
| 92 | + "appPackageUrl": "[parameters('appPackageUrl')]" |
| 93 | + } |
| 94 | + }, |
| 95 | + { |
| 96 | + "apiVersion": "2019-03-01", |
| 97 | + "type": "Microsoft.ServiceFabric/clusters/applications", |
| 98 | + "name": "[concat(parameters('clusterName'), '/', parameters('applicationName'))]", |
| 99 | + "location": "[variables('clusterLocation')]", |
| 100 | + "dependsOn": [ |
| 101 | + "[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applicationTypes/', parameters('applicationTypeName'), '/versions/', parameters('applicationTypeVersion'))]" |
| 102 | + ], |
| 103 | + "properties": { |
| 104 | + "provisioningState": "Default", |
| 105 | + "typeName": "[parameters('applicationTypeName')]", |
| 106 | + "typeVersion": "[parameters('applicationTypeVersion')]", |
| 107 | + "parameters": {}, |
| 108 | + "upgradePolicy": { |
| 109 | + "upgradeReplicaSetCheckTimeout": "01:00:00.0", |
| 110 | + "forceRestart": "false", |
| 111 | + "rollingUpgradeMonitoringPolicy": { |
| 112 | + "healthCheckWaitDuration": "00:02:00.0", |
| 113 | + "healthCheckStableDuration": "00:05:00.0", |
| 114 | + "healthCheckRetryTimeout": "00:10:00.0", |
| 115 | + "upgradeTimeout": "01:00:00.0", |
| 116 | + "upgradeDomainTimeout": "00:20:00.0" |
| 117 | + }, |
| 118 | + "applicationHealthPolicy": { |
| 119 | + "considerWarningAsError": "false", |
| 120 | + "maxPercentUnhealthyDeployedApplications": "50", |
| 121 | + "defaultServiceTypeHealthPolicy": { |
| 122 | + "maxPercentUnhealthyServices": "50", |
| 123 | + "maxPercentUnhealthyPartitionsPerService": "50", |
| 124 | + "maxPercentUnhealthyReplicasPerPartition": "50" |
| 125 | + } |
| 126 | + } |
| 127 | + } |
| 128 | + } |
| 129 | + }, |
| 130 | + { |
| 131 | + "apiVersion": "2019-03-01", |
| 132 | + "type": "Microsoft.ServiceFabric/clusters/applications/services", |
| 133 | + "name": "[concat(parameters('clusterName'), '/', parameters('applicationName'), '/', parameters('serviceName'))]", |
| 134 | + "location": "[variables('clusterLocation')]", |
| 135 | + "dependsOn": [ |
| 136 | + "[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applications/', parameters('applicationName'))]" |
| 137 | + ], |
| 138 | + "properties": { |
| 139 | + "provisioningState": "Default", |
| 140 | + "serviceKind": "Stateless", |
| 141 | + "serviceTypeName": "[parameters('serviceTypeName')]", |
| 142 | + "instanceCount": "-1", |
| 143 | + "partitionDescription": { |
| 144 | + "partitionScheme": "Singleton" |
| 145 | + }, |
| 146 | + "serviceLoadMetrics": [], |
| 147 | + "servicePlacementPolicies": [], |
| 148 | + "defaultMoveCost": "" |
| 149 | + } |
| 150 | + }, |
| 151 | + { |
| 152 | + "apiVersion": "2019-03-01", |
| 153 | + "type": "Microsoft.ServiceFabric/clusters/applications/services", |
| 154 | + "name": "[concat(parameters('clusterName'), '/', parameters('applicationName'), '/', parameters('serviceName2'))]", |
| 155 | + "location": "[variables('clusterLocation')]", |
| 156 | + "dependsOn": [ |
| 157 | + "[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applications/', parameters('applicationName'))]" |
| 158 | + ], |
| 159 | + "properties": { |
| 160 | + "provisioningState": "Default", |
| 161 | + "serviceKind": "Stateful", |
| 162 | + "serviceTypeName": "[parameters('serviceTypeName2')]", |
| 163 | + "targetReplicaSetSize": "3", |
| 164 | + "minReplicaSetSize": "2", |
| 165 | + "replicaRestartWaitDuration": "00:01:00.0", |
| 166 | + "quorumLossWaitDuration": "00:02:00.0", |
| 167 | + "standByReplicaKeepDuration": "00:00:30.0", |
| 168 | + "partitionDescription": { |
| 169 | + "partitionScheme": "UniformInt64Range", |
| 170 | + "count": "5", |
| 171 | + "lowKey": "1", |
| 172 | + "highKey": "5" |
| 173 | + }, |
| 174 | + "hasPersistedState": "true", |
| 175 | + "correlationScheme": [], |
| 176 | + "serviceLoadMetrics": [], |
| 177 | + "servicePlacementPolicies": [], |
| 178 | + "defaultMoveCost": "Low" |
| 179 | + } |
| 180 | + } |
| 181 | + ] |
| 182 | +} |
0 commit comments