Giter Site home page Giter Site logo

cdanis / tunnelencabulator Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 4.0 53 KB

For a number of years now, work has been proceeding in order to bring to perfection the crudely-conceived idea of a machine that would not only supply the easy re-routing of traffic for load-balanced services, but would also be capable of automatically synchronizing single-homed LibreNMSes and icingas. Such an instrument is the tunnel-encabulator.

License: Apache License 2.0

Python 100.00%
kludge turbo-encabulator turboencabulator

tunnelencabulator's Introduction

tunnelencabulator

For a number of years now, work has been proceeding in order to bring to perfection the crudely-conceived idea of a machine that would not only supply the easy re-routing of traffic for load-balanced services, but would also be capable of automatically synchronizing single-homed LibreNMSes and icingas. Such an instrument is the tunnel-encabulator.

Now, basically, the only new principle involved is that instead of hostnames being resolved by the relative motion of recursive and authoritative nameservers, they are resolved instead by the modial interaction of gethostbyname and /etc/hosts.

The tunnelencabulator has now reached a high level of development, and is being used successfully in the operation of wikitrunnions. Moreover, whenever a forescent skor motion is required towards non-CDN'd services, it may also be employed in conjunction with a loopback interface reciprocation dingle arm.

usage: tunnelencabulator.py [-h] [-s] [-d DATACENTER] [-u] [-f] [--ssh-args SSH_ARGS]
                            [--version]

optional arguments:
  -h, --help            show this help message and exit
  -s, --ssh-tunnel      Whenever a forescent skor motion towards gerrit is required,
                        --ssh-tunnel may also be engaged, effectively preventing side
                        fumbling of LibreNMSes and icinga and other such non-CDN-served
                        marzlevanes, by employing the special mechanism of a port
                        forwarding dingle arm.
  -d DATACENTER, --datacenter DATACENTER
                        Specify a particular target datacenter. If not specified,
                        defaults to one that is not your normal lotus-o-delta GeoDNS
                        site.
  -u, --undo            Undo any prior inverse reactive current applied to /etc/hosts
                        and exit.
  -f, --no-foreground   Instead of staying in the foreground, return control to the
                        ambifacient lunar waneshell after connecting.
  --ssh-args SSH_ARGS   Extra arguments to pass to the ssh girdle spring
  --version             show program's version number and exit

Please, stop the copypasta and tell me what's going on

This prose is based upon the turboencabulator, a pile of glorious technobabble dating back to 1944. Best known is the original video from 1977, but there are many others.

WMF serves a variety of tooling and infrastructure (monitoring/debugging tools, code repositories, bug trackers, etc) via its production network and CDN loadbalancers.

This tool allows SREs, who maintain this infrastructure, to redirect their own traffic away from a malfunctioning location towards a working one, so they can effect repairs.

It works via modifying /etc/hosts with alternate-PoP IP addresses for services that are multi-homed on our edge CDN. For services that are not CDN-fronted, it can optionally (-s/--ssh-tunnel) create SSH tunnels each bound to a different loopback address, and then add those entries to /etc/hosts as well.

Requirements

  • A Linux or MacOS system with /usr/bin/sudo
  • Python 3.6+ (uses only standard libraries)
  • On Linux, /usr/sbin/capsh (part of Debian's base install)
  • On MacOS, socat installed somewhere

Usage

Just run tunnelencabulator.py.

You can get SSH tunnels to non-CDN services (gerrit, icinga, etc) with -s. If you need to debug the SSH connection, --ssh-args=-v.

Normally tunnelencabulator stays in the foreground, and cleans up after itself when you press Ctrl-C. If you'd rather the opposite, pass -f. Then --undo when you're done.

Normally tunnelencabulator consults GeoDNS to see what datacenter your traffic would go to, and then routes to some other datacenter. If you want to pick a specific one, provide it as an argument to -d.

Acknowledgments

  • John Hellins Quick (1923-1991) & the Student's Quarterly Journal
  • Bernard Salwen & Time Magazine
  • the General Electric Handbook
  • Bud Haggart
  • Elizabeth "Jake" Feinler, Ken Harrenstien, M. Stahl, & SRI International, for RFC952
  • Markus Friedl, Niels Provos, Theo de Raadt, Kevin Steves, Damien Miller, Darren Tucker, Jason McIntyre, Tim Rice, Ben Lindstrom, & all the OpenSSH maintainers and contributors

tunnelencabulator's People

Contributors

cdanis avatar filippog avatar supertassu avatar xionox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tunnelencabulator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.