Container Tooling for Service Fabric in Visual Studio 2017

The latest version of the Service Fabric tools, which is part of Visual Studio 2017 Update 7 (15.7), includes the new container tooling for Service Fabric feature. This new feature makes debugging and deploying existing applications, in containers, on Service Fabric easier than ever before.

Containerize .NET Framework and .NET Core applications and run them on Service Fabric

You can now take an existing console or ASP.NET application, deploy it to a container image, and run and debug it in Service Fabric as a container on your local developer workstation. With a few clicks, you can make your existing .NET application run in a container in a Service Fabric environment. Simply right-click on your project in Solution Explorer and selecting Add –> Container Orchestrator Support. This will display a dialog box where you select Service Fabric and click OK.

Container-Tools

Doing this will create a Docker file in your project and add the required Service Fabric files, as well as create a new Service Fabric application project in the solution. If your project is part of a solution with an existing Service Fabric application, it will be added to that application automatically. This must be done for each project in the solution you want to containerize for Service Fabric.

Debug containers running on Service Fabric

Not only can you easily containerize existing .NET projects with just a few clicks, you can also debug the code running inside the container instance as it runs in Service Fabric. Hit F5 and you will get full debugging support within Visual Studio for each service, even when it runs in a container! For the best debugging experience, use a one node cluster and “Refresh Application” mode.

Publish your containerized application to Service Fabric

When it's time to publish your application to Azure, the Publish dialog in Visual Studio will prompt you for an Azure Container Registry (ACR) to push your image(s) to, as well as the cluster connection information.

image

We have also updated the Visual Studio Team Services tasks for Service Fabric, to support the above scenario: Deploy: Service Fabric Application Deployment.

To get the latest tools, install Service Fabric SDK version 3.1 and latest Visual Studio 2017 release.

To learn more about how to be setup and use the tools, take a look at these articles:

From all of us…

The Service Fabric and Visual Studio teams

Source: Azure Blog Feed

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.