Create Service Fabric Cluster
Let us get started by creating an Azure Service Fabric cluster. A Service Fabric cluster is basically a set of virtual machines connected to each other with microservices deployed and managed on them.
Here we are using Azure Resource Manager template, which is a JSON file and defines the configurations for your Service Fabric project. You just have to provide the parameters and their values and on deployment, Azure creates your cluster based on the parameters provided. You can read our blog on using ARM template for your Azure deployments to achieve better understanding.
Pre-requisites
Before creating the Service Fabric cluster, make sure to have the following requirements fulfiled:
Sign in to Microsoft Azure Portal with your credentials.
Create a resource group with the key-vault resources i.e. the certificate to be used with the Service Fabric cluster.
Download a sample template from Azure Resource Manager templates repository.
Note
We will be using the Azure template for 5-node Service Fabric cluster for demonstration in the documentation.
Create the Service Fabric Cluster
After setting up the requirements for creating the cluster, make the following changes in the ARM template:
- In the json file, change the default value of the vmImageSku parameter in the parameters section from 2016-Datacenter to 2016-Datacenter-with-Containers. This will set up VMSS nodes with Docker capabilities pre-installed.
- Update the ARM template to allow for Open networking mode. Here is how to change the networking mode. We will learn in the later chapter about this mode and why to use it.
- Among the load balancer ports that you would like to expose, add one with a value of 8251 which is the port value on which the NCache Web Manager will be running. Change the distribution mode for this port to SourceIP. This would allow for the NCache Web Manager to be accessed with a sticky session to provide a consistent state between server and client when in the process of creating caches and adding nodes to them.
After successfully adjusting the template, click on Deploy from your application to successfully deploy the parameters and create the application.
Once done move forward to the next step of creating NCache Cluster service.
See Also
Deploying NCache in Azure Service Fabric
Create NCache Cluster Service
Create NCache Discovery Service
Create NCache Management Service