New Cluster in Azure

The PowerShell script CreateNewCluster_DeployApps.ps1 creates new Service Fabric cluster in Azure cloud, registers application for Azure Active Directory authentication, configures and deploys SupercondActor Business Platform applications.

Prerequisites

Before you run provided PowerShell scripts make sure your computer meets the software prerequisites outlined below.
Note: Provided instructions and scripts are for Windows platform.

1. Azure PowerShell

Azure PowerShell provides a set of cmdlets that use the Azure Resource Manager model for managing your Azure resources. Read this article which explains the steps to install the Azure PowerShell modules in a Windows environment using PowerShellGet.

2. OpenSSL

To process cluster certificate needed to communicate with the Service Fabric cluster, provided scripts use OpenSSL software developed by the OpenSSL Project.
One of the places where you can download setup package for Windows platform is slproweb.com/products/Win32OpenSSL.html

Script

Parameters

You can change these values, though the script can be run as-is, using default values and randomly generated names. All information will be written into output file in the .\cluster\[cluster name] folder.

User-defined configuration information:

# Cluster Name - must be globally unique in the region
#  (if not provided will be generated random):
$clusterName = ""

# Cluster location code
$clusterLoc = "southcentralus"

# Number of cluster nodes. Possible values: 1, 3-99
$clusterSize = 3

# Type of VM to use in the cluster
$vmSKU = "Standard_D2_v2"

# Operations Management SKU. Can be "Free", "PerGB2018", "Standalone", "PerNode"
$omsSku = "PerGB2018"

# Certificate password
#  (if not provided will be generated and written to the ClusterInfo file):
$certPassword = ""

# Password for VM RDP user
#  (if not provided will be generated and written to the ClusterInfo file):
$vmAdminPassword = ""

Azure Authentication

The script will ask you to authenticate to your Azure subscription. You must have admin rights in the selected subscription.

For advanced authentication configuration the script will also ask you to authenticate for access to Microsoft Graph (yes, again). You can skip this if you don’t have appropriate permissions, but in that case you’ll have to provide client certificate when using Service Fabric Cluster Manager UI.

Under some circumstances you might see Access Policy exception during cluster creation, this happens when you have multiple Azure subscriptions and PowerShell uses a wrong one. You can fix this by clearing your PowerShell context: `Clear-AzureRmContext -Scope CurrentUser`