Precise and Complete Requirements? An Elusive Goal
Hydra: Continuous Integration and Testing for Demanding People: The Basics
1. Hydra: Continuous Integration and Testing for
Demanding People: The Basics
Sander van der Burg
Conference Compass
March 13, 2014
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
2. Software development
Imagine a development team:
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
5. Frustration!
The product does not work or behaves incorrectly
There is a large time window in which it is unknown whether
something still works
A product may not be delivered in time because of breakage
It may take a lot of effort to fix it
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
6. Confusion!
You may wonder:
Why is it broken?
What exactly is broken?
When did it break?
Who did it?
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
7. Solution: Continuous integration
Continuous Integration is a software development
practice where members of a team integrate their work
frequently, usually each person integrates at least daily -
leading to multiple integrations per day. Each integration
is verified by an automated build (including test) to
detect integration errors as quickly as possible.
– Martin Fowler
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
9. Continuous integration solutions
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
Many more available
Tinderbox
build farm
BuildHive
Atlassian Bamboo
Microsoft Team Foundation Server
...
10. Hydra
Hydra: A Nix-based continuous integration server:
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
11. Hydra
Hydra: A Nix-based continuous integration server:
Generic. Supports multiple programming language
environments and component technologies.
Deployment. Build and test environments are deployed
automatically and all dependencies are ensured to be present
and correct.
Variability. Multiple versions/variants of dependencies can
safely coexist.
Multi platform support. Builds can be easily delegated to
machines with a different operating system.
Scalability. Builds are transparently delegated to any machine
in a cluster capable of building it.
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
13. Hydra overview
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
Components
Queue runner: Regularly checks what has changed and
what to build
Evaluator: Builds the jobs
Server: Web application making builds and test results
available
Nix: Package mananger responsible for the actual
builds and depedency management
14. Hydra cluster
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
15. Hydra cluster
Our build cluster :-)
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
23. Trivia
Hydra has been in use since March 2013.
All apps have been branded and built with it since then
Also the new backend related projects are built and tested on
Hydra
Current cluster installation has done approx. 11500 builds
since December 2013
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People
24. Availability
Nix and Hydra are available as free and open source software under
the LGPLv2 and the GPLv3 licenses:
Nix: http://nixos.org/nix
Hydra: http://nixos.org/hydra
NixOS’ Hydra server: http://hydra.nixos.org
Nix can be used on any Linux distribution, NixOS, Mac OS X,
FreeBSD, and Windows (through Cygwin)
Hydra can be used on any Linux distribution
Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People