elsa-core/src/modules/Elsa.ProtoActor.Cluster.AzureContainerApps
Sipke Schoorstra 0bb2ddcfee
Support sub-workflow dependency handling of JSON workflows (#4098)
* Change "Usable as Activity" setting into checkbox

* Update client model

* Update query to use shadow property

* Update UsableAsActivity usages

* Implement staged provisioning of workflows

* Add tests

* Update migrations
2023-06-03 12:28:10 +02:00
..
Stores/ResourceTags Support sub-workflow dependency handling of JSON workflows (#4098) 2023-06-03 12:28:10 +02:00
ArmClientProviders.cs ACA cluster provider support for multiple images + pluggable member store (#3981) 2023-04-30 22:25:40 +02:00
AzureContainerAppsProvider.cs Support sub-workflow dependency handling of JSON workflows (#4098) 2023-06-03 12:28:10 +02:00
AzureContainerAppsProviderOptions.cs ACA cluster provider support for multiple images + pluggable member store (#3981) 2023-04-30 22:25:40 +02:00
ConfigUtils.cs Support sub-workflow dependency handling of JSON workflows (#4098) 2023-06-03 12:28:10 +02:00
DefaultAzureCredentialArmClientProvider.cs ACA cluster provider support for multiple images + pluggable member store (#3981) 2023-04-30 22:25:40 +02:00
Elsa.ProtoActor.Cluster.AzureContainerApps.csproj ACA cluster provider support for multiple images + pluggable member store (#3981) 2023-04-30 22:25:40 +02:00
FodyWeavers.xml Add temporary custom version of Azure Container Apps cluster provider for Proto Actor 2023-01-10 20:31:55 +01:00
IArmClientProvider.cs ACA cluster provider support for multiple images + pluggable member store (#3981) 2023-04-30 22:25:40 +02:00
IClusterMemberStore.cs Support sub-workflow dependency handling of JSON workflows (#4098) 2023-06-03 12:28:10 +02:00
Readme.md ACA cluster provider support for multiple images + pluggable member store (#3981) 2023-04-30 22:25:40 +02:00
ResourceTagsMemberStoreOptionsValidator.cs ACA cluster provider support for multiple images + pluggable member store (#3981) 2023-04-30 22:25:40 +02:00
ServiceCollectionExtensions.cs Support sub-workflow dependency handling of JSON workflows (#4098) 2023-06-03 12:28:10 +02:00

Azure Container Apps cluster provider

Use this cluster provider when you're hosting your application in an Azure Container Apps cluster.

The provider stores cluster member information using Azure Resource Tags on the container application and uses these tags to discover other cluster members within the same Azure Container Application Managed Environment.

Installation

To install the provider, add the following code to your program:

services.AddAzureContainerAppsProvider(ArmClientProviders.DefaultAzureCredential, options =>
{
   options.ResourceGroupName = "{the resource group name containing your container application}";
   
   // Optionally, you can specify the subscription ID. If not specified, the provider will use the default subscription.
   options.SubscriptionId = "{your subscription id}";
});

Appsettings.json

Instead of hardcoding the options above, you should instead bind the options using your app's configuration. For example, consider the following appsettings.json:

{
  "AzureContainerApps": {
    "ResourceGroupName": "{the resource group name containing your container application}",
    "SubscriptionId": "{your subscription id}"
  }
}

You can then bind the options using the following code:

services.AddAzureContainerAppsProvider(ArmClientProviders.DefaultAzureCredential, options => configuration.Bind("AzureContainerApps", options));

Custom member store

By default, the provider will store cluster member information using Azure Resource Tags on the container application. If you want to use a custom storage mechanism, you can do so by implementing the IClusterMemberStore interface and registering it with the service collection.

For example, consider the following implementation:

public class RedisClusterMemberStorage : IClusterMemberStore
{
  ...
}

You can then register the implementation with the service collection:

services.AddSingleton<IClusterMemberStore, RedisClusterMemberStore>();