azure-service-fabricservice-fabric-stateless

How to define stateles services that will run per environment in Service Fabric


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?


Solution

  • 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/