Partilhar via


Secure Cluster Script for Service Fabric

powershell

I helped a Microservices Hackfest, today.  I explained how to create a Service Fabric Secure cluster.
My customer said that it was useful because it requires several powershell commands and slight complex.

He also said "Hey, you should write a powershell script for creating KeyVault and Self-Signed Certificate!"

He is right. If you want to setup Service Fabric Secure Cluster, you need the following steps.

cluster

  1. Create a Resource Group
  2. Create a KeyVault
  3. Create/Get a pfx file. (X509 cerfiticate. You might need Self-Signed certificate for testing purpose)
  4. Setup Key/Secret of the certificate into the KeyVault
  5. Create/Configure a Service Fabric Cluster by Azure Portal or ARM

It is annoying. So I wrote a PowerShell Script for this purpose. If you read the script, you can learn how to
setup a keyvault for a ServiceFabric secure cluster.

NOTE: This script is for Self-Signed Cluster. Don't use this for production purpose.

Usage is like this. Edit the parameter.json then

PS> Login-AzureRmAccount
PS> ./SignedCertWithKeyVault.ps1

GitHub URL

A KeyVault Creator with Self-Signed Certificate

NOTE:

I re-invent a wheel. You can find more sophisticated Powershell Script for this purpose.
This is good for production environment.

KeyVault with Certificate

https://github.com/ChackDan/Service-Fabric/tree/master/Scripts/ServiceFabricRPHelpers

Thank you Julien!