Setting up a Jenkins server
This page contains instructions and a script for setting up a Jenkins Continuous Integration Server for automated building of all of the TEI products.
Contents
What is a Jenkins server?
The purpose of a Jenkins server is to watch a code repository waiting for changes in the code. When it detects a change (because someone has edited one of the source code files), it downloads the changes and starts building the codebase to create an updated version of the project, whatever that is. In the case of the TEI, there are five different sub-projects, each of which is built separately: the Roma schema-building tool, the TEI Stylesheets, TEI P5, TEI P5 Documentation (the Guidelines etc.), and some TEI P5 test cases.
Why would I want to create a Jenkins server?
A Jenkins server is useful to project administrators because it will automatically create new builds whenever the codebase changes, so the admins don't have to remember to do that themselves. It will also notify you when a build fails, perhaps because a recent change to the source contained an error. Programmers working on the codebase can use this feature to check the changes they have made to make sure they're OK, and roll them back if they don't work, without having to have a complete build environment set up on their own computers.
The TEI's main Jenkins server, in Oxford, is at http://tei.oucs.ox.ac.uk/jenkins/. There you can see the five build targets and look at their status -- when they were last built, when the last build failure occurred, etc. The Humanities Computing and Media Centre at the University of Victoria is in the process of setting up a second Jenkins server for the TEI. As soon as this is running, the URI will be included in this page. You might want to set up your own Jenkins server for a number of reasons:
- To add extra redundancy to the TEI project build process
- To add your own build targets for specific purposes
- To learn about Jenkins so that you can help administer one of the main servers
How do I go about creating a Jenkins server?
There are three stages:
1. Build a basic headless Ubuntu server, using the Ubuntu Lucid (Long-Term Support) edition.
2. Run our customization script to install all of the TEI and Jenkins code.
3. Make some final tweaks to your setup (adding an oXygen license and setting up security for Jenkins).
You will need to be comfortable with installing Linux and doing a couple of things at the command line. If you've never done this kind of thing before, this project is probably not for you.
Stage one
Download the latest distribution of the Ubuntu Lucid (10.04) server ISO from the Ubuntu download site (http://www.ubuntu.com/download/ubuntu/alternative-download).
Install the distribution on the machine you're going to use as your server (or on a virtual machine, if you don't have a piece of hardware to dedicate to the job). Choose "Internet server" when you're asked what type of computer you're setting up, during the install process. Then do all the updates to make sure your Lucid installation is fully updated.
Stage two
Download our script.