【问题标题】:How to use existing scale set as cluster node in Azure Service Fabric cluster如何将现有规模集用作 Azure Service Fabric 群集中的群集节点
【发布时间】:2023-04-05 03:48:01
【问题描述】:

我正在尝试通过 ARM 模板部署 Service Fabric 群集并附加现有的规模集。管道正在正确执行,没有错误,但是当我在门户中打开服务结构时,状态为“等待节点”。我不知道我在哪里犯错。我使用的是规模集中的相同证书指纹。我的证书存储在 KeyVault 中。这是我的 ARM 模板

{
    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "clusterName": {
            "type": "string",
            "defaultValue": "GEN-UNIQUE",
            "metadata": {
                "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only"
            }
        },
        "clusterLocation": {
            "type": "string",
            "defaultValue": "westus",
            "metadata": {
                "description": "Location of the Cluster"
            }
        }, 
        "applicationStartPort": {
            "type": "int",
            "defaultValue": 20000
        },
        "applicationEndPort": {
            "type": "int",
            "defaultValue": 30000
        },
        "ephemeralStartPort": {
            "type": "int",
            "defaultValue": 49152
        },
        "ephemeralEndPort": {
            "type": "int",
            "defaultValue": 65534
        },
        "fabricTcpGatewayPort": {
            "type": "int",
            "defaultValue": 19000
        },
        "fabricHttpGatewayPort": {
            "type": "int",
            "defaultValue": 19080
        },
        "clusterProtectionLevel": {
            "type": "string",
            "allowedValues": [
                "None",
                "Sign",
                "EncryptAndSign"
            ],
            "defaultValue": "EncryptAndSign",
            "metadata": {
                "description": "Protection level.Three values are allowed - EncryptAndSign, Sign, None. It is best to keep the default of EncryptAndSign, unless you have a need not to"
            }
        },
        "certificateThumbprint": {
            "type": "string",
            "defaultValue": "GEN-CUSTOM-DOMAIN-SSLCERT-THUMBPRINT",
            "metadata": {
                "description": "Certificate Thumbprint"
            }
        },
        "certificateStoreValue": {
            "defaultValue": "My",
            "allowedValues": [
                "My"
            ],
            "type": "string",
            "metadata": {
                "description": "The store name where the cert will be deployed in the virtual machine"
            }
        },
        "supportLogStorageAccountName": {
            "type": "string",
            "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]",
            "metadata": {
                "description": "Name for the storage account that contains support logs from the cluster"
            }
        },
        "blobEndpoint":{
            "type": "string"
        },
        "queueEndpoint":{
            "type": "string"
        },
        "tableEndpoint":{
            "type": "string"
        },
        "InstanceCount": {
            "type": "int",
            "defaultValue": 5,
            "metadata": {
                "description": "Instance count for node type"
            }
        },
        "vmNodeTypeName": {
            "type": "string"
        },
        "nodeTypes":{
            "type": "array"
        },
        "lbIPName": {
            "type": "string"
        },
        "fqdn":{
            "type": "string"
        },
        "reliabilityLevel":{
            "type": "string"
        },
        "upgradeMode":{
            "type": "string"
        }
    },
    "variables":{       
        "storageApiVersion": "2016-01-01",
        "publicIPApiVersion": "2015-06-15"
        },
"resources": [
   {
    "apiVersion": "2018-02-01",
    "type": "Microsoft.ServiceFabric/clusters",
    "name": "[parameters('clusterName')]",
    "location": "[parameters('clusterLocation')]",
    "dependsOn": [],
    "properties": {
        "addonFeatures": [
            "DnsService"
        ],
        "certificate": {
            "thumbprint": "[parameters('certificateThumbprint')]",
            "x509StoreName": "[parameters('certificateStoreValue')]"
        },
        "clientCertificateCommonNames": [],
        "clientCertificateThumbprints": [],
        "clusterState": "Default",
        "diagnosticsStorageAccountConfig": {
            "storageAccountName": "[parameters('supportLogStorageAccountName')]",
            "protectedAccountKeyName": "StorageAccountKey1",
            "blobEndpoint": "[parameters('blobEndpoint')]",
            "queueEndpoint": "[parameters('queueEndpoint')]",
            "tableEndpoint": "[parameters('tableEndpoint')]"
        },
        "fabricSettings": [
            {
                "parameters": [
                    {
                        "name": "ClusterProtectionLevel",
                        "value": "[parameters('clusterProtectionLevel')]"
                    }
                ],
                "name": "Security"
            }
        ],
        "managementEndpoint": "[concat('https://',parameters('fqdn'),':',parameters('fabricHttpGatewayPort'))]",
        "nodeTypes": "[parameters('nodeTypes')]",
        "reliabilityLevel": "[parameters('reliabilityLevel')]",
        "upgradeMode": "[parameters('upgradeMode')]"
    }
   }
 ]  

}

【问题讨论】:

    标签: azure powershell azure-service-fabric azure-resource-manager azure-vm-scale-set


    【解决方案1】:

    对于这个部署错误,你可以在this blog查看这些问题和解决方法。 这可能是由证书指纹问题和 KeyVault 问题引起的。

    如果运气不好,请尝试更改 VM 大小或更改节点的区域,或者像 this 那样重建。

    有关使用密钥保管库证书的 SFC 部署的更多参考,您也可以参考this article

    【讨论】:

    • 我们可以使用已经创建的规模集还是现有的规模集作为 Service Fabric 集群中的节点。
    • 我认为我们不能使用现有的规模集,因为在 Azure 门户上创建 SFC 资源时没有允许我们选择现有规模集的选项。参考这个NodeTypeDescription对象,这个也没有这个属性。
    • 这就是我上周想要实现的目标,但我失败了。最后一个问题,我们可以在 Service Fabric 集群中附加多少规模集或节点类型,因为在门户中,如果我们尝试从 ARM 模板部署它,我们最多可以附加 3 个节点类型。
    • cluster configuration 中的节点类型最多附加 3 个,它定义了规模集编号。但是对于一个节点类型中的每个 VM 实例,它取决于reliability tier of the cluster
    猜你喜欢
    • 2016-09-04
    • 2018-10-27
    • 2023-03-02
    • 2017-10-16
    • 2016-10-23
    • 2022-10-18
    • 2017-03-13
    • 2019-02-23
    • 2020-10-03
    相关资源
    最近更新 更多