2

I have an application manifest with five stateless services defined. I have multiple Application Parameters files, one per environment, to change the number of instances for each service. For one of the environments, I don't want two specific services to run at all (zero instances) but SF doesn't accept 0 instance parameter. How can I achieve that?

Bergara
  • 23
  • 4

1 Answers1

1

The best way to achieve this would be to stop using default services and instead use a script to start the required services in the appropriate environments.

The following links offer some comprehensive detail on this subject:

https://stackoverflow.com/a/50445801/490282

https://devblogs.microsoft.com/premier-developer/how-not-to-use-service-fabric-default-services/

Oliver
  • 8,794
  • 2
  • 40
  • 60
  • 1
    That definitely puts me in the right direction, TYVM! I am using Azure's [Deploy Service Fabric Application task](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/service-fabric-deploy?view=azure-devops), so I'm not sure yet how this ties in with replacing the default services with scripts, but I'll do some testing to figure it out. I'll post back once I have a better idea. – Bergara Jul 30 '20 at 02:01
  • @Bergara - How did you get on with this? Did you find any other solutions? – Oliver Aug 24 '20 at 21:44
  • 1
    The best solution would indeed be using powershell scripts, but since we had a requirement to not affect production deployment which currently relies on DefaultServices, I created tasks to change the DefaultServices configuration for each environment before deploying the artifacts. – Bergara Aug 26 '20 at 13:20