-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FH 1.1.0.831
- Loading branch information
Showing
99 changed files
with
6,354 additions
and
2,822 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
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,15 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
$Configuration="Release" | ||
[string] $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition | ||
|
||
try { | ||
Push-Location $scriptPath | ||
|
||
Remove-Item $scriptPath\FabricHealerProxy\bin\release\netstandard2.0\ -Recurse -Force -EA SilentlyContinue | ||
|
||
dotnet publish $scriptPath\FabricHealerProxy\FabricHealerProxy.csproj -o bin\release\netstandard2.0 -c $Configuration | ||
} | ||
finally { | ||
Pop-Location | ||
} |
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,45 @@ | ||
function Install-Nuget { | ||
# Path to Latest nuget.exe on nuget.org | ||
$source = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" | ||
|
||
# Save file to top level directory in repo | ||
$destination = "$scriptPath\nuget.exe" | ||
|
||
#Download the file | ||
if (-Not [System.IO.File]::Exists($destination)) { | ||
Invoke-WebRequest -Uri $source -OutFile $destination | ||
} | ||
} | ||
|
||
function Build-Nuget { | ||
param ( | ||
[string] | ||
$packageId, | ||
|
||
[string] | ||
$basePath | ||
) | ||
|
||
[string] $nugetSpecTemplate = [System.IO.File]::ReadAllText([System.IO.Path]::Combine($scriptPath, "FabricHealerProxy.nuspec.template")) | ||
|
||
[string] $nugetSpecPath = "$scriptPath\FabricHealerProxy\bin\release\netstandard2.0\$($packageId).nuspec" | ||
|
||
[System.IO.File]::WriteAllText($nugetSpecPath, $nugetSpecTemplate.Replace("%PACKAGE_ID%", $packageId).Replace("%ROOT_PATH%", $scriptPath)) | ||
|
||
.\nuget.exe pack $nugetSpecPath -basepath $basePath -OutputDirectory bin\release\FabricHealerProxy\Nugets -properties NoWarn=NU5100,NU5128 | ||
} | ||
|
||
[string] $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition | ||
|
||
try { | ||
|
||
Push-Location $scriptPath | ||
|
||
Install-Nuget | ||
|
||
Build-Nuget "Microsoft.ServiceFabricApps.FabricHealerProxy" "$scriptPath\FabricHealerProxy\bin\release\netstandard2.0" | ||
} | ||
finally { | ||
|
||
Pop-Location | ||
} |
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
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,17 @@ | ||
|
||
$subscriptionId = "<YOUR-AZURE-SUBSCRIPTION-ID>" | ||
Try { | ||
Select-AzSubscription -SubscriptionId $subscriptionId -ErrorAction Stop | ||
} Catch { | ||
Login-AzAccount | ||
Set-AzContext -SubscriptionId $subscriptionId | ||
} | ||
|
||
$resourceGroup = "<YOUR-CLUSTER-RESOURCE-NAME>" | ||
$armTemplate = "service-fabric-healer.json" | ||
$armTemplateParameters = "service-fabric-healer.v1.1.0.831.parameters.json" | ||
|
||
cd "<LOCAL-FH-REPO-PATH>\Documentation\Deployment" | ||
|
||
New-AzResourceGroupDeployment -Name "deploy-service-fabric-healer" -ResourceGroupName $resourceGroup -TemplateFile $armTemplate -TemplateParameterFile $armTemplateParameters -Verbose -Mode Incremental | ||
|
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,29 @@ | ||
# Deploy FabricHealer using ARM | ||
|
||
Like all elementary services such as resource monitoring, Windows Update, scripts, scaling, etc., FabricHealer should be installed with your initial Service Fabric cluster deployment. | ||
|
||
There are two options: | ||
1. Add the resource provided in the ARM template [service-fabric-healer.json](service-fabric-healer.json) in the template which also deploys the Service Fabric cluster. | ||
To guarantee the correct deployment order the first resource has to depend on the cluster resource. | ||
Using 'dependsOn' makes sure that the Service Fabric Resource Provider deploys the application only after the cluster deployment step has completed. | ||
|
||
```ARM | ||
{ | ||
"apiVersion": "[variables('sfApiVersion')]", | ||
"type": "Microsoft.ServiceFabric/clusters/applicationTypes", | ||
"name": "[concat(parameters('clusterName'), '/', variables('applicationTypeName'))]", | ||
"location": "[resourceGroup().location]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'))]" | ||
], | ||
"properties": { | ||
"provisioningState": "Default" | ||
} | ||
}, | ||
``` | ||
|
||
2. The app can be deployed manually by using the provided PowerShell script file [Deploy-FabricHealer.ps1](Deploy-FabricHealer.ps1). | ||
|
||
|
||
## Further reading | ||
- [Upgrade the Service Fabric application by using Resource Manager](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-concept-resource-model#upgrade-the-service-fabric-application-by-using-resource-manager) |
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,116 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"clusterName": { | ||
"type": "string", | ||
"defaultValue": "", | ||
"metadata": { | ||
"description": "The Service Fabric cluster resource name from the Azure resource group. Example: servicefabriccluster123" | ||
} | ||
}, | ||
"applicationTypeVersionFabricHealer": { | ||
"type": "string", | ||
"defaultValue": "", | ||
"metadata": { | ||
"description": "Provide the app version number of FabricHealer. This must be identical with the version provided for the parameter appPackageUrl. Example: '1.1.0.831'" | ||
} | ||
}, | ||
"packageUrlFabricHealer": { | ||
"type": "string", | ||
"defaultValue": "", | ||
"metadata": { | ||
"description": "This has to be a public accessible URL for the sfpkg file which contains the FabricHealer app package. Example: https://github.com/microsoft/service-fabric-healer/releases/download/48361039/Microsoft.ServiceFabricApps.FabricHealer.Windows.SelfContained.1.1.0.831.sfpkg" | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"applicationTypeNameFabricHealer": "FabricHealerType", | ||
"applicationNameFabricHealer": "FabricHealerApplication", | ||
"serviceNameFabricHealer": "[concat(variables('applicationNameFabricHealer'), '~FabricHealerService')]", | ||
"serviceTypeNameFabricHealer": "FabricHealerType", | ||
"sfrpApiVersion": "2021-06-01" | ||
}, | ||
"resources": [ | ||
{ | ||
"apiVersion": "[variables('sfrpApiVersion')]", | ||
"type": "Microsoft.ServiceFabric/clusters/applicationTypes", | ||
"name": "[concat(parameters('clusterName'), '/', variables('applicationTypeNameFabricHealer'))]", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"provisioningState": "Default" | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('sfrpApiVersion')]", | ||
"type": "Microsoft.ServiceFabric/clusters/applicationTypes/versions", | ||
"name": "[concat(parameters('clusterName'), '/', variables('applicationTypeNameFabricHealer'), '/', parameters('applicationTypeVersionFabricHealer'))]", | ||
"location": "[resourceGroup().location]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applicationTypes/', variables('applicationTypeNameFabricHealer'))]" | ||
], | ||
"properties": { | ||
"provisioningState": "Default", | ||
"appPackageUrl": "[parameters('packageUrlFabricHealer')]" | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('sfrpApiVersion')]", | ||
"type": "Microsoft.ServiceFabric/clusters/applications", | ||
"name": "[concat(parameters('clusterName'), '/', variables('applicationNameFabricHealer'))]", | ||
"location": "[resourceGroup().location]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applicationTypes/', variables('applicationTypeNameFabricHealer'), '/versions/', parameters('applicationTypeVersionFabricHealer'))]" | ||
], | ||
"properties": { | ||
"provisioningState": "Default", | ||
"typeName": "[variables('applicationTypeNameFabricHealer')]", | ||
"typeVersion": "[parameters('applicationTypeVersionFabricHealer')]", | ||
"parameters": { | ||
"EnableDiskRepair": "true" | ||
}, | ||
"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": "[variables('sfrpApiVersion')]", | ||
"type": "Microsoft.ServiceFabric/clusters/applications/services", | ||
"name": "[concat(parameters('clusterName'), '/', variables('applicationNameFabricHealer'), '/', variables('serviceNameFabricHealer'))]", | ||
"location": "[resourceGroup().location]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.ServiceFabric/clusters/', parameters('clusterName'), '/applications/', variables('applicationNameFabricHealer'))]" | ||
], | ||
"properties": { | ||
"provisioningState": "Default", | ||
"serviceKind": "Stateless", | ||
"serviceTypeName": "[variables('serviceTypeNameFabricHealer')]", | ||
"instanceCount": "-1", | ||
"partitionDescription": { | ||
"partitionScheme": "Singleton" | ||
}, | ||
"correlationScheme": [], | ||
"serviceLoadMetrics": [], | ||
"servicePlacementPolicies": [] | ||
} | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
Documentation/Deployment/service-fabric-healer.v1.1.0.831.parameters.json
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,15 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"clusterName": { | ||
"value": "<YOUR-CLUSTER-RESOURCE-NAME>" | ||
}, | ||
"applicationTypeVersionFabricHealer": { | ||
"value": "1.1.0.831" | ||
}, | ||
"packageUrlFabricHealer": { | ||
"value": "<PUBLIC-ACCESSIBLE-URL-FOR-FABRICHEALER-SFPKG>" | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.