2012-08-29

skypipe : a cloud based named pipe

skypipe is a really nice idea about an ubiquitous named pipe on the net.

Basically it allows you to pipe data on a shell from one machine to another without knowing/doing anything, no IP to know, no tunnel to setup, nothing.

See at the end of the post how to set it up.

I show you a small demo here with the default anonymous pipe:

.
MachineA # skypipe < /etc/issue.logo

-------------

MachineB # skypipe

     .vir.                                d$b
  .d$$$$$$b.    .cd$$b.     .d$$b.   d$$$$$$$$$$$b  .d$$b.      .d$$b.
  $$$$( )$$$b d$$$()$$$.   d$$$$$$$b Q$$$$$$$P$$$P.$$$$$$$b.  .$$$$$$$b.
  Q$$$$$$$$$$B$$$$$$$$P"  d$$$PQ$$$$b.   $$$$.   .$$$P' `$$$ .$$$P' `$$$
    "$$$$$$$P Q$$$$$$$b  d$$$P   Q$$$$b  $$$$b   $$$$b..d$$$ $$$$b..d$$$
   d$$$$$$P"   "$$$$$$$$ Q$$$     Q$$$$  $$$$$   `Q$$$$$$$P  `Q$$$$$$$P
  $$$$$$$P       `"""""   ""        ""   Q$$$P     "Q$$$P"     "Q$$$P"
  `Q$$P"                                  """


This is \n.\O (\s \m \r) \t


Magical isn't it ?

skypipe takes a parameter to give you a named pipe, so alternatively you can do the more precise :
.
MachineA # skypipe gentoologo < /etc/issue.logo

-------------

MachineB # skypipe gentoologo

     .vir.                                d$b
  .d$$$$$$b.    .cd$$b.     .d$$b.   d$$$$$$$$$$$b  .d$$b.      .d$$b.
  $$$$( )$$$b d$$$()$$$.   d$$$$$$$b Q$$$$$$$P$$$P.$$$$$$$b.  .$$$$$$$b.
  Q$$$$$$$$$$B$$$$$$$$P"  d$$$PQ$$$$b.   $$$$.   .$$$P' `$$$ .$$$P' `$$$
    "$$$$$$$P Q$$$$$$$b  d$$$P   Q$$$$b  $$$$b   $$$$b..d$$$ $$$$b..d$$$
   d$$$$$$P"   "$$$$$$$$ Q$$$     Q$$$$  $$$$$   `Q$$$$$$$P  `Q$$$$$$$P
  $$$$$$$P       `"""""   ""        ""   Q$$$P     "Q$$$P"     "Q$$$P"
  `Q$$P"                                  """


This is \n.\O (\s \m \r) \t


Skypipe even bufferize your output so it doesn't require any precise timing to do it.

Setup

A prerequisite is to go to https://www.dotcloud.com/ and request a free account (it is relatively hassle free BTW).

Once you get that, you can install skypipe from my overlay if you are under gentoo :
# layman -L
# layman -a gbin
# echo "=net-analyzer/skypipe-9999 **" >> /etc/portage/packages.keywords

# emerge skypipe
Under other systems you will need for now to go with a manual setup :
# git clone git://github.com/progrium/skypipe.git
# cd skypipe
# python setup.py install

Then simply starts once the skypipe command on both machines so it first deploys itself to your newly dotcloud account then asks you and remember your credential for access on any new machine.
# skypipe                      
==> First time use, please setup dotCloud account
dotCloud username: gbin
Password: 
==> Launching skypipe satellite. This only has to happen once for your account.
==> This may take about a minute...
==> DEBUG: Found satellite

Thanks to Jeff Lindsay  for this cool tool.
Edit: removed the useless cat usage thx to sigil