Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block Upgrade of Managed Service Fabric Clusters #62

Merged
merged 3 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AzureBasicLoadBalancerUpgrade'

# Version number of this module.
ModuleVersion = '2.0.18'
ModuleVersion = '2.0.19'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'ValidateScenario'

# Version number of this module.
ModuleVersion = '0.1.5'
ModuleVersion = '0.1.6'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ Function Test-SupportedMigrationScenario {
log -Message $message -Severity 'Warning'
}
}

# check is vmss is a managed service fabric cluster, which are not supported for upgrade
log -Message "[Test-SupportedMigrationScenario] Checking whether VMSS scale set '$($vmss.name)' is a managed Service Fabric cluster..."
If ($vmss.VirtualMachineProfile.ExtensionProfile.Extensions.type -contains 'ServiceFabricMCNode') {

$message = "[Test-SupportedMigrationScenario] VMSS appears to be a Managed Service Fabric cluster based on extension profile (includes type 'ServiceFabricMCNode'). Managed Service Fabric clusters are not supported for upgrade."
log -Message $message -Severity 'Error' -terminateOnError
}

# check if vmss is service fabric cluster, warn about possible downtime
log -Message "[Test-SupportedMigrationScenario] Checking whether VMSS scale set '$($vmss.name)' is a Service Fabric cluster..."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.16.1.55165",
"templateHash": "932140331037582989"
}
},
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Region"
}
},
"clusterName": {
"type": "string",
"defaultValue": "[format('clu{0}', uniqueString(newGuid()))]",
"maxLength": 23,
"minLength": 4,
"metadata": {
"description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only"
}
},
"clusterSku": {
"type": "string",
"defaultValue": "Basic",
"allowedValues": [
"Basic",
"Standard"
]
},
"adminUserName": {
"type": "string",
"defaultValue": "vmadmin"
},
"adminPassword": {
"type": "securestring",
"defaultValue": "[newGuid()]"
},
"clientCertificateThumbprint": {
"type": "string",
"defaultValue": "F28CE76CBD99AF46245942B05C9B368BAE9BF226",
"metadata": {
"description": "Client Certificate Thumbprint"
}
},
"nodeTypeName": {
"type": "string",
"defaultValue": "NT1",
"maxLength": 9
},
"vmImagePublisher": {
"type": "string",
"defaultValue": "MicrosoftWindowsServer"
},
"vmImageOffer": {
"type": "string",
"defaultValue": "WindowsServer"
},
"vmImageSku": {
"type": "string",
"defaultValue": "2019-Datacenter"
},
"vmImageVersion": {
"type": "string",
"defaultValue": "latest"
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_D2s_v3"
},
"vmInstanceCount": {
"type": "int",
"defaultValue": 3
},
"dataDiskSizeGB": {
"type": "int",
"defaultValue": 128
},
"managedDataDiskType": {
"type": "string",
"defaultValue": "StandardSSD_LRS",
"allowedValues": [
"Standard_LRS",
"StandardSSD_LRS",
"Premium_LRS"
]
},
"resourceGroupName": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.ServiceFabric/managedClusters",
"apiVersion": "2022-08-01-preview",
"name": "[parameters('clusterName')]",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('clusterSku')]"
},
"properties": {
"dnsName": "[toLower(parameters('clusterName'))]",
"adminUserName": "[parameters('adminUserName')]",
"adminPassword": "[parameters('adminPassword')]",
"clientConnectionPort": 19000,
"httpGatewayConnectionPort": 19080,
"clients": [
{
"isAdmin": true,
"thumbprint": "[parameters('clientCertificateThumbprint')]"
}
],
"loadBalancingRules": [
{
"frontendPort": 8080,
"backendPort": 8080,
"protocol": "tcp",
"probeProtocol": "tcp"
}
]
}
},
{
"type": "Microsoft.ServiceFabric/managedClusters/nodeTypes",
"apiVersion": "2022-08-01-preview",
"name": "[format('{0}/{1}', parameters('clusterName'), parameters('nodeTypeName'))]",
"properties": {
"isPrimary": true,
"vmImagePublisher": "[parameters('vmImagePublisher')]",
"vmImageOffer": "[parameters('vmImageOffer')]",
"vmImageSku": "[parameters('vmImageSku')]",
"vmImageVersion": "[parameters('vmImageVersion')]",
"vmSize": "[parameters('vmSize')]",
"vmInstanceCount": "[parameters('vmInstanceCount')]",
"dataDiskSizeGB": "[parameters('dataDiskSizeGB')]",
"dataDiskType": "[parameters('managedDataDiskType')]"
},
"dependsOn": [
"[resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName'))]"
]
}
],
"outputs": {
"serviceFabricExplorer": {
"type": "string",
"value": "[format('https://{0}:{1}', reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview').fqdn, reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview').httpGatewayConnectionPort)]"
},
"clientConnectionEndpoint": {
"type": "string",
"value": "[format('{0}:{1}', reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview').fqdn, reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview').clientConnectionPort)]"
},
"clusterProperties": {
"type": "object",
"value": "[reference(resourceId('Microsoft.ServiceFabric/managedClusters', parameters('clusterName')), '2022-08-01-preview')]"
}
}
}