service-fabric icon indicating copy to clipboard operation
service-fabric copied to clipboard

Unable to create Service in Azure Service Fabric Cluster [.NET 6 and ASP.NET Core 6.0] through Azure DevOps Pipeline

Open debg07 opened this issue 2 years ago • 1 comments

Describe the bug We have couple of stateless services deployed into Azure Service Fabric cluster (developed in ASP.NET Core 2.1), all are up and running, I started to upgrade one of the services to .NET 6 (ASP.NET Core 6), newly created service tested locally and deploying into Azure Service Fabric cluster through Azure DevOps pipeline (CI/CD). Post successful deployment, service is not available in SF Cluster whereas I can see the application, even I did not see error during deployment (CD). image

However, I can publish the application through Visual Studio 2022 and service is running into Azure Service Fabric cluster. But unable to deploy API through Azure DevOps Release Pipeline with 'Deploy Service Fabric Application Deployment' task, although old ASP.NET Core 2.1 application deploying successfully with same task. image

systems

  • Windows 10 Enterprise
  • .NET 6
  • ASP.NET Core 6.0
  • Visual Studio 2022 Professional (Version 17.2.5)

Azure DevOps Pipeline CI for Service Fabric application

image

Update manifest task image

CD

image

image

Deploy Service Fabric task log showing Removing application from image store, even I can't see the DNS name during deployment which I mention in StartupServices.xml

image


Assignees: /cc @microsoft/service-fabric-triage

debg07 avatar Jul 12 '22 14:07 debg07

First of all, I strongly advise you to file a technical support ticket as there's not a lot of support to be found around here.

Beyond that though, I would bet that the removal operations you see are the result of you having older types and versions on there and they're being removed (per the option you checked to do the same). Typically StartupService.xml is ignored as part of a deployment - when you run the deployment in Visual Studio, it typically uses the deployment script in your root SF project folder under /scripts. The Azure DevOps task runs a different script, as I recall.

Personally, I would advise looking at ARM deployments for your applications as the deployment is a little bit easier. In my own pipeline, I update the manifest (as you do), copy the files to a temp directory, zip it and then upload to an Azure Storage Blob. From here, you can deploy by simply pointing to the URL of the blob entity itself and use an ARM template to register and deploy it like any other resource in Azure, skipping the Powershell-based deployment mechanism.

WhitWaldo avatar Jan 26 '23 03:01 WhitWaldo