简体   繁体   English

将节点添加到Service Fabric群集

[英]Add nodes to Service Fabric cluster

For some reason I can't find how to perform the most basic operation with the service fabric cluster: add more nodes. 出于某种原因,我无法找到如何使用服务结构集群执行最基本的操作:添加更多节点。 Please advise. 请指教。 The closest I found is https://msdn.microsoft.com/en-us/library/azure/mt125881.aspx , which still seems to be not what I want. 我找到的最接近的是https://msdn.microsoft.com/en-us/library/azure/mt125881.aspx ,它似乎仍然不是我想要的。 All I need is a way to change a number of nodes; 我只需要一种改变节点的方法; I currently have five A1 nodes in my cluster (simplest possible configuration) and I want six. 我目前在我的集群中有五个A1节点(最简单的配置),我想要六个。

1) The quickest way to change the number of instances in the VMSS/Node type in your cluster is to submit a change to Microsoft.Compute/virtualMachineScaleSets resource with the change to the "capacity" tag under "sku". 1)更改群集中VMSS / Node类型实例数的最快方法是向Microsoft.Compute / virtualMachineScaleSets资源提交更改,并更改“sku”下的“capacity”标记。

Adding of nodes should not result in any data loss to your stateful services. 添加节点不应导致有状态服务丢失任何数据。 Deleting a node could, so you will need to gracefully shut down the node first and then delete that instance. 删除节点可能,因此您需要首先正常关闭节点,然后删除该实例。

once the new nodes are added, the SF resource balancer will do the load balancing as appropriate. 添加新节点后,SF资源平衡器将根据需要进行负载平衡。

2) The best way to scale in and out is to set up autoscale rules on VMSS/Nodetype. 2)扩展和扩展的最佳方法是在VMSS / Nodetype上设置自动缩放规则。 refer to https://azure.microsoft.com/en-us/documentation/articles/service-fabric-cluster-scale-up-down/ for details. 有关详细信息,请参阅https://azure.microsoft.com/en-us/documentation/articles/service-fabric-cluster-scale-up-down/

3) Once the portal experience for VMSS is enabled the experience of adding and/removing nodes will become simple, till then you have to issue manual ARM commands. 3)启用VMSS的门户体验后,添加和/或删除节点的体验将变得简单,直到那时您必须发出手动ARM命令。

4) https://msdn.microsoft.com/en-us/library/azure/mt125881.aspx - new node configuration API - you should not be using it for clusters you deploy to Azure. 4) https://msdn.microsoft.com/en-us/library/azure/mt125881.aspx - 新节点配置API - 您不应将其用于部署到Azure的群集。 this happens automatically, via the Service fabric extension that gets called once a new VMSS instance shows up. 这是通过一个新的VMSS实例出现时调用的Service Fabric扩展自动发生的。

One way of doing this would be to redeploy your template. 这样做的一种方法是重新部署模板。 If you don't have a template and simply created your cluster using the portal, go to create a new cluster, and at the point before creation, download the template, as recommended here. 如果您没有模板并且只是使用门户创建了集群,请转到创建新集群,在创建之前,按照此处的建议下载模板

Now obviously you don't want to have a whole new cluster, so what you want to do is redeploy the template to the existing cluster in incremental mode. 现在显然您不希望拥有一个全新的集群,因此您要做的是以增量模式将模板重新部署到现有集群 Add a deployment resource to the template, making sure the mode element is Incremental. 将部署资源添加到模板,确保mode元素为Incremental。 (I believe deployments actually default to incremental mode, so this may not be necessary... but just in case ;) ) (我相信部署实际上默认为增量模式,所以这可能没有必要......但以防万一;))

{
  "apiVersion": "[variables('apiVersionRm')]",
  "name": "[variables('nestedDeploymentNameVnet')]",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "mode": "Incremental",

And finally, to change the amount of nodes in the scale set, you simply want to change the number in the capacity element of the scale set. 最后,要更改比例集中的节点数量,您只需要更改比例集的capacity元素中的数字。

"sku": {
    "name": "[parameters('vmNodeType0Size')]",
    "capacity": "[parameters('node0Capacity')]",
    "tier": "Standard"

You can see I have mine as a parameter, so I can easily change the number to whatever I need it to be when I redeploy. 你可以看到我有我的参数,所以当我重新部署时,我可以轻松地将数字更改为我需要的数字。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM