【问题标题】:How to update node count on Service Fabric cluster?如何更新 Service Fabric 群集上的节点数?
【发布时间】:2017-03-13 05:36:59
【问题描述】:

我正在尝试更新我的 Service Fabric 群集的节点数。我使用 PowerShell 通过以下命令部署下面的模板: New-AzureRmResourceGroupDeployment -name "ExampleDeployment3" -ResourceGroupName "myResourceGroup" -TemplateFile "template.json".

当我运行Get-AzureRmResourceGroupDeployment 时,我会得到一份以前所有部署尝试的列表。只有最新的ExampleDeployment3 是“正在运行”

{
  "$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')]"
      }
    }
  ]
}

当我这样做时,Deployment 会运行、运行、运行、运行。在 Azure 门户中,我可以看到 2 个新实例是“正在创建...”,而 5 个默认实例中有 4 个是“正在更新...”。 6/7 个节点处于“VM 停止”状态。唯一正在运行的是第一个节点。

但是,它似乎永远不会完成。我在其中一个“VM Stopped”节点上单击了“Start”,但它似乎不起作用。它仍然停留在“更新”或“创建”中。

【问题讨论】:

    标签: azure azure-service-fabric


    【解决方案1】:

    我没有通过 powershell 执行此操作的经验,因此我无能为力,但过去我一直通过 azure resource explorer 实现这一目标。您可以通过转到订阅->资源组->{{资源组名称}}->计算->vm 规模集来找到您的节点。您可以单击右上角的读/写以启用在那里编辑手臂模板。从那里开始,就像增加 vmss 上的实例数并保存一样简单。

    【讨论】:

      猜你喜欢
      • 2018-10-27
      • 2023-04-04
      • 2016-09-04
      • 2022-10-18
      • 2017-08-09
      • 2017-10-01
      • 2023-04-05
      • 2019-04-07
      • 2016-06-20
      相关资源
      最近更新 更多