-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ARM templates to deploy application
- Loading branch information
1 parent
9e12c0d
commit 9a0d77f
Showing
2 changed files
with
215 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"clusterName": { | ||
"value": "GEN-UNIQUE" | ||
}, | ||
"applicationTypeName": { | ||
"value": "VotingType" | ||
}, | ||
"applicationTypeVersion": { | ||
"value": "1.0.0" | ||
}, | ||
"appPackageUrl": { | ||
"value": "https://servicefabricapps.blob.core.windows.net/apps/Voting.sfpkg" | ||
}, | ||
"applicationName": { | ||
"value":"Voting" | ||
}, | ||
"serviceName": { | ||
"value": "Voting~VotingWeb" | ||
}, | ||
"serviceTypeName": { | ||
"value": "VotingWebType" | ||
}, | ||
"serviceName2": { | ||
"value": "Voting~VotingData" | ||
}, | ||
"serviceTypeName2": { | ||
"value": "VotingDataType" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"clusterName": { | ||
"type": "string", | ||
"defaultValue": "Cluster", | ||
"metadata": { | ||
"description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only." | ||
} | ||
}, | ||
"applicationTypeName": { | ||
"type": "string", | ||
"defaultValue": "ApplicationType", | ||
"metadata": { | ||
"description": "The application type name." | ||
} | ||
}, | ||
"applicationTypeVersion": { | ||
"type": "string", | ||
"defaultValue": "1", | ||
"metadata": { | ||
"description": "The application type version." | ||
} | ||
}, | ||
"appPackageUrl": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The URL to the application package sfpkg file." | ||
} | ||
}, | ||
"applicationName": { | ||
"type": "string", | ||
"defaultValue": "Application1", | ||
"metadata": { | ||
"description": "The name of the application resource." | ||
} | ||
}, | ||
"serviceName": { | ||
"type": "string", | ||
"defaultValue": "Service1", | ||
"metadata": { | ||
"description": "The name of the service resource in the format of {applicationName}~{serviceName}." | ||
} | ||
}, | ||
"serviceTypeName": { | ||
"type": "string", | ||
"defaultValue": "Service1Type", | ||
"metadata": { | ||
"description": "The name of the service type." | ||
} | ||
}, | ||
"serviceName2": { | ||
"type": "string", | ||
"defaultValue": "Service2", | ||
"metadata": { | ||
"description": "The name of the service resource in the format of {applicationName}~{serviceName}." | ||
} | ||
}, | ||
"serviceTypeName2": { | ||
"type": "string", | ||
"defaultValue": "Service2Type", | ||
"metadata": { | ||
"description": "The name of the service type." | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"clusterLocation": "[resourcegroup().location]" | ||
}, | ||
"resources": [ | ||
{ | ||
"apiVersion": "2019-03-01", | ||
"type": "Microsoft.ServiceFabric/clusters/applicationTypes", | ||
"name": "[concat(parameters('clusterName'), '/', parameters('applicationTypeName'))]", | ||
"location": "[variables('clusterLocation')]", | ||
"dependsOn": [], | ||
"properties": { | ||
"provisioningState": "Default" | ||
} | ||
}, | ||
{ | ||
"apiVersion": "2019-03-01", | ||
"type": "Microsoft.ServiceFabric/clusters/applicationTypes/versions", | ||
"name": "[concat(parameters('clusterName'), '/', parameters('applicationTypeName'), '/', parameters('applicationTypeVersion'))]", | ||
"location": "[variables('clusterLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applicationTypes/', parameters('applicationTypeName'))]" | ||
], | ||
"properties": { | ||
"provisioningState": "Default", | ||
"appPackageUrl": "[parameters('appPackageUrl')]" | ||
} | ||
}, | ||
{ | ||
"apiVersion": "2019-03-01", | ||
"type": "Microsoft.ServiceFabric/clusters/applications", | ||
"name": "[concat(parameters('clusterName'), '/', parameters('applicationName'))]", | ||
"location": "[variables('clusterLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applicationTypes/', parameters('applicationTypeName'), '/versions/', parameters('applicationTypeVersion'))]" | ||
], | ||
"properties": { | ||
"provisioningState": "Default", | ||
"typeName": "[parameters('applicationTypeName')]", | ||
"typeVersion": "[parameters('applicationTypeVersion')]", | ||
"parameters": {}, | ||
"upgradePolicy": { | ||
"upgradeReplicaSetCheckTimeout": "01:00:00.0", | ||
"forceRestart": "false", | ||
"rollingUpgradeMonitoringPolicy": { | ||
"healthCheckWaitDuration": "00:02:00.0", | ||
"healthCheckStableDuration": "00:05:00.0", | ||
"healthCheckRetryTimeout": "00:10:00.0", | ||
"upgradeTimeout": "01:00:00.0", | ||
"upgradeDomainTimeout": "00:20:00.0" | ||
}, | ||
"applicationHealthPolicy": { | ||
"considerWarningAsError": "false", | ||
"maxPercentUnhealthyDeployedApplications": "50", | ||
"defaultServiceTypeHealthPolicy": { | ||
"maxPercentUnhealthyServices": "50", | ||
"maxPercentUnhealthyPartitionsPerService": "50", | ||
"maxPercentUnhealthyReplicasPerPartition": "50" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"apiVersion": "2019-03-01", | ||
"type": "Microsoft.ServiceFabric/clusters/applications/services", | ||
"name": "[concat(parameters('clusterName'), '/', parameters('applicationName'), '/', parameters('serviceName'))]", | ||
"location": "[variables('clusterLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applications/', parameters('applicationName'))]" | ||
], | ||
"properties": { | ||
"provisioningState": "Default", | ||
"serviceKind": "Stateless", | ||
"serviceTypeName": "[parameters('serviceTypeName')]", | ||
"instanceCount": "-1", | ||
"partitionDescription": { | ||
"partitionScheme": "Singleton" | ||
}, | ||
"serviceLoadMetrics": [], | ||
"servicePlacementPolicies": [], | ||
"defaultMoveCost": "" | ||
} | ||
}, | ||
{ | ||
"apiVersion": "2019-03-01", | ||
"type": "Microsoft.ServiceFabric/clusters/applications/services", | ||
"name": "[concat(parameters('clusterName'), '/', parameters('applicationName'), '/', parameters('serviceName2'))]", | ||
"location": "[variables('clusterLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applications/', parameters('applicationName'))]" | ||
], | ||
"properties": { | ||
"provisioningState": "Default", | ||
"serviceKind": "Stateful", | ||
"serviceTypeName": "[parameters('serviceTypeName2')]", | ||
"targetReplicaSetSize": "3", | ||
"minReplicaSetSize": "2", | ||
"replicaRestartWaitDuration": "00:01:00.0", | ||
"quorumLossWaitDuration": "00:02:00.0", | ||
"standByReplicaKeepDuration": "00:00:30.0", | ||
"partitionDescription": { | ||
"partitionScheme": "UniformInt64Range", | ||
"count": "5", | ||
"lowKey": "1", | ||
"highKey": "5" | ||
}, | ||
"hasPersistedState": "true", | ||
"correlationScheme": [], | ||
"serviceLoadMetrics": [], | ||
"servicePlacementPolicies": [], | ||
"defaultMoveCost": "Low" | ||
} | ||
} | ||
] | ||
} |