2

Is it possible to update appsettings and connection strings at runtime in Service Fabric like it is possible in Azure App Services?

The only similar solution I can find involves updating the VM Scale Set (VMSS), which sets environment variables to each VM in the scale set as far as I understand, and I am not interested in applications sharing these variables.

An alternative solution could be to update appsettings.json and deploy a new version, but I would prefer being able to do this.

mrjensen
  • 35
  • 7
  • 1
    It doesn't directly answer your question, but it might be worth looking at the Service Fabric Config Settings, it allows you to define key value pair settings which are versioned and can then be deployed / updated independently of the code. Here are a copy of links that might be of interest. https://azure.microsoft.com/en-gb/documentation/articles/service-fabric-manage-multiple-environment-app-configuration/ ......and...... https://azure.microsoft.com/en-gb/documentation/articles/service-fabric-application-model/ – jimpaine Oct 18 '16 at 13:04
  • Here is a more thorough answer on how to achieve exactly what you are asking for - but not directly with ASP.NET Core. But I figure it should be quite the same: http://stackoverflow.com/q/33928204/1685813 – Structed Oct 20 '16 at 05:39

1 Answers1

2

There is no way to do a global config change. Configuration for a service should be included in the service's configuration package and changed as a versioned, rolling upgrade.

Vaclav Turecek
  • 9,020
  • 24
  • 29
  • This is technically incorrect. This is correct if you are using the DefaultServices. If you, instead, remove the default services and handle the AppType creation and registrations yourself, you can update settings on the fly without a versioned, rolling upgrade. You can even run multiple versions of the same AppType with different configurations side-by-side. – Stephen P. Oct 12 '18 at 15:37