Setting Up Azure Durable Functions
To get started with Azure Durable Functions, follow these basic steps in order to develop:
1. Prerequisites
- Install the latest version of Azure Functions Core Tools.
- Have an active Azure subscription.
- Set up the Azure CLI and log in (
az login
). - Install .NET SDK or Node.js/Python depending on your language choice.
2. Create a Function App
func init DurableFunctionApp --worker-runtime dotnet # or node/python
cd DurableFunctionApp
3. Add Durable Function Templates
func new --name MyOrchestrator --template "Durable Functions Orchestration"
func new --name MyActivity --template "Durable Functions Activity"
func new --name HttpStart --template "Durable Functions HTTP Starter"
4. Run Locally
func start
Visit the local HTTP endpoint provided to trigger the client function.
If you start with step 5 you will bring it to the azure cloud if you have this avaiable
5. Deploy to Azure
az login
az functionapp create --resource-group <RESOURCE_GROUP> --consumption-plan-location <REGION> --runtime dotnet --functions-version 4 --name <APP_NAME> --storage-account <STORAGE_NAME>
func azure functionapp publish <APP_NAME>