Coder Social home page Coder Social logo

ditrit / workflows Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 197 KB

Workflow module. Builds RETE like rule-engine from TOSCA workflow definitions.

Python 99.04% Shell 0.96%
tosca consul rete distributed-systems distributed-computing tosca-workflows declarative-workflows

workflows's Introduction

workflows

This is a very first implementation for a TOSCA 1.1 engine built to handle explicit workflows.

The purpose is to implement TOSCA declarative workflows defined at node type and relationship type level as described in the OASIS normative document TOSCA Simple Profile in YAML Version 1.1.

Workflow definition is parsed into a simple rule based RETE like engine. Engine uses a set of workers which insert facts into RETE rules and execute operations. Workers are sateless and coordination is provided using LINDA coordination language primitives. Consul is used as storage backend (used for facts and RETE rules) and as the Tuple-Space used by workers. Artifacts for operations are stored into a S3 compatible storage backend.

A REST API is provided (at manager level) to manage TOSCA CSARs, models, instances and execute workflows

Resiliency and high availibility

  • Linda coordination provides distribution of operations whatever the number of workers.
  • Consul provides high availibility, resiliency and coherency at Space level.

The example

  • Workflows implemented are standard `install and uninstall TOSCA workflow as defined in § "7.4.2 Weaving improvements" of the normative document.
  • The Model used as exemple describe connections between 4 nodes (`A-->B B-->D D-->C and A -->C ), each one node being hosted onto an other node (A is hosted on srvA, B is hosted on srvB, C is hosted on srvC and D is hosted on D).
  • Default scaling is used on several nodes. 19 real nodes are built when the 'install' workflow is executed for an instance of the model.

Running the example

  1. Prerequisite :
    • An up and running Linux OS with ansible 2.3, lxc and libvirtd installed (tested with Redhat 7 and Ubuntu 16.10)
    • python2-lxc is a requirement for the lxc-container module of ansible. If it is not packaged for your distrib, you have to build it from github: python2-lxc repository
  2. Installation :
    • Clone the repository :
      git clone https://github.com/ditrit/workflows.git
    • Go into the install directory.
    • Adapt the inventory hosts file with adequate ip addresses.
    • Install ditrit as root :
      utils/ansible-deploy.sh
  3. Use Ditrit:
  4. Destroy, stop or start workers or consul server members during execution and verify it's still working.

Caution

This project is not production ready at all and has not been tested. The API may change at each commit.

workflows's People

Contributors

owulveryck avatar treivax avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

workflows's Issues

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.