At Pair Shaped we firmly believe that pair working is the future (and the present). However a good part of our team works remotely and this can be a real challenge.
While remote pairing solutions are becoming increasingly popular, as a coder it’s hard to beat the Vim + Tmux combination. It’s simple, fast, and there’s no client OS or application dependencies.
In this post we take you through all of the steps to setup an amazing remote pairing environment using an affordable cloud server (VPS). What this will allow you and your team to do:
- Securely share persistent tmux (shell) sessions on a linux box on the cloud.
- Watch each other code.
- Take turns coding.
- Rotate between different persistent pairing sessions with multiple team members all within the same server.
I highly recommend adding voice to the mix whether it’s Skype, Google Voice, or a SIP provider.
For starters, we’ll need a linux box in the cloud. For the server we’re going to go Digital Ocean since it is one of the most affordable options at the time of this post. However, the steps are essentially the same with other hosts like Linode and EC2, so definitely check them out too.
Sign up for an account at Digital Ocean and then create a 512MB droplet running Ubuntu 12.04 x32. If you’re not sure about the hostname option, a good choice would be something like pair.yourcompanydomain.com. Make sure you chose a region that’s close to you and your team to minimize latency.
At this end of this tutorial you can shut you droplet down if you aren’t going to use it, and it’ll only end up costing you a few cents.
Once you’ve created the droplet, you should receive an email from Digital Ocean with your new boxe’s IP address and credentials. For the rest of this post I’ll use a fictional IP. Just substitute the IP you were given as needed.
Open up a terminal if you don’t already have one up and follow along with these commands to setup and install the basics.
Basic Server Setup
1 2 3 4 5 6 7 8 9 10 11 12
Next we’ll need to setup user accounts for our pair. You can of course setup as many users as you want and run multiple tmux sessions, but that’s the topic of a future post.
Follow along with these commands, substituting your preferred usernames for “dave” and “dayton”.
Create Your Pairs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Now that we have your users setup with full rights (this is something you may want to change down the road), we can disable the root account and instead use a pair account.
Secure the Server
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Now we have a fairly secure server with our pair accounts using password-less access and it’s time to setup the pairing environment. We’re going to use wemux which is backed by tmux to manage the sessions.
1 2 3 4 5 6 7 8 9
You are now the proud owner of a remote pairing environment.
It’s time to take it for a spin and make sure everything’s copasetic.
You should now be running in a shared tmux session. One of your other accounts (pair2, etc.) can login and use the same command to join your session.
You will definitely want to checkout the wemux documentation for all of the configuration options.