Coder Social home page Coder Social logo

renci-nrig / na2-exec-plugin Goto Github PK

View Code? Open in Web Editor NEW
0.0 12.0 0.0 892 KB

NodeAgent2 plugin that performs external exec() for every action.

License: Eclipse Public License 1.0

Shell 8.65% Java 91.35%
exogeni geni iaas-cloud spring-boot plugin

na2-exec-plugin's Introduction

The code is no longer being maintained. The repo is kept for historical reasons.

This is an exec plugin for NA2. It executes scripts (bash/python/etc) for each of the Plugin methods. Properties from handlers are passed in as environment variables following the convention that "some.property" becomes SOME_PROPERTY environment variable. 

The join script is assumed to take no command line parameters. The leave/modify/renew/status scripts take as the last parameter the reservation id. The rest of the parameters are passed in as environment variables. 

Upon return each script returns a status string (via echo) formatted as:

status_string ::= <OK | ERROR> [<status message>]; <reservation_id>

The plugin deals with changes in reservation id (e.g. in case of a renew that is break/make) by creating a new property "new.reservationid" or, equivalently, environment variable NEW_RESERVATIONID.

The plugin is configured using the following properties: exec.join, exec.leave, exec.modify, exec.renew which are paths and first few command line parameters of individual scripts, e.g. "/path/to/join.sh -a"

There is an optional exec.wd property that can set the working directory for the scripts if necessary.

                <plugin name="execplug" >
                        <jar>/Users/ibaldin/workspace-nodeagent2/exec-plugin/target/exec-plugin-1.0-SNAPSHOT-jar-with-dependencies.jar</jar>
                        <mainClass>orca.nodeagent2.exec.Main</mainClass>
                        <schedulePeriod length="3" unit="minute" />
                        <properties>
                                <property name="exec.join" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/join.sh" />
                                <property name="exec.leave" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/leave.sh" />
                                <property name="exec.modify" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/modify.sh" />
                                <property name="exec.renew" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/renew.sh" />
                                <property name="exec.status" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/status.sh" />
                        </properties>
                </plugin>

na2-exec-plugin's People

Contributors

ibaldin avatar mjstealey avatar vjorlikowski avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

na2-exec-plugin'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.