Tuesday, April 12, 2022

 This article is a continuation of the series of articles with the most recent discussion on managed Service Fabric cluster as referred here.

Azure offers a control plane for all resources that can be deployed to the cloud and services take advantage of them both for themselves and their customers. While Azure Functions allow extensions via new resources, Azure Resource provider and ARM APIs provide extensions via existing resources. This eliminates the need to have new processes introduced around new resources and is a significant win for reusability and user convenience. New and existing resources are not the only way to write extensions, there are other options such as writing it in the Azure Store or via other control planes such as container orchestration frameworks and third-party platforms. This article focuses on deploying Service Fabric via ARM templates.

 

The service fabric managed cluster itself is represented by an ARM template which is a JSON notation and it defines the infrastructure and configuration for the cluster. The template uses declarative syntax so there is no need to write commands to create the deployment. The template takes parameters such as shown here which is then applied to the resource and the cluster is created.

{

    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",

    "contentVersion": "1.0.0.0",

    "parameters": {

        "clusterName": {

            "value": "GEN-UNIQUE"

        },

        "clusterSku": {

            "value": "Basic"

        },

        "adminUserName": {

            "value": "GEN-UNIQUE"

        },

        "adminPassword": {

            "value": "GEN-PASSWORD"

        },

        "clientCertificateThumbprint": {

            "value": "GEN-SF-CERT-THUMBPRINT"

        },

        "nodeTypeName": {

            "value": "NT1"

        },

        "vmImagePublisher": {

            "value": "MicrosoftWindowsServer"

        },

        "vmImageOffer": {

            "value": "WindowsServer"

        },

        "vmImageSku": {

            "value": "2019-Datacenter"

        },

        "vmImageVersion": {

            "value": "latest"

        },

        "vmSize": {

            "value": "Standard_D2s_v3"

        },

        "vmInstanceCount": {

            "value": 5

        },

        "dataDiskSizeGB": {

            "value": 128

        },

        "managedDataDiskType": {

            "value": "StandardSSD_LRS"

        }

    }

}

 

 A vmInstanceCount of 5 is sufficient for a quorum of 3 in an ensemble of 5.

Encryption options can be selected for the VM.

The multiplePlacementGroups can be used in the nodeType definition to specify a large VMSS. Each nodeType is backed by a VMSS.

Managed identity can be configured which is specified by a property vmManagedIdentity that has been added to node type definitions and contains a list of identities that may be used.

Specifying the managed disk implies the disk type and size do not necessarily need to be specified and can be used for all storage types.

 

Deployment using the template can be kicked off directly from the CLI, PowerShell, portal and SDK. All of these provide programmability options.  Resources can be cleaned up by deleting the resource group. The following ARM template is used to create a basic managed service fabric cluster of type NT-1

No comments:

Post a Comment