Commercial Products
Jan '11
29

Gateway support for Rye, via Rye::Hop

posted by delano

Thanks to a fork from Vincent Batts, Rye now has gateway support!

rhop = Rye::Hop.new('firewall.lan')
rbox = Rye::Box.new('filibuster', :via => rhop)
rbox.uptime     # => 20:53  up 1 day,  1:52, 4 users

Or:

rbox = Rye::Box.new 'filibuster', :via => 'firewall.lan'

Gateway support allows you to access machines through a tunnelled connection (similar to Net::SSH::Gateway). This functionality is available in the 0.9.3 release.

Installation

gem install rye --version 0.9.3

About Rye

Rye is a Ruby library that provides a safe, simple way to access Unix shells. You create an instance of Rye::Box and the methods you call against it are mapped to shell commands over SSH.

rbox = Rye::Box.new('hostname')
rbox.pwd                               # => "/home/rye"
rbox.uname :a                          # => "Darwin rye-stage 9.7.0 ..."

With the block syntax, Rye looks a lot like a shell script.

rbox.batch do
  cd 'redis-2.0.0-rc3'
  configure
  make
  make 'install'
end

See the Github repo for more examples.

I'm Delano Mandelbaum, the founder of Solutious Inc. I've worked for companies large and small and now I'm putting everything I've learned into building great tools. I recently launched a monitoring service called Stella.

You can also find me on:

-       Delano (@solutious.com)

Solutious is a software company based in Montréal. We build testing and development tools that are both powerful and pleasant to use. All of our software is on GitHub.

This is our blog about performance, development, and getting stuff done.

-       Solutious