部署后如何更新服务结构的节点类型

How to update the nodetypes of service fabric after deployment

有什么方法可以在部署后更新 Service Fabric 集群的节点类型吗?

我想向集群动态添加新的虚拟机规模集,但如果我无法在服务结构集群中添加新的节点类型,则无法为这个新的虚拟机规模集创建新的放置约束。

我找不到使用最新的 ARM 服务结构提供程序的方法。但是使用旧的,是可以的。

armclient put /subscriptions/8393a037-5d39-462d-a583-09915b4493df/resourceGroups/ServiceFabricTest3/providers/Microsoft.ServiceFabric/clusters/pksservicefabric?api-version=2015-01-01-alpha @test.json

我学到的一些东西是,下面的 test.json 文件必须有

  • 给定的管理端点
  • expectedVmResources 应该只给出其主节点。
  • 无法提供实例计数。

这让我相信 ARM 提供商还有一段路要走。

{
  "location": "West Europe",
  "properties": {
    "managementEndpoint": "https://pksservicefabric.westeurope.cloudapp.azure.com:19080",
    "certificate": {
      "thumbprint": "4B729ADE19BF2742BB09BB257C6BD8538DBDB1A4",
      "x509StoreName": "My"
    },
    "nodeTypes": [
      {
        "name": "nt1vm",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": true
      },
      {
        "name": "nt2vm",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      },
      {
        "name": "nt3vm",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      },
      {
        "name": "algorithm-a0",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      },
      {
        "name": "algorithm-a1",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      },
      {
        "name": "algorithm-a2",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      },
      {
        "name": "algorithm-a3",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      },
      {
        "name": "algorithm-a4",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      },
      {
        "name": "algorithm-a5",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      },
      {
        "name": "algorithm-a6",
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": false
      }
    ],
    "expectedVmResources": [
      {
        "name": "nt1vm",
        "nodeTypeRef": "nt1vm",
        "vmInstanceCount": 5,
        "isVmss": true
      }
    ]
  }
}