Blog Post

Visual Studio Blog
2 MIN READ

Create a CI/CD pipeline to Azure Service Fabric

Hui Xie's avatar
Hui Xie
Icon for Microsoft rankMicrosoft
Sep 04, 2017

 

To configure continuous delivery to a Service Fabric cluster, first you need to create a preview version Service Fabric cluster. Start by creating a security certificate to secure administrative access to the cluster. Open a PowerShell console, login to Azure and select the Azure subscription that you want to deploy the cluster in then create and encrypt a password for the certificate used by Service Fabric to secure access to your cluster by running the following commands:

 

Login-AzureRmAccount

Select-AzureRmSubscription -SubscriptionId <subscription-id>

$pwd = "<your password>" | ConvertTo-SecureString -AsPlainText -Force

 

 

Keep your PowerShell console running and download the Azure Resource Management Template for Service Fabric azuredeploy.json and the sample azuredeploy.parameters.json locally. Edit the parameters file to name, size and secure your cluster as well as set its location. Ensure that the clusterCodeVersion is set to the preview version 255.255.5718.255. Once your configuration files are ready, create the cluster by running the following commands:

 

New-AzureRmServiceFabricCluster

 -TemplateFile C:\<your_working_folder>\azuredeploy.json `

 -ParameterFile C:\<your_working_folder>\azuredeploy.parameters.json `

 -CertificateOutputFolder C:\<your_working_folder>\ `

 -CertificatePassword $pwd `

 -CertificateSubjectName "<your_cluster_name>.<cluster_location>.cloudapp.azure.com" `

 -ResourceGroupName <your_cluster_RGname>

 

Once the Service Fabric creation is completed, the command will output cluster information to the console window and copy the security certificate to your working folder. Double click on the certificate to import it to the current user certificate store. Remember to mark the certificate key as exportable in the private key protection step and complete the import wizard. This will allow the Configure Continuous Delivery experience to export the key while configuring your release definition.

With a preview version of the Service Fabric Cluster, you can now configure Continuous Delivery from Visual Studio 2017 with the latest version of the Continuous Delivery Tools for Visual Studio extension. Create or open an existing solution with an ASP.NET or ASP.NET Core project. Add Docker support to the project and ensure that the solution is under version control on VSTS or GitHub. Right click on the solution in Solution Explorer and select Configure Continuous Delivery.

 

Published Sep 04, 2017
Version 1.0
No CommentsBe the first to comment