如何更新Service Fabric群集上的节点数?

时间:2016-10-31 05:30:03

标签: azure azure-service-fabric

我正在尝试更新Service Fabric Cluster的节点数。我使用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')]"
      }
    }
  ]
}

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

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

1 个答案:

答案 0 :(得分:0)

我没有通过powershell这样做的经验,所以我无法帮助那里,但在过去我总是通过azure resource explorer实现这一目标。您可以通过转到subscription->资源组 - > {{资源组名称}} - > compute-> vm比例集来找到您的节点。您可以单击右上角的读/写以在此处编辑手臂模板。从那里开始就像在你的vmss上加上实例计数并保存一样简单。

相关问题