hydra: continuous integration and testing for demanding people: the basics

25
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

Upload: sander-van-der-burg

Post on 16-Jul-2015

295 views

Category:

Software


1 download

TRANSCRIPT

Hydra: Continuous Integration and Testing forDemanding People: The Basics

Sander van der Burg

Conference Compass

March 13, 2014

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Software development

Imagine a development team:

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Software development

Product development seems to be progressing just fine:

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Software development

But suddenly:

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Frustration!

The product does not work or behaves incorrectly

There is a large time window in which it is unknown whethersomething 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: The Basics

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: The Basics

Solution: Continuous integration

Continuous Integration is a software developmentpractice where members of a team integrate their workfrequently, usually each person integrates at least daily -leading to multiple integrations per day. Each integrationis verified by an automated build (including test) todetect integration errors as quickly as possible.

– Martin Fowler

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Continuous integration solutions

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Continuous integration solutions

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Many more available

Tinderbox

build farm

BuildHive

Atlassian Bamboo

Microsoft Team Foundation Server

...

Hydra

Hydra: A Nix-based continuous integration server:

Generic. Supports multiple programming languageenvironments and component technologies.

Deployment. Build and test environments are deployedautomatically and all dependencies are ensured to be presentand correct.

Variability. Multiple versions/variants of dependencies cansafely coexist.

Multi platform support. Builds can be easily delegated tomachines with a different operating system.

Scalability. Builds are transparently delegated to any machinein a cluster capable of building it.

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra

Hydra: A Nix-based continuous integration server:

Generic. Supports multiple programming languageenvironments and component technologies.

Deployment. Build and test environments are deployedautomatically and all dependencies are ensured to be presentand correct.

Variability. Multiple versions/variants of dependencies cansafely coexist.

Multi platform support. Builds can be easily delegated tomachines with a different operating system.

Scalability. Builds are transparently delegated to any machinein a cluster capable of building it.

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra overview

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra overview

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Components

Queue runner: Regularly checks what has changed andwhat to build

Evaluator: Builds the jobs

Server: Web application making builds and test resultsavailable

Nix: Package mananger responsible for the actualbuilds and depedency management

Hydra cluster

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra cluster

Our build cluster :-)

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra server: Projects

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra server: Jobsets

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra server: Evaluations

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra server: Jobs

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra server: Build products

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra server: Jobset configuration

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Hydra server: Queue

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

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 onHydra

Current cluster installation has done approx. 11500 buildssince December 2013

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics

Availability

Nix and Hydra are available as free and open source software underthe 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: The Basics

Questions

Sander van der Burg Hydra: Continuous Integration and Testing for Demanding People: The Basics