GithubHelp home page GithubHelp logo

isabella232 / azure-durable-functions-hello-world Goto Github PK

View Code? Open in Web Editor NEW

This project forked from developmentseed/azure-durable-functions-hello-world

0.0 0.0 0.0 25 KB

Running Cumulus core functions test on Azure as preliminary research vis a vis cloud agnosticism

JavaScript 100.00%

azure-durable-functions-hello-world's Introduction

Azure Durable Functions hello world

Testing Azure Durable Functions as a replacement for AWS step functions in building a cloud-agnostic Cumulus.

Prerequisites

Working with Azure Functions and newer bindings such as the Durable Function extension can be difficult if you're not using a Microsoft IDE. Furthermore, some core dependencies present gotcha's relating to version mismanagement. These pre-requisites are necessary to deploy and develop on these functions.

  1. Azure CLI (instructions for Ubuntu).
  2. Azure functions core tools, which I recommend using the global npm installation method.
  3. .NET 2.2 SDK.

Running these functions locally

  1. Install node dependencies (in the app directory): cd app && yarn install.

  2. Install Azure function v2 bindings. The Azure functions core tools library will scan your functions and install the necessary bindings. However, at time of writing it includes a legacy version of the durable functions binding, which must be overridden.

cd app
# Install default bindings
func extensions install
# Override durable functions version
func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask --version 1.7.1
  1. cd app && func host start

Deploying these functions to Azure

Make sure you have access to an Azure account with a working subscription, ie pay-as-you-go, otherwise the CLI will not allow you to partition resources.

Deployment steps

  1. Log into the CLI: az login. This opens a login dialogue in a web browser.

  2. Create a resource group:

az group create --name dsDurableFunctionsTest --location "West US"
  1. Create a storage account:
az storage account create --name <STORAGE_ACCOUNT_NAME> --location "West US" --resource-group dsDurableFunctionsTest --sku Standard_LRS

Note, storage account names weirdly 1. can only contain lower-case alphanumeric characters and 2. must be unique.

  1. Create a function resource:
az functionapp create --resource-group dsDurableFunctionsTest --consumption-plan-location westus --name dsDurableFunctions --storage-account <STORAGE_ACCOUNT_NAME> --runtime node
  1. Install node dependencies (in the app directory): cd app && yarn install.

  2. Install Azure function v2 bindings. The Azure functions core tools library will scan your functions and install the necessary bindings. However, at time of writing it includes a legacy version of the durable functions binding, which must be overridden.

cd app
# Install default bindings
func extensions install
# Override durable functions version
func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask --version 1.7.1
  1. Create a zip of the app directory:
rm app.zip
cd app
zip -r ../app.zip ./*
  1. Deploy the zip file:
az functionapp deployment source config-zip -g dsDurableFunctionsTest -n dsDurableFunctions --src app.zip
  1. Test the basic function at https://dsdurablefunctions.azurewebsites.net/api/reply.

  2. Test the orchestrator function at https://dsdurablefunctions.azurewebsites.net/api/orchestrators/orchestrator.

azure-durable-functions-hello-world's People

Contributors

dereklieu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.