Skip to content

herry13/nuri

Repository files navigation

Build Status Gem Version

Nuri is an automated workflow configuration tool. It allows us to define the desired state of the managed system, and the tool will automatically generate and orchestrate the execution of the workflow that will:

  1. bring the system from current to the desired state,
  2. maintain any necessary constraints during the configuration changes.

Unlike any other orchestration tool, this will eliminate the obligation for the user to define an explicit workflow to implement the configuration, which allows "unattended" reconfiguration.

The desired state is specified in a declarative configuration language, called as SFP, where we could define a "loose" specification of the desired state as well as a set of global constraints (the constraints that must be satisfied during the changes).

Each resource is managed by an instant of Nuri module, which consists of:

  1. a schema file in SFP language, that contains a set of attributes and declarative procedures;
  2. an implementation file in Ruby, that has contains a Ruby class with a set of methods (the implementation of SFP procedures).

Requirements

  • Ruby (>= 1.9.1)
  • Ruby Gems:
    • sfplanner
    • sfpagent
    • colorize
    • coderay

Tested on

  • Linux: Ubuntu 12.04, Debian Squeeze, and Fedora 13
  • MacOS X

To install

  • Installing the Gem:

      $ apt-get install ruby1.9.1 ruby1.9.1-dev libz-dev libaugeas-ruby1.9.1 libxml2-dev libxslt-dev make gcc
      $ gem install nuri
    
  • Clone from Github:

      $ apt-get install git ruby1.9.1 ruby1.9.1-dev libz-dev libaugeas-ruby1.9.1 libxml2-dev libxslt-dev make gcc
      $ gem install sfplanner coderay colorize
      $ git clone https://github.com/herry13/nuri
    

Usage

Assume that the model of your system is in file "model.sfp".

  • to get the current state

      $ nuri state -m model.sfp
    
  • to generate the plan

      $ nuri plan -m model.sfp
    

    press 'Y' and enter to execute the plan (if the plan exists).

  • to execute any generated plan with orchestration

      $ nuri plan -m model.sfp -a
    
  • to execute any generated plan with choreography

      $ nuri bsig -a
    

Console mode

We could enter Nuri console mode and do operations:

  • enter console mode

      $ nuri console
    
  • edit the model which is stored in ~/.nuri/main.sfp

      nuri@user> edit
    
  • compile and print the model

      nuri@user> model
    
  • generate the current state of the system based on the model

      nuri@user> state
    
  • generate the plan

      nuri@user> plan
    
  • orchestrate the execution of any plan generated by Nuri

      nuri@user> plan -a
    
  • choreograph the execution of any plan generated by Nuri

      nuri@user> bsig -a