+
+That installation is used to build software components from the
+Nix,
+NixOS,
+Stratego/XT,
+and related projects.
+
+If you are one of the developers on those projects, it is likely that
+you will be using the NixOS Hydra server in some way. If you need to
+administer automatic builds for your project, you should pull the
+right strings to get an account on the server. This manual will tell
+you how to set up new projects and build jobs within those projects
+and write a release.nix file to describe the build process of your
+project to Hydra. You can skip Chapter 2.
+
+
+
+If your project does not yet have automatic builds within the NixOS
+Hydra server, it may actually be eligible. We are in the process of
+setting up a large buildfarm that should be able to support open
+source and academic software projects. Get in touch.
+
+
1.3. Hydra on your own buildfarm
+
+If you need to run your own Hydra installation, Chapter 2 explains
+how to download and install the system on your own server.
+
+
+
Chapter 2. Installation and Configuration
+
+This chapter explains how to install Hydra on your own buildfarm server.
+We assume that you have
+
+
2.1. Platform Requirements
+
+To run Hydra you need a Linux server with at least a considerable
+amount of diskspace to store builds. A multi-core machine is not a
+waste since Hydra can schedule multiple simultaneous build jobs.
+
+
+
+Of course we think it is a good idea to use the NixOS Linux distribution for your
+buildfarm server. But this is not a requirement. The Nix software
+deployment system can be installed on any Linux distribution in
+parallel to the regular package management system. Thus, you can use
+Hydra on a Suse, Fedora, or Ubuntu system.
+
+
+
+Hydra on Windows??
+
+
+
2.2. Getting Nix
+
+If your server runs NixOS you are all set to continue with
+installation of Hydra. Otherwise you first need to install Nix.
+The latest stable release is Nix 0.12.
+Installation instructions can be found in the
+Nix User's Guide.
+
+
+
+Why Nix ...
+
+
2.3. Installation
+
+To install Hydra, get the most recent 'closure' available from
+
+
+
+The Hydra software is installed in the Nix store, but to run it needs
+a directory for storing the database, logs, and session data. In your
+.bashrc or similar configuration file define:
+
+
+ export HYDRA_DATA=/usr/local/hydra
+
+
+and make sure that you actually create that directory. (Of course, you
+can use another directory, but then remember to also substitute that
+name in the commands below.)
+
+
+
+Run hydra_init.pl to initialize the database
+
+
+
+Also start the scheduler, which monitors the source repositories and
+adds builds to the queue, and the runner, which executes jobs in the
+queue.
+
+
+$ hydra_scheduler.pl
+$ hydra_queue_runner.pl
+
+
+Now your Hydra server should be up and running and the web interface
+operational.
+
+
2.5. User Administration
+
+To be able to add jobs and create projects you need to register users
+in the Hydra database. In the current version, the web interface does
+not yet support user administration. Use the following command to add
+a new user to the database.
+
+
+
+where eelco is the username, and foobar the
+password. (Make sure to use other values!)
+
+
+
+To give this user administrator privileges, follow this up by:
+
+
+$ sqlite3 /usr/local/hydra/hydra.sqlite "insert into UserRoles(userName, role) values('eelco', 'admin');"
+
+
+Now you should be able to create a project using the Hydra web interface.
+
+
Chapter 3. Creating Projects
+
+The next step is to add projects to the buildfarm. We follow the
+example of the patchelf project at hydra.nixos.org. Note that the
+error messages provided as feedback by the webinterface can be
+somewhat unfriendly in the current version.
+
+
+
+Login
+to the webinterface of your Hydra installation using
+the username and password you inserted in the database.
+Then follow the
+'Create Project'
+link to create a new project.
+
+
3.1. General information
+
+A project definition consists of some general information
+
+The general information of a project are mainly its name and
+owner. Here's what we fill in for the patchelf project:
+
+
+
+The Identifier should be a unique name (it is the primary
+database key for the project table in the database). If you try to
+create a project with an already existing identifier you'd get an
+error message such as:
+
+
+I'm very sorry, but an error occurred:
+DBIx::Class::ResultSet::create(): DBI Exception: DBD::SQLite::st execute failed: column name is not unique(19) at dbdimp.c line 402
+
+
+So try to create the project after entering just the general
+information to figure out if you have chosen a unique name.
+Jobsets can be added once the project has been created.
+
+
+
+Once create there should be an entry for the project in the sidebar. Go to
+the project page for the
+Patchelf
+project.
+
+
Jobsets
+
+A project can consist of multiple `jobsets', separate tasks that can
+be built separately, but may depend on each other (without cyclic
+dependencies, of course). Go to the
+Edit
+page of the Patchelf project and 'Add a new jobset'
+by providing the following 'Information':
+
+
+
+This states that in order to build the 'Trunk' jobset, the Nix
+expression in the file 'release.nix', which can be obtained from input
+'patchelfSrc', should be evaluated. (We'll have a look at release.nix
+later.)
+
+
+
+To realize a job we probably need a number of inputs, which can be
+declared in the table below. As many inputs as required can be added.
+For patchelf we declare the following inputs.
+
+
+
+there must be one primary job
+
+check the radio button of exactly one job
+
+https://svn.nixos.org/repos/nix/nixpkgs/trunk
+
+
Building Jobs
+
+
+
release.nix
+
+
+
+- Voorbeelden van Nix expressies voor Hydra:
+
+
+
+https://svn.nixos.org/repos/nix/patchelf/trunk/release.nix
+https://svn.nixos.org/repos/nix/nix/trunk/release.nix
+https://svn.nixos.org/repos/nix/hydra/trunk/release.nix
+
+
Building on the command line
+
+Overigens zijn die helemaal niet Hydra-specifiek, je kunt ze gewoon vanaf de
+command line bouwen, bijv. als je een patchelf checkout hebt (met een nixpkgs
+checkout in ../nixpkgs):
+
+$ nix-build release.nix -A rpm_fedora10i386
+
+
+