ubiquity

Run code everywhere and orchestrate multiple nodes.

Let's say you have two machines and want to run some code on the first, some other on the second and you want the logic to stay on a control script interacting with the two slave nodes.

node1:

s = Ubiquity::Server.new

node2:

s = Ubiquity::Server.new

on third machine (your lap):

!/usr/bin/env ruby

require 'ubiquity'

node1 = Ubiquity::Client.new '172.17.0.15'
node2 = Ubiquity::Client.new '172.17.0.16'

node2.on "event" do
    puts "event was triggered"
end

node1.exec do |scope|
    log "this code is running on first node"
end

node2.exec do |scope|
    log "while this one is running on 2nd node !"
    sleep 2
    notify "event"
end

sleep 10

License

MIT License © Luca Cervasio