You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/service-fabric/service-fabric-tutorial-deploy-app-with-cicd-vsts.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ms.date: 04/17/2024
11
11
12
12
# Tutorial: Deploy an application with CI/CD to a Service Fabric cluster
13
13
14
-
This tutorial is part four of a series and describes how to set up continuous integration and deployment for an Azure Service Fabric application using Azure Pipelines. An existing Service Fabric application is needed, the application created in [Build a .NET application](service-fabric-tutorial-create-dotnet-app.md) is used as an example.
14
+
This tutorial is part four of a series and describes how to set up continuous integration and deployment for an Azure Service Fabric application using Azure Pipelines. An existing Service Fabric application is needed, the application created in [Build a .NET application](service-fabric-tutorial-create-dotnet-app.md) is used as an example.
15
15
16
16
In part three of the series, you learn how to:
17
17
@@ -21,7 +21,7 @@ In part three of the series, you learn how to:
21
21
> * Create a release pipeline in Azure Pipelines
22
22
> * Automatically deploy and upgrade an application
23
23
24
-
In this tutorial series you learn how to:
24
+
In these tutorials you learn how to:
25
25
> [!div class="checklist"]
26
26
> *[Build a .NET Service Fabric application](service-fabric-tutorial-create-dotnet-app.md)
27
27
> *[Deploy the application to a remote cluster](service-fabric-tutorial-deploy-app-to-party-cluster.md)
@@ -37,35 +37,35 @@ Before you begin this tutorial:
37
37
*[Install Visual Studio 2019](https://www.visualstudio.com/) and install the **Azure development** and **ASP.NET and web development** workloads.
38
38
*[Install the Service Fabric SDK](service-fabric-get-started.md)
39
39
* Create a Windows Service Fabric cluster on Azure, for example by [following this tutorial](service-fabric-tutorial-create-vnet-and-windows-cluster.md)
40
-
* Create an [Azure DevOps organization](/azure/devops/organizations/accounts/create-organization-msa-or-work-student). This allows you to create a project in Azure DevOps and use Azure Pipelines.
40
+
* Create an [Azure DevOps organization](/azure/devops/organizations/accounts/create-organization-msa-or-work-student). An organization allows you to create a project in Azure DevOps and use Azure Pipelines.
41
41
42
42
## Download the Voting sample application
43
43
44
-
If you did not build the Voting sample application in [part one of this tutorial series](service-fabric-tutorial-create-dotnet-app.md), you can download it. In a command window, run the following command to clone the sample app repository to your local machine.
44
+
If you didn't build the Voting sample application in [part one of this series](service-fabric-tutorial-create-dotnet-app.md), you can download it. In a command window, run the following command to clone the sample app repository to your local machine.
Now that you've[created an application](service-fabric-tutorial-create-dotnet-app.md) and have [deployed the application to Azure](service-fabric-tutorial-deploy-app-to-party-cluster.md), you're ready to set up continuous integration. First, prepare a publish profile within your application for use by the deployment process that executes within Azure Pipelines. The publish profile should be configured to target the cluster that you've previously created. Start Visual Studio and open an existing Service Fabric application project. In **Solution Explorer**, right-click the application and select **Publish...**.
52
+
Now that you [created an application](service-fabric-tutorial-create-dotnet-app.md) and [deployed the application to Azure](service-fabric-tutorial-deploy-app-to-party-cluster.md), you're ready to set up continuous integration. First, prepare a publish profile within your application for use by the deployment process that executes within Azure Pipelines. The publish profile should be configured to target the cluster you previously created. Start Visual Studio and open an existing Service Fabric application project. In **Solution Explorer**, right-click the application and select **Publish...**.
53
53
54
-
Choose a target profile within your application project to use for your continuous integration workflow, for example Cloud. Specify the cluster connection endpoint. Check the **Upgrade the Application** checkbox so that your application upgrades for each deployment in Azure DevOps. Click the **Save** hyperlink to save the settings to the publish profile and then click**Cancel** to close the dialog box.
54
+
Choose a target profile within your application project to use for your continuous integration workflow, for example Cloud. Specify the cluster connection endpoint. Check the **Upgrade the Application** checkbox so that your application upgrades for each deployment in Azure DevOps. Select the **Save** hyperlink to save the settings to the publish profile and then choose**Cancel** to close the dialog box.
55
55
56
56
![Push profile][publish-app-profile]
57
57
58
58
## Share your Visual Studio solution to a new Azure DevOps Git repo
59
59
60
60
Share your application source files to a project in Azure DevOps so you can generate builds.
61
61
62
-
Create a [new GitHub repo and Azure DevOps repo](/visualstudio/version-control/git-create-repository#create-a-github-repo) from VS 2022 IDE by selecting Git -> Create Git Repository from Git menu
62
+
Create a [new GitHub repo and Azure DevOps repo](/visualstudio/version-control/git-create-repository#create-a-github-repo) from Visual Studio 2022 IDE by selecting Git -> Create Git Repository from Git menu
63
63
64
-
Select your account in the drop-down and enter your repository name and click**Create and Push** button.
64
+
Select your account in the drop-down and enter your repository name and select**Create and Push** button.
65
65
66
66
![Screenshot of creating new Git repository.][push-git-repo]
67
67
68
-
Publishing the repo creates a new project in Azure DevOps account with the same name as the local repo.
68
+
Publishing the repo creates a new project in your Azure DevOps Services account with the same name as the local repo.
69
69
70
70
View the newly created repository by navigating to https://dev.azure.com/\<organizationname\>, hover mouse over the name of your project, and select the **Repos** icon.
71
71
@@ -79,61 +79,61 @@ An Azure Pipelines release pipeline describes a workflow that deploys an applica
79
79
80
80
Open a web browser and navigate to your new project at: https://dev.azure.com/\<organizationname\>/VotingSample
81
81
82
-
Select the **Pipelines** tab and click**Create Pipeline**.
82
+
Select the **Pipelines** tab and select**Create Pipeline**.
83
83
84
84
![New Pipeline][new-pipeline]
85
85
86
86
Select **Use the classic editor** to create a pipeline without YAML.
87
87
88
88
![Classic Editor][classic-editor]
89
89
90
-
Select **Azure Repos Git** as source, **VotingSample** Team project, **VotingApplication** Repository, and **master** Default branch for manual and scheduled builds. Then click**Continue**.
90
+
Select **Azure Repos Git** as source, **VotingSample** Team project, **VotingApplication** Repository, and **master** Default branch for manual and scheduled builds. Then select**Continue**.
91
91
92
92
![Select Repo][select-repo]
93
93
94
-
In **Select a template**, select the **Azure Service Fabric application** template and click**Apply**.
94
+
In **Select a template**, select the **Azure Service Fabric application** template and select**Apply**.
95
95
96
96
![Choose build template][select-build-template]
97
97
98
-
In **Tasks**, enter "Azure Pipelines" as the **Agent pool** and **windows-2022** as Agent Specification
98
+
In **Tasks**, enter "Azure Pipelines" as the **Agent pool** and **windows-2022** as Agent Specification.
99
99
100
100
![Select tasks][save-and-queue]
101
101
102
102
Under **Triggers**, enable continuous integration by checking **Enable continuous integration**. Within **Branch filters**, the **Branch specification** defaults to **master**. Select **Save and queue** to manually start a build.
103
103
104
104
![Select triggers][save-and-queue-2]
105
105
106
-
Builds also trigger upon push or check-in. To check your build progress, switch to the **Builds** tab. Once you verify that the build executes successfully, define a release pipeline that deploys your application to a cluster.
106
+
Builds also trigger upon push or check-in. To check your build progress, switch to the **Builds** tab. Once you verify that the build executes successfully, define a release pipeline that deploys your application to a cluster.
107
107
108
108
### Create a release pipeline
109
109
110
-
Select the **Pipelines** tab, then **Releases**, then **+ New pipeline**. In **Select a template**, select the **Azure Service Fabric Deployment** template from the list and then **Apply**.
110
+
Select the **Pipelines** tab, then **Releases**, then **+ New pipeline**. In **Select a template**, select the **Azure Service Fabric Deployment** template from the list and then **Apply**.
Select **Tasks** and then **+New** to add a new cluster connection.
115
115
116
116
![Add cluster connection][add-cluster-connection]
117
117
118
-
In the **New Service Fabric Connection** view select **Certificate Based** or **Microsoft Entra credential** authentication. Specify cluster endpoint of tcp://mysftestcluster.southcentralus.cloudapp.azure.com:19000" (or the endpoint of the cluster you are deploying to).
118
+
In the **New Service Fabric Connection** view select **Certificate Based** or **Microsoft Entra credential** authentication. Specify cluster endpoint of tcp://mysftestcluster.southcentralus.cloudapp.azure.com:19000" (or the endpoint of the cluster you're deploying to).
119
119
120
-
For certificate-based authentication, add the **Server certificate thumbprint** of the server certificate used to create the cluster. In **Client certificate**, add the base-64 encoding of the client certificate file. See the help pop-up on that field for info on how to get that base-64 encoded representation of the certificate. Also add the **Password** for the certificate. You can use the cluster or server certificate if you don't have a separate client certificate.
120
+
For certificate-based authentication, add the **Server certificate thumbprint** of the server certificate used to create the cluster. In **Client certificate**, add the base-64 encoding of the client certificate file. See the help pop-up on that field for info on how to get that base-64 encoded representation of the certificate. Also add the **Password** for the certificate. You can use the cluster or server certificate if you don't have a separate client certificate.
121
121
122
122
For Microsoft Entra credentials, add the **Server certificate thumbprint** of the server certificate used to create the cluster and the credentials you want to use to connect to the cluster in the **Username** and **Password** fields.
123
123
124
-
Click**Save**.
124
+
Select**Save**.
125
125
126
-
Next, add a build artifact to the pipeline so the release pipeline can find the output from the build. Select **Pipeline** and **Artifacts**->**+Add**. In **Source (Build definition)**, select the build pipeline you created previously. Click**Add** to save the build artifact.
126
+
Next, add a build artifact to the pipeline so the release pipeline can find the output from the build. Select **Pipeline** and **Artifacts**->**+Add**. In **Source (Build definition)**, select the build pipeline you created previously. Select**Add** to save the build artifact.
127
127
128
128
![Add artifact][add-artifact]
129
129
130
-
Enable a continuous deployment trigger so that a release is automatically created when the build completes. Click the lightning icon in the artifact, enable the trigger, and click**Save** to save the release pipeline.
130
+
Enable a continuous deployment trigger so that a release is automatically created when the build completes. Select the lightning icon in the artifact, enable the trigger, and choose**Save** to save the release pipeline.
131
131
132
132
![Enable trigger][enable-trigger]
133
133
134
134
Select **Create Release** -> **Create** to manually create a release. You can monitor the release progress in the **Releases** tab.
135
135
136
-
Verify that the deployment succeeded and the application is running in the cluster. Open a web browser and navigate to https://mysftestcluster.southcentralus.cloudapp.azure.com:19080/Explorer/. Note the application version, in this example it is "1.0.0.20170616.3".
136
+
Verify that the deployment succeeded and that the application is running in the cluster. Open a web browser and navigate to https://mysftestcluster.southcentralus.cloudapp.azure.com:19080/Explorer/. Note the application version. In this example, it's `1.0.0.20170616.3`.
137
137
138
138
## Commit and push changes, trigger a release
139
139
@@ -149,23 +149,23 @@ In the **Git Changes** window, select **Push** button (the up arrow) to update c
149
149
150
150
![Push changes][push]
151
151
152
-
Pushing the changes to Azure Pipelines automatically triggers a build. To check your build progress, switch to **Pipelines** tab in https://dev.azure.com/organizationname/VotingSample.
152
+
Pushing the changes to Azure Pipelines automatically triggers a build. To check your build progress, switch to **Pipelines** tab in https://dev.azure.com/organizationname/VotingSample.
153
153
154
154
When the build completes, a release is automatically created and starts upgrading the application on the cluster.
155
155
156
-
Verify that the deployment succeeded and the application is running in the cluster. Open a web browser and navigate to `https://mysftestcluster.southcentralus.cloudapp.azure.com:19080/Explorer/`. Note the application version, in this example it is "1.0.0.20170815.3".
156
+
Verify that the deployment succeeded and that the application is running in the cluster. Open a web browser and navigate to `https://mysftestcluster.southcentralus.cloudapp.azure.com:19080/Explorer/`. Note the application version. In this example, it's `1.0.0.20170815.3`.
157
157
158
158
![Screenshot of the Voting app in Service Fabric Explorer running in a browser window. The app version "1.0.0.20170815.3" is highlighted.][sfx1]
159
159
160
160
## Update the application
161
161
162
-
Make code changes in the application. Save and commit the changes, following the previous steps.
162
+
Make code changes in the application. Save and commit the changes, following the previous steps.
163
163
164
164
Once the upgrade of the application begins, you can watch the upgrade progress in Service Fabric Explorer:
165
165
166
166
![Screenshot of the Voting app in Service Fabric Explorer. The Status message "Upgrading", and an "Upgrade in Progress" message are highlighted.][sfx2]
167
167
168
-
The application upgrade may take several minutes. When the upgrade is complete, the application will be running the next version. In this example "1.0.0.20170815.4".
168
+
The application upgrade might take several minutes. When the upgrade is complete, the application will be running the next version. In this example `1.0.0.20170815.4`.
169
169
170
170
![Screenshot of the Voting app in Service Fabric Explorer running in a browser window. The updated app version "1.0.0.20170815.4" is highlighted.][sfx3]
0 commit comments