如何更新 Service Fabric 群集上的节点数?
How to update node count on Service Fabric cluster?
我正在尝试更新我的 Service Fabric 集群的节点数。我使用 PowerShell 通过以下命令部署下面的模板:
New-AzureRmResourceGroupDeployment -name "ExampleDeployment3" -ResourceGroupName "myResourceGroup" -TemplateFile "template.json"
.
当我 运行 Get-AzureRmResourceGroupDeployment
时,我得到了所有以前的部署尝试的列表。只有最新的 ExampleDeployment3
是 "Running"
{
"$schema":"http://schema.management.azure.com/schemas/2015-01-01-preview/deploymentTemplate.json",
"contentVersion":"1.0.0.0",
"parameters":{
"existingVMSSName":{
"type":"string",
"metadata":{
"description":"Name of existing VM Scale Set"
}
},
"newCapacity":{
"type":"int",
"metadata":{
"description":"Number of desired VM instances"
}
},
"vmSku": {
"type": "string",
"defaultValue": "Standard_A1",
"metadata": {
"description": "Size of VMs in the VM Scale Set."
}
}
},
"resources":[
{
"type":"Microsoft.Compute/virtualMachineScaleSets",
"apiVersion":"2016-03-30",
"name":"[parameters('existingVMSSName')]",
"location":"[resourceGroup().location]",
"sku":{
"name":"[parameters('vmSku')]",
"tier":"Standard",
"capacity":"[parameters('newCapacity')]"
}
}
]
}
当我这样做时,部署 运行s、运行s、运行s 和 运行s。在 Azure 门户中,我可以看到 2 个新实例是 "Creating...",5 个默认实例中有 4 个是 "Updating..."。 6/7 节点获得 "VM stopped" 状态。唯一 运行ning 是第一个节点。
然而,它似乎从未完成。我在其中一个 "VM Stopped" 节点上单击了 "Start",但它似乎不起作用。它仍然卡在 "Updating" 或 "Creating".
我没有通过 powershell 执行此操作的经验,因此我无能为力,但过去我总是通过 azure resource explorer 实现此操作。您可以通过转到订阅->资源组->{{资源组名称}}->计算->vm 规模集来找到您的节点。您可以单击右上角的 read/write 以启用在那里编辑手臂模板。从那里开始,就像增加 vmss 上的实例计数并保存一样简单。
我正在尝试更新我的 Service Fabric 集群的节点数。我使用 PowerShell 通过以下命令部署下面的模板:
New-AzureRmResourceGroupDeployment -name "ExampleDeployment3" -ResourceGroupName "myResourceGroup" -TemplateFile "template.json"
.
当我 运行 Get-AzureRmResourceGroupDeployment
时,我得到了所有以前的部署尝试的列表。只有最新的 ExampleDeployment3
是 "Running"
{
"$schema":"http://schema.management.azure.com/schemas/2015-01-01-preview/deploymentTemplate.json",
"contentVersion":"1.0.0.0",
"parameters":{
"existingVMSSName":{
"type":"string",
"metadata":{
"description":"Name of existing VM Scale Set"
}
},
"newCapacity":{
"type":"int",
"metadata":{
"description":"Number of desired VM instances"
}
},
"vmSku": {
"type": "string",
"defaultValue": "Standard_A1",
"metadata": {
"description": "Size of VMs in the VM Scale Set."
}
}
},
"resources":[
{
"type":"Microsoft.Compute/virtualMachineScaleSets",
"apiVersion":"2016-03-30",
"name":"[parameters('existingVMSSName')]",
"location":"[resourceGroup().location]",
"sku":{
"name":"[parameters('vmSku')]",
"tier":"Standard",
"capacity":"[parameters('newCapacity')]"
}
}
]
}
当我这样做时,部署 运行s、运行s、运行s 和 运行s。在 Azure 门户中,我可以看到 2 个新实例是 "Creating...",5 个默认实例中有 4 个是 "Updating..."。 6/7 节点获得 "VM stopped" 状态。唯一 运行ning 是第一个节点。
然而,它似乎从未完成。我在其中一个 "VM Stopped" 节点上单击了 "Start",但它似乎不起作用。它仍然卡在 "Updating" 或 "Creating".
我没有通过 powershell 执行此操作的经验,因此我无能为力,但过去我总是通过 azure resource explorer 实现此操作。您可以通过转到订阅->资源组->{{资源组名称}}->计算->vm 规模集来找到您的节点。您可以单击右上角的 read/write 以启用在那里编辑手臂模板。从那里开始,就像增加 vmss 上的实例计数并保存一样简单。