docker for integration testing
DESCRIPTION
Docker for Integration Testing, presentation at Docker Amsterdam/Utrecht August 2014.TRANSCRIPT
![Page 1: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/1.jpg)
Docker for Integration Testing
Wouter Danes Docker Amsterdam / Utrecht, 28 August 2014
![Page 2: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/2.jpg)
API Platform Engineer
![Page 3: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/3.jpg)
Agenda
• Ways I use docker during development
• Fitting docker into your build process
• Docker maven integration
![Page 4: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/4.jpg)
Ways I use docker during development
![Page 5: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/5.jpg)
Shadow IT
![Page 6: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/6.jpg)
Run !“production” !
locally
![Page 7: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/7.jpg)
Proofs!of!
Concept
![Page 8: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/8.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/9.jpg)
Fitting docker into your build process
![Page 10: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/10.jpg)
build test package testpackage
publish
High level build process
![Page 11: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/11.jpg)
build test package testpackage
publish
build run start stoplinkexpose
tagpush
Docker commands per build step
![Page 12: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/12.jpg)
Docker maven integration
![Page 13: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/13.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/14.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/15.jpg)
Demo project
![Page 16: Docker for Integration Testing](https://reader033.vdocuments.us/reader033/viewer/2022050920/54b767384a7959a23c8b47d6/html5/thumbnails/16.jpg)
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