1
votes

Is there a way to reset an existing dev cluster with powershell similar how the Service Fabric tray tool is doing it?

1

1 Answers

6
votes

There sure is (requires Admin privileges):

& "C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1" -PathToClusterDataRoot c:\SfDevCluster\data -PathToClusterLogRoot c:\SfDevCluster\log

You can change the path to \data and \log to where ever you want. Also, if you want the new 1-node dev cluster, add the -CreateOneNodeCluster option.

 & "C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1" -PathToClusterDataRoot c:\SfDevCluster\data -PathToClusterLogRoot c:\SfDevCluster\log -CreateOneNodeCluster

Note that when you run this, any existing cluster will be removed and replaced.