Scale up a Service Fabric cluster primary node type 上的 Microsoft 参考链接
我对上述查询的发现。我已成功将 Service Fabric Cluster VMSS 操作系统从 2016 升级到 2019
-在 ARM 模板中新创建的 VMSS 不是 Service Fabric 群集的一部分。在 nodeTypes
下执行的更改
"managementEndpoint": "[concat('https://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]",
"nodeTypes": [
{
"name": "[parameters('vmNodeType2Name')]",
"applicationPorts": {
*
*
},
当您部署具有上述更改的 ARM 模板时,新创建的 VMSS 将成为现有服务结构集群的一部分。
-使用以下命令连接服务结构集群
$clusterName = "Cluser-URL:19000"
$thumb = "xxxxxxxxxxx"
Connect-ServiceFabricCluster `
-ConnectionEndpoint $clusterName `
-KeepAliveIntervalInSec 10 `
-X509Credential `
-ServerCertThumbprint $thumb `
-FindType FindByThumbprint `
-FindValue $thumb `
-StoreLocation CurrentUser `
-StoreName My
-禁用需要删除的服务结构集群节点(即2016 VMSS)
$nodeNames = @("_NTvm1_0","_NTvm1_1","_NTvm1_2","_NTvm1_3","_NTvm1_4")
Write-Host "Disabling nodes..."
foreach($name in $nodeNames){
Disable-ServiceFabricNode -NodeName $name -Intent RemoveNode -Force
}
通过初始成功执行上述命令,节点将在一段时间后处于禁用状态,它将处于禁用状态。这可以使用服务结构资源管理器进行监控
-下一步是删除我们在上一步中禁用的VMSS
$scaleSetName = "NTvm1"
$resourceGroupName = "RG-NAME"
Remove-AzVmss `
-ResourceGroupName $resourceGroupName `
-VMScaleSetName $scaleSetName `
-Force
Write-Host "Removed scale set $scaleSetName"
-此时服务结构资源管理器以找不到页面错误结束。不要惊慌。需要将负载均衡设置更改为新创建的 VMSS
$lbname="Newly Created LB Name"
$oldPublicIpName="Old LB PublicIP"
$newPublicIpName="New LB PublicIP"
$oldprimaryPublicIP = Get-AzPublicIpAddress -Name $oldPublicIpName -ResourceGroupName $groupname
$primaryDNSName = $oldprimaryPublicIP.DnsSettings.DomainNameLabel
$primaryDNSFqdn = $oldprimaryPublicIP.DnsSettings.Fqdn
Remove-AzLoadBalancer -Name $lbname -ResourceGroupName $groupname -Force
Remove-AzPublicIpAddress -Name $oldPublicIpName -ResourceGroupName $groupname -Force
-需要更新 DNS 设置
settings of Public IP address related to old Primary Node Type
$PublicIP = Get-AzPublicIpAddress -Name $newPublicIpName -ResourceGroupName $groupname
$PublicIP.DnsSettings.DomainNameLabel = $primaryDNSName
$PublicIP.DnsSettings.Fqdn = $primaryDNSFqdn
Set-AzPublicIpAddress -PublicIpAddress $PublicIP
完成后我们就可以开始了
-使用 Get-ServiceFabricClusterHealth 命令检查服务结构的健康状况
注意
确保您的集群可靠性级别设置为“银”。 Microsoft 建议将此用于生产环境。