14 Jan '14, 6pm

TIL: Capistrano has a Gateway feature. Gateway Server in your DC means only one tunnel from localhost needed.

The gateway code is a bare 100 lines long, including comments. Basically, all it does is establish a connection to the gateway machine, and then for every connection established via the gateway, it forwards a port from the local host to the requested server. Then, it establishes a connection to the requested server via that forwarded port. It makes heavy use of threads to accomplish this, and is one of the places that helped iron out several synchronicity issues in Net::SSH . In fact, the code is a good showcase of what you can do with forwarded ports in Net::SSH.

Full article: http://weblog.jamisbuck.org/2006/9/26/inside-capistrano-t...

Tweets