Git Product home page Git Product logo

dapr-workflows-aks-sample's Introduction

Manage workflows with the Dapr extension for Azure Kubernetes Service (AKS)

With Dapr Workflows, you can easily orchestrate messaging, state management, and failure-handling logic across various microservices. Dapr Workflows can help you create long-running, fault-tolerant, and stateful applications.

Running this sample

Before you begin

  1. Clone the sample project.
  2. Create an AKS cluster.
  3. Install the Dapr extension on your AKS cluster.

Deploy to AKS

  1. Make sure that Dapr is installed on the cluster. If not, run dapr init -k.

  2. Install Redis on the cluster.

    helm repo add bitnami https://charts.bitnami.com/bitnami
    helm install redis bitnami/redis
    k apply -f Deploy/redis.yaml
  3. Install the sample app.

    k apply -f Deploy/deployment.yaml
  4. Expose the Dapr sidecar (only for testing!) and the sample app.

    k apply -f Deploy/service.yaml
    export SAMPLE_APP_URL=$(k get svc/workflows-sample -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
    export DAPR_URL=$(k get svc/workflows-sample-dapr -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

Run the sample workflow

  1. Before starting the workflow, make an API call to the sample app to restock items in the inventory.

    curl -X GET $SAMPLE_APP_URL/stock/restock
  2. Start the workflow.

    curl -i -X POST $DAPR_URL/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/1234/start \
      -H "Content-Type: application/json" \
      -d '{ "input" : {"Name": "Paperclips", "TotalCost": 99.95, "Quantity": 1}}'
  3. Check the status of the workflow.

    curl -i -X GET $DAPR_URL/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/1234

Related links

dapr-workflows-aks-sample's People

Contributors

hhunter-ms avatar shubham1172 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.