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):

node1 = Ubiquity::Client.new IP_NODE1
node2 = Ubiquity::Client.new IP_NODE2

node2.on "event" do
    log "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

License

MIT License © Luca Cervasio