Deploy an application to a Party Cluster in Azure

This tutorial is part two of a series and shows you how to deploy an Azure Service Fabric application to a Party Cluster in Azure.

In part two of the tutorial series, you learn how to:

  • Deploy an application to a remote cluster using Visual Studio
  • Remove an application from a cluster using Service Fabric Explorer

In this tutorial series you learn how to:

Prerequisites

Before you begin this tutorial:

Download the Voting sample application

If you did not build the Voting sample application in part one of this tutorial series, you can download it. In a command window, run the following command to clone the sample app repository to your local machine.

git clone https://github.com/Azure-Samples/service-fabric-dotnet-quickstart

Set up a Party Cluster

Party clusters are free, limited-time Service Fabric clusters hosted on Azure and run by the Service Fabric team where anyone can deploy applications and learn about the platform. For free!

To get access to a Party Cluster, browse to this site: http://aka.ms/tryservicefabric and follow the instructions to get access to a cluster. You need a Facebook or GitHub account to get access to a Party Cluster.

You can use your own cluster instead of the Party Cluster, if you want. The ASP.NET core web front-end uses the reverse proxy to communicate with the stateful service back-end. Party Clusters and the local development cluster have reverse proxy enabled by default. If you deploy the Voting sample application to your own cluster, you must enable the reverse proxy in the cluster.

Note

Party clusters are not secured, so your applications and any data you put in them may be visible to others. Don't deploy anything you don't want others to see. Be sure to read over our Terms of Use for all the details.

Deploy the app to the Azure

Now that the application is ready, you can deploy it to the Party Cluster direct from Visual Studio.

  1. Right-click Voting in the Solution Explorer and choose Publish.

    Publish Dialog

  2. Type in the Connection Endpoint of the Party Cluster in the Connection Endpoint field and click Publish.

    Once the publish has finished, you should be able to send a request to the application via a browser.

  3. Open you preferred browser and type in the cluster address (the connection endpoint without the port information - for example, win1kw5649s.westus.cloudapp.azure.com).

    You should now see the same result as you saw when running the application locally.

    API Response from Cluster

Remove the application from a cluster using Service Fabric Explorer

Service Fabric Explorer is a graphical user interface to explore and manage applications in a Service Fabric cluster.

To remove the application from the Party Cluster:

  1. Browse to the Service Fabric Explorer, using the link provided by the Party Cluster sign-up page. For example, http://win1kw5649s.westus.cloudapp.azure.com:19080/Explorer/index.html.

  2. In Service Fabric Explorer, navigate to the fabric://Voting node in the treeview on the left-hand side.

  3. Click the Action button in the right-hand Essentials pane, and choose Delete Application. Confirm deleting the application instance, which removes the instance of our application running in the cluster.

Delete Application in Service Fabric Explorer

Remove the application type from a cluster using Service Fabric Explorer

Applications are deployed as application types in a Service Fabric cluster, which enables you to have multiple instances and versions of the application running within the cluster. After having removed the running instance of our application, we can also remove the type, to complete the cleanup of the deployment.

For more information about the application model in Service Fabric, see Model an application in Service Fabric.

  1. Navigate to the VotingType node in the treeview.

  2. Click the Action button in the right-hand Essentials pane, and choose Unprovision Type. Confirm unprovisioning the application type.

Unprovision Application Type in Service Fabric Explorer

This concludes the tutorial.

Next steps

In this tutorial, you learned how to:

  • Deploy an application to a remote cluster using Visual Studio
  • Remove an application from a cluster using Service Fabric Explorer

Advance to the next tutorial: