问题
Is there any way to update the nodetypes of a service fabric cluster after deployment?
I want to dynamicly add a new vm scaleset to the cluster, but if I cannot add a new node type in the service fabric cluster - then its not possible to create new placement constrains for this new vm scaleset.
回答1:
I have found no way using the newest ARM service fabric provider. But using an older one, it is possible.
armclient put /subscriptions/8393a037-5d39-462d-a583-09915b4493df/resourceGroups/ServiceFabricTest3/providers/Microsoft.ServiceFabric/clusters/pksservicefabric?api-version=2015-01-01-alpha @test.json
a few things that I learned was, that the below test.json file has to have
- its managementEndpoint given
- expectedVmResources should only have its primary node given.
- that one cannot provide instance count.
This leads me to believe that the ARM provider has some way to go.
{
"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
}
]
}
}
来源:https://stackoverflow.com/questions/35867851/how-to-update-the-nodetypes-of-service-fabric-after-deployment