Introduction
Create a certificate in the Azure KeyVault for an Azure Service Fabric cluster.
Pre checks
Have Azure Powershell SDK installed. Check with $PSVersionTable.PSVersion. See Microsoft docs for installation instructions.
Login to Azure form Powershell. Connect-AzureRmAccount
Know the tobe name of your new ASF Cluster, full name. For example sogetiasfdianed.westeurope.cloudapp.azure.com.
Parameters
param(
[string] [Parameter(Mandatory=$true)] $Password,
[string] [Parameter(Mandatory=$true)] $CertDNSName,
[string] [Parameter(Mandatory=$true)] $KeyVaultName,
[string] [Parameter(Mandatory=$true)] $KeyVaultSecretName
)
- Password for the Vm’s, must follow the VM rules.
- CertDNSName: the full DNS name of the Azure Service Fabric Cluster. For example
sogetiasfdianed.westeurope.cloudapp.azure.com. - KeyVaultName: name of KeyVault.
- KeyVaultSecretName: Secret name.
The Certificate is stored local and in the KeyVault. The output values can be used during the provisioning of the Azure Service Fabric Cluster.
Microsoft is the publisher of the PS script. The original location is on GitHub.
some people get an ‘Path’ error on row 24 CertFileFullPath. Just fill in a known local path for storing the Certificate as a work around.