Hi,
I have static configuration files (shared across multiple application on the nodes) that I would like to be able to deploy independently from the code (without restarting any of the running applications).
Are there any built-in features on Service Fabric to do it?
C:\Configuration).C:\Configuration).In both cases, the other applications would have to watch the C:\Configuration folder to get the updates.
I think @anmolah might know more about this!
Have you looked at setting up config packages for your application? These can be upgraded independently of your code without having to restart your running application.
More information can be found at https://docs.microsoft.com/en-gb/azure/service-fabric/service-fabric-application-model and https://stackoverflow.com/questions/35012146/where-to-store-configuration-values-in-azure-service-fabric-application
@lugolven Hi there! Config packages are the normal way we'd expect this to be accomplished. It would be great if you could give it a try and let us know if you have any issues. We'll close this issue for now. If you do try config packages and have any problems feel free to reopen this or to ask a followup question as another issue.
Like every interaction with service fabric I've had so far, trying to change a single parameter has devolved into writing another massive script from scratch using poor/incorrect documentation. It appears that Microsoft disagrees since the ticket was closed, but the inability to perform simple tasks like this or to work around the platform's design flaws(ie give up and use static config files) should be a classified as a bug.
@redNixon I cannot agree with you more. using config package is inconvenient, you need to change so many places( servicemanifest.xml, setting.xml, applicationmanifest.xml) and they can be overriade by application parameters.
All the docs i read say: Configuration package can be upgraded independently without code package change, without event the instances restarted, But none of them show how to do it. I spent some of days to figure it out. it turns out that you need to do a new deploymnet with new version of config, change the version in the below. by adding logs in my code, I confirmed that the cofiguration will be upgraded, but instances not restarted
<!-- Config package is the contents of the Config directoy under PackageRoot that contains an
independently-updateable and versioned set of custom configuration settings for your service. -->
<ConfigPackage Name="Config" Version="1.0.1" />
But what we want is to "restart the application with different application parameters without changing the manifest version", see https://github.com/Azure/service-fabric-issues/issues/114
Most helpful comment
Like every interaction with service fabric I've had so far, trying to change a single parameter has devolved into writing another massive script from scratch using poor/incorrect documentation. It appears that Microsoft disagrees since the ticket was closed, but the inability to perform simple tasks like this or to work around the platform's design flaws(ie give up and use static config files) should be a classified as a bug.