Git Product home page Git Product logo

io-functions-template's Introduction

IO Functions template

Template per l'utilizzo di Azure Functions (e Durable Functions) all'interno del progetto IO.

Una volta clonato il repo assicurarsi di:

  • editare i metadati del repository nel file package.json

  • specificare un nome per il TaskHub in host.json in modo da evitare di condividere lo stesso per function diverse che usano lo stesso storage

  • effettuare il tuning dei parametri per le durable function

  • impostare a false il parametro FUNCTIONS_V2_COMPATIBILITY_MODE nel file local.settings.json nel caso di upgrade a [email protected]

Sviluppo in locale

cp env.example .env
yarn install
yarn build
docker-compose up -d --build
docker-compose logs -f functions
open http://localhost/some/path/test

Deploy

Il deploy avviene tramite una pipeline (workflow) configurata su CircleCI.

A ogni push su master il workflow effettua il deploy sulle risorse di staging. Quando invece un branch è taggato con latest il deploy avviene sulle functions in produzione.

Per il deploy è necessario che il job su CircleCI possa autenticarsi tramite il client azure. Vanno quindi impostate le seguenti variabili di ambiente nei settings del progetto CircleCI:

AZURE_SP_TENANT="<tenantid>"
AZURE_SP="<service principal id>"
AZURE_SP_PASSWORD="<service principal password>"
AZURE_SUBSCRIPTION_ID="<subscription id>"
PRODUCTION_RESOURCE_GROUP_NAME="<production resource group>"
STAGING_RESOURCE_GROUP_NAME="<staging resource group>"
FUNCTION_APP_NAME="<function app name>"

Esempi di function

Sono presenti alcune function di esempio che permettono di testare la corretta esecuzione del runtime delle durable functions. Le funzioni attivate da trigger HTTP utilizzano il pacchetto io-functions-express.

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.