Поделиться через


Tutorial: Deploy a Service Fabric managed cluster

In this tutorial series, we discuss:

This part of the series covers how to:

  • Подключитесь к своей учетной записи Azure
  • Создание новой группы ресурсов
  • Развертывание управляемого кластера Service Fabric.
  • Add a Primary node type to the cluster

Предпосылки

Перед началом работы с этим руководством выполните следующие действия:

Подключитесь к своей учетной записи Azure

Replace <your-subscription> with the subscription string for your Azure account, and connect:

Login-AzAccount
Set-AzContext -SubscriptionId <your-subscription>

Создание новой группы ресурсов

Next, create the resource group for the Managed Service Fabric cluster, replacing <your-rg> and <location> with the desired group name and location.

$resourceGroup = "myResourceGroup"
$location = "EastUS2"

New-AzResourceGroup -Name $resourceGroup -Location $location

Развертывание управляемого кластера Service Fabric.

Создание управляемого кластера Service Fabric

In this step, you create a Service Fabric managed cluster using the New-AzServiceFabricManagedCluster PowerShell command. The following example creates a cluster named myCluster in the resource group named myResourceGroup. This resource group was created in the previous step in the eastus2 region.

For this step, provide your own values for the following parameters:

  • Cluster Name: Enter a unique name for your cluster, such as mysfcluster.
  • Admin Password: Enter a password for the admin to be used for Remote Desktop Protocol (RDP) on the underlying VMs in the cluster.
  • Client Certificate Thumbprint: Provide the thumbprint of the client certificate that you would like to use to access your cluster. Если у вас нет сертификата, выполните действия по настройке и получению сертификата, чтобы создать самозаверяющий сертификат.
  • Cluster SKU: Specify the type of Service Fabric managed cluster to deploy. Basic SKU clusters are meant for test deployments only, and don't allow for node type addition or removal.
$clusterName = "<unique cluster name>"
$password = "Password4321!@#" | ConvertTo-SecureString -AsPlainText -Force
$clientThumbprint = "<certificate thumbprint>"
$clusterSku = "Standard"

New-AzServiceFabricManagedCluster -ResourceGroupName $resourceGroup -Location $location -ClusterName $clusterName -ClientCertThumbprint $clientThumbprint -ClientCertIsAdmin -AdminPassword $password -Sku $clusterSKU -Verbose

Add a primary node type to the Service Fabric managed cluster

In this step, you add a primary node type to the cluster that you created. Every Service Fabric cluster must have at least one primary node type.

For this step, provide your own values for the following parameters:

  • Node Type Name: Enter a unique name for the node type to be added to your cluster, such as "NT1".

Примечание.

If the node type being added is the first or only node type in the cluster, the Primary property must be used.

$nodeType1Name = "NT1"

New-AzServiceFabricManagedNodeType -ResourceGroupName $resourceGroup -ClusterName $clusterName -Name $nodeType1Name -Primary -InstanceCount 5

Для выполнения этой команды может потребоваться несколько минут.

Проверка развертывания

Проверка развернутых ресурсов

Once the deployment completes, find the Service Fabric Explorer value in the Service Fabric managed cluster resource overview page in Portal. When prompted for a certificate, use the certificate for which the client thumbprint was provided in the PowerShell command.

Это важно

Manually making changes to the resources in a managed cluster isn't supported.

Дальнейшие действия

In this step we created and deployed our first Service Fabric managed cluster. Дополнительные сведения о масштабировании кластера см. в статье: