microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.02k stars 399 forks source link

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

Open debg07 opened 2 years ago

debg07 commented 2 years ago

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

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

WhitWaldo commented 1 year ago

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.