Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install relay

How to install relay

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install relay
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.0.8 Available View build log
Linux (64-bit)
0.0.8 Available View build log
 
License
MIT
Dependencies
Imports
Lastest release
version 0.0.8 on Mar 14th, 2013

Meta-magical SSH tunnels for remote developers behind firewalls.

Ever tried to pair-program with someone who works behind a firewall? You want to SSH into their machine, but you can't! Relay makes it possible to share your development environemnt with anyone by using another server in the middle to proxy the connection. And it doesn't just work with SSH--you can tunnel the webserver too!

Server setup

Relay requires that you have a server running somewhere public which you can use to bounce connections from between your users. We use an EC2 micro in a public security group, but you can use anything you want. You'll need to make sure whatever ports you map in your ports.json are open to the world.

Install

Relay can be installed in a virtualenv, but we recommend installing it with sudo so it is always available:

System Message: ERROR/3 (<string>, line 18)

Unknown directive type "code".

.. code:: bash

    $ sudo pip install relay

General setup

(nprapps users see the next section)

Relay uses a configuration file located at ~/.relay.conf. Create this file with contents such as:

System Message: ERROR/3 (<string>, line 29)

Unknown directive type "code".

.. code:: ini

    [relay]

    # User to connect to the relay server as
    user = ubuntu

    # Hostname or IP of the relay server
    server = relay_server.your_domain.com

    # Absolute path to the public and private SSH keys
    public_key = /path/to/your/public_key.pub
    private_key = /path/to/your/private_key

    # Username of the pair programmer account on each developer computer
    pair_user = relay

    # Absolute path to the port mapping file
    ports_json = /path/to/your/ports.json

    # Absolute path to a file containing bash aliases to be installed when creating the pair programmer user account
    bash_profile = /path/to/your/bash_profile

ports.json is a mapping of user's local ports to remote ports on the server, so that users will never collide when creating SSH tunnels. Create this file with contents such as:

System Message: ERROR/3 (<string>, line 54)

Unknown directive type "code".

.. code:: javascript

    {
        "chris": {
            "22": "2222",
            "8000": "8000"
        },
        "katie": {
            "22": "2223",
            "8000": "8001"
        },
    }

bash_profile is totally optional, but could contain aliases or environment variables you want every user to have automatically available.

You now need to create a relay user. This process is automated:

System Message: ERROR/3 (<string>, line 71)

Unknown directive type "code".

.. code:: bash

    $ relay setup

If you're running OS X, you need to enable remote login for the newly created relay user. Open System Preferences and navigate to the "Sharing" preference pane.

Check the box next to "Remote Login." You can either add the relay user to the allowed users, or just leave it open to "All users."

remotelogin.png

NPRApps setup

Pre-baked configuration files are in our Dropbox folder. You must have Dropbox installed, syncing to ~/Dropbox and the nprapps shared folder synced to your local computer. Then run:

System Message: ERROR/3 (<string>, line 86)

Unknown directive type "code".

.. code:: bash

    $ ln -s ~/Dropbox/nprapps/relay/relay.conf ~/.relay.conf
    $ relay setup

Sharing SSH

To share your SSH connection (for tmux'ing), open a new terminal (or tab or tmux pane):

System Message: ERROR/3 (<string>, line 96)

Unknown directive type "code".

.. code:: bash

    $ relay user:$USER share:22

Where $USER is your username in ports.json.

To connect to a shared SSH connection:

System Message: ERROR/3 (<string>, line 104)

Unknown directive type "code".

.. code:: bash

    $ relay user:$USER ssh

Where $USER is the username in ports.json of the user sharing the connection.

Sharing development webserver

To share your local development webserver, open a new terminal (or tab or tmux pane):

System Message: ERROR/3 (<string>, line 115)

Unknown directive type "code".

.. code:: bash

    $ relay user:$USER share:8000

Where $USER is your username in ports.json.

To connect open a shared webserver in your browser:

System Message: ERROR/3 (<string>, line 123)

Unknown directive type "code".

.. code:: bash

    $ relay user:$USER web

Where $USER is the username in ports.json of the user sharing the webserver.

Subscribe to package updates

Last updated Mar 14th, 2013

Download Stats

Last month:3

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.