I have three web sites that I use internally – they’re part of the development environment. One is a rails app that we use for tracking defects, the second is a mediawiki that we use for documentation, the third is gitweb. We decided to do some travel, but still want to access that development environment over the internet.
First step was to harden the server that hosts this – which I documented a bit here. I also needed to set security on all these servers – the rails app already had a user logon, mediawiki needed changes to make it only accessible with a userid following the instructions at the mediawiki site, gitweb I put behind a simple apache authentication using username and password (we only have 2 users at the moment, so not too onerous).
The next step was to proxy all these from a single web server, so that they all appear as if they were one web site (I only have one domain name). This was suprisingly hard, so I thought I’d write up some instructions for what I did. I’m running Debian Wheezy, so all these instructions are relevant for debian and probably ubuntu.
I’ve chosen to set up my development environment with two servers – a mysql central server, and an app server on which rails runs. This reflects my eventual intent – that the production system will have the mysql database separate from the app server, I’m figuring it’s easier to work that way. I spend a lot of time ssh’ing between these servers, and a bunch of tools such as scp and git run over top of ssh.
My aim in this post is to configure for a bit more security – I’m setting up so that you use public keys to logon rather than providing a password. This is easier/quicker to log on, but actually more secure than using a password.
I’m going to jump around a bit with some of these posts – some will be about what I’m doing at the moment, others will be pulling together the history of how to get a ruby on rails development environment up and working, still others about the concept of what I’m trying to create in a development environment, testing environment and production environment in Amazon. No doubt it will make some sense once I write it. We’ll see.
Today, what I’ve been doing is sorting out a git server, this post describes how to create a git server including a web client to view the git repository, and the process for creating a git new git repository for a ruby on rails project. Git is a distributed version management system for the application code. It’s very powerful, and also very complex (so far as I can tell). It is used by the linux kernel developers, and was written by Linus himself to meet the particular requirements of kernel development. Refer the wikipedia entry for more information.
So, why did I choose git for version control?