Azure Service Fabric is a distributed systems platform that makes it easy to package, deploy and manage scalable and reliable microservices. Service Fabric also addresses the significant challenges in developing and managing cloud applications.
In this post, we will explore how to host an ASP.NET Core web application, alongside a stateless and a stateful service on an Azure Service Fabric cluster, and show:
- how you can deploy it on Azure
- how you can access it using Azure Service Fabric cluster’s client connection endpoint, and then
- how you can access it using a custom domain.
Setup Service Fabric Cluster
First of all, you need to setup an Azure Service Fabric cluster. For the purposes of this demo, we will demonstrate how you can deploy such a cluster quickly, thus skipping some steps that are necessary for production environments.
To do so from the Azure Portal, click first on the New button and then, from the Compute blade, scroll down to Service Fabric Cluster and click on it; a new blade will appear for you to configure the cluster in four easy steps.
Step 1. Configure the basics
In the Basics blade you will be asked to give a name to the cluster, select the operating system, set VM credentials, and finally select the subscription, resource group and location for your cluster.
Steps 2. Cluster Configuration
In the second blade:
- select the number of node types, where in each node type you can define the VM sizes, the number of VMs, and their properties
- configure your node type by configuring the durability tier, Bronze for Standard_A/D/DS SKUs and Gold for G5
- select the Virtual Machine size based on your needs and the initial VM scale capacity
Step 3. Security
In this step you can secure cluster access with an X509 certificate, but for this demo we will use the Unsecure mode (not recommended for production systems)
Step 4. Summary
In the last step, validate your options and click the Create button.
Then the deployment process will begin and in about 20 minutes your cluster will be ready for use.