16
Docker for Integration Testing Wouter Danes Docker Amsterdam / Utrecht, 28 August 2014

Docker for Integration Testing

Embed Size (px)

DESCRIPTION

Docker for Integration Testing, presentation at Docker Amsterdam/Utrecht August 2014.

Citation preview

Page 1: Docker for Integration Testing

Docker for Integration Testing

Wouter Danes Docker Amsterdam / Utrecht, 28 August 2014

Page 2: Docker for Integration Testing

API Platform Engineer

Page 3: Docker for Integration Testing

Agenda

• Ways I use docker during development

• Fitting docker into your build process

• Docker maven integration

Page 4: Docker for Integration Testing

Ways I use docker during development

Page 5: Docker for Integration Testing

Shadow IT

Page 6: Docker for Integration Testing

Run !“production” !

locally

Page 7: Docker for Integration Testing

Proofs!of!

Concept

Page 8: Docker for Integration Testing

CI environment

• Spawn build slaves

• No port collisions

• Replace D/T with feature branch deploys

• No version / stack collisions in “environment”

Page 9: Docker for Integration Testing

Fitting docker into your build process

Page 10: Docker for Integration Testing

build test package testpackage

publish

High level build process

Page 11: Docker for Integration Testing

build test package testpackage

publish

build run start stoplinkexpose

tagpush

Docker commands per build step

Page 12: Docker for Integration Testing

Docker maven integration

Page 13: Docker for Integration Testing

build test package testpackage

publish

build run start stoplinkexpose

tagpush

resourcescompile

test package integration-testverify

installdeploy

Maven vs Docker

Page 14: Docker for Integration Testing

docker-maven-plugin• Build docker images

• Start containers

• Link containers

• Wait for containers to finish initialisation

• Expose URLs / port info to integration tests

• Clean up

• Push images to an index / registry

Page 15: Docker for Integration Testing

Demo project

Page 16: Docker for Integration Testing

References

• Two docker blog posts: www.wouterdanes.net

• Docker maven plugin: github.com/wouterd/docker-maven-plugin

• 12 principles for developing containers well: 12factor.net