SlideShare une entreprise Scribd logo
1  sur  73
Télécharger pour lire hors ligne
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
INTEGRATION TESTS &
CONTAINERS
A SUCCESS STORY!
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
INTEGRATION TESTS &
CONTAINERS
HEROIC DRAMA
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
INTEGRATION TESTS
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
LHC : Testing facilities
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
OCTOBER 2008
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
OCTOBER 2008
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
OCTOBER 2008
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
OCTOBER 2008
✓24 dipole magnets of 30
dipole magnets
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
CONTAINERS
“ “
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
Write once, run everywhere
WORE
“ “
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
Package Once, Deploy Anywhere
PODA
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
Development
Production
Tests
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
PROJECT “HYDRA”
PRODUCT
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
PROJECT “HYDRA” DATA SHEET
Server : Spring-boot v1.5.1
Client : (2) Webapps polymer v 0.5 - v 2.0
Product: Griffon 2.3.0 Application : JavaFX (UI)
Build tool : Gradle v3.5
Database: H2 & Postgresql 9.4
VC Database: Flyway
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
PROJECT “HYDRA” DATA SHEET
Server : Spring-boot v1.5.1
Client : (2) Webapps polymer v 0.5 - v 2.0
Product: Griffon 2.3.0 Application : JavaFX (UI)
Build tool : Gradle v3.5
Database: H2 & Postgresql 9.4
VC Database: Flyway
Production
Development
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
H2 POSTGRES
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
H2
✓In memory database
✓Spring-boot integration
✓Easy to setup
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
BUT
✓is not Production
✓(compatibility mode is not
enough)
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
USE POSTGRES
CONTAINERS
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
Development
Production
Tests
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
COMMAND LINE
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
$ docker run --name my_psql 
→ -e POSTGRES_PASSWORD_FILE=/postgres_password 
→ -e POSTGRES_USER=psql_user 
→ -e POSTGRES_DB=psql_db 
→ -v /Users/ixchelruiz/.config/postgres_passwd:/postgres_password 
→ -p 5432:5432 
→ -d postgres:9.4
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DOCKER-COMPOSE
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DOCKER-COMPOSE.YML
version: '3.1'
services:
db:
image: postgres:9.4
restart: always
environment:
POSTGRES_USER: psql_user
POSTGRES_PASSWORD_FILE: /postgres_password
POSTGRES_DB: psql_db
ports:
- "5432:5432"
volumes:
- /Users/ixchelruiz/.config/postgres_passwd:/postures_password
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
Success!
Developers
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
CLIENT ENVIRONMENTS
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
POSTGRESQL CONFIGURATION
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
CLIENT
✓Postgres configuration for
different environments
✓ Test
✓ User acceptance
✓ Production
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
REVIEW IDEAS
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DEVOPS
“ “
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
Snowflake server vs Phoenix server
— Martin Fowler
Puppy
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
SNOWFLAKE PUPPY
✓Evolve with time
✓“unique and special”
✓Difficult to reproduce
✓ Nurse back to health
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
PHOENIX SERVER
✓Automatization tools
✓Security patches
✓Configuration
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
PHOENIX SERVER
✓Automatization tools
✓Security patches
✓Configuration
Base Images
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
GRADLE / MAVEN
DISCLAIMER
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
GRADLE-DOCKER-PLUGIN
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
https://github.com/bmuschko/gradle-docker-plugin
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
CREATE CUSTOM IMAGES
OVERKILL?
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
CREATE CUSTOM IMAGES
OVERKILL?
YEAH!! KIND OF.. BUT
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
apply plugin: 'com.bmuschko.docker-remote-api'
import com.bmuschko.gradle.docker.tasks.image.Dockerfile
import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
task createDockerfile(type: Dockerfile) {
destFile = project.file('build/mydockerfile/Dockerfile')
from 'ubuntu:12.04'
maintainer 'Benjamin Muschko "benjamin.muschko@gmail.com"'
}
task buildImage(type: DockerBuildImage) {
dependsOn createDockerfile
inputDir = createDockerfile.destFile.parentFile
tag = 'bmuschko/myimage:latest'
}
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
Success
Infrastructure
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
AND NOW
THE PROJECT
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
AND NOW
THE PROJECT
YAY!!
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
PROJECT “HYDRA” DATA SHEET
Server : Spring-boot v1.5.1
Client : (2) Webapps polymer v 0.5 - v 2.0
Product: Griffon 2.3.0 Application : JavaFX (UI)
Build tool : Gradle v3.5
Database: H2 & Postgresql 9.4
VC Database: Flyway
Production
Development
BO
M
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
FLYWAY
VERSION CONTROL FOR YOUR DATABASE.
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
MIGRATE
SCHEMA & DATA
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
MIGRATE
SCHEMA & DATA
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
✓ New Release
✓ Flyway migrating schemas &
data
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
OPPSSS!
✓ New Release
✓ Flyway migrating schemas &
data
✓I made a bubu
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
TEST
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
TEST
LOCALLY
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
TEST
LOCALLY
MIGRATION SCHEMA & DATA
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
TEST
LOCALLY
MIGRATION SCHEMA & DATA
SANITY CHECK
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DOCKER-COMPOSE
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DOCKER-COMPOSE.YML (VERSION 1)
version: '3.1'
services:
db:
image: postgres:9.4
restart: always
environment:
POSTGRES_USER: psql_user
POSTGRES_PASSWORD_FILE: /postgres_password
POSTGRES_DB: psql_db
ports:
- "5432:5432"
volumes:
- /Users/ixchelruiz/.config/postgres_passwd:/postures_password
healtcheck:
test: ["CMD-SHELL", "pg_isready -U postgres”]
web:
image: tomcat:8-jre8
ports: 8080
depends_on:
- db
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
OR
WAIT FOR IT!
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DOCKER-COMPOSE.YML
version: '3.1'
services:
db:
image: postgres:9.4
restart: always
environment:
POSTGRES_USER: psql_user
POSTGRES_PASSWORD_FILE: /postgres_password
POSTGRES_DB: psql_db
ports:
- "5432:5432"
volumes:
- /Users/ixchelruiz/.config/postgres_passwd:/postures_password
web:
depends_on:
- db
command: ["./wait-for-it.sh", "db:5432", "--", “cmd"]
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DOCKER-COMPOSE-PLUGIN
(GRADLE)
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
https://github.com/avast/gradle-docker-compose-plugin
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
buildscript {
dependencies {
classpath "com.avast.gradle:gradle-docker-compose-plugin:$version"
}
}
apply plugin: 'docker-compose'
dockerCompose.isRequiredBy(test)
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
Success
Developers
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
INTEGRATION TEST
CI : WITH A TWIST!
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
CI
✓Port conflict
✓Environment variables
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DOCKER-COMPOSE-PLUGIN
(GRADLE)
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
buildscript {
dependencies {
classpath "com.avast.gradle:gradle-docker-compose-plugin:$version"
}
}
apply plugin: 'docker-compose'
dockerCompose.isRequiredBy(test)
test.doFirst {
// exposes "${serviceName}_HOST" and "${serviceName}_TCP_${exposedPort}" environment variables
dockerCompose.exposeAsEnvironment(test)
// exposes "${serviceName}.host" and "${serviceName}.tcp.${exposedPort}" system properties
dockerCompose.exposeAsSystemProperties(test)
// get information about container of service `web` (declared in docker-compose.yml)
def webInfo = dockerCompose.servicesInfos.web.'web_1'
// pass host and exposed TCP port 80 as custom-named Java System properties
systemProperty 'myweb.host', webInfo.host
}
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
CI
✓Zombie containers
✓Force compose down
✓Configuration it’s different
✓Development
✓Testing
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
✓ Automatic discovery of local docker environment
✓ Pull images or build from Dockerfile
✓ Start/stop container
✓ Wait for it to be ready (log string / listening port / protocol-
specific)
✓ Port mapping
✓ Clean up
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
✓ Manage Dockerized external dependencies via a Java object facade
✓ JUnit integration
✓ Starts/stops containers for each class/method
✓ Reliability:
✓ start from clean state
✓ isolated instances
✓ port randomisation
✓ tag-based versioning
✓ Java JUnit support; Spock, Scala and Python wrappers/forks
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
DEMO
@ i x c h e l r u i z # Vo x x e d D a y s B a n ff
THANK YOU
QUESTIONS OR FEEDBACK?
PLEASE FILL THE SURVEY! PING ME! TALK TO ME!

Contenu connexe

Tendances

Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your MasterNicola Paolucci
 
Jenkins multibranch pipeline workshop sep 2018
Jenkins multibranch pipeline workshop sep 2018Jenkins multibranch pipeline workshop sep 2018
Jenkins multibranch pipeline workshop sep 2018Oleksandr Metelytsia
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldRachael L Moore
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Ben Hall
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Derek Willian Stavis
 
Let the contribution begin (EST futures)
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)SeongJae Park
 
Best Practices In Implementing Container Image Promotion Pipelines
Best Practices In Implementing Container Image Promotion PipelinesBest Practices In Implementing Container Image Promotion Pipelines
Best Practices In Implementing Container Image Promotion PipelinesAll Things Open
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient waySylvain Rayé
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowJosé Paumard
 
Drupal Development : Tools, Tips, and Tricks
Drupal Development : Tools, Tips, and TricksDrupal Development : Tools, Tips, and Tricks
Drupal Development : Tools, Tips, and TricksGerald Villorente
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is DockerNick Belhomme
 
Ansible+docker (highload++2015)
Ansible+docker (highload++2015)Ansible+docker (highload++2015)
Ansible+docker (highload++2015)Pavel Alexeev
 
Lessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersLessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersBen Hall
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)Robert Swisher
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and GroovyKiyotaka Oku
 
DevOps for Opensource Geospatial Applications
DevOps for Opensource Geospatial ApplicationsDevOps for Opensource Geospatial Applications
DevOps for Opensource Geospatial Applicationstlpinney
 
LXC to Docker Via Continuous Delivery
LXC to Docker Via Continuous DeliveryLXC to Docker Via Continuous Delivery
LXC to Docker Via Continuous DeliveryDocker, Inc.
 

Tendances (19)

Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your Master
 
Jenkins multibranch pipeline workshop sep 2018
Jenkins multibranch pipeline workshop sep 2018Jenkins multibranch pipeline workshop sep 2018
Jenkins multibranch pipeline workshop sep 2018
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
 
Let the contribution begin (EST futures)
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)
 
Best Practices In Implementing Container Image Promotion Pipelines
Best Practices In Implementing Container Image Promotion PipelinesBest Practices In Implementing Container Image Promotion Pipelines
Best Practices In Implementing Container Image Promotion Pipelines
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn Flow
 
Drupal Development : Tools, Tips, and Tricks
Drupal Development : Tools, Tips, and TricksDrupal Development : Tools, Tips, and Tricks
Drupal Development : Tools, Tips, and Tricks
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is Docker
 
Ansible+docker (highload++2015)
Ansible+docker (highload++2015)Ansible+docker (highload++2015)
Ansible+docker (highload++2015)
 
Lessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersLessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containers
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and Groovy
 
DevOps for Opensource Geospatial Applications
DevOps for Opensource Geospatial ApplicationsDevOps for Opensource Geospatial Applications
DevOps for Opensource Geospatial Applications
 
LXC to Docker Via Continuous Delivery
LXC to Docker Via Continuous DeliveryLXC to Docker Via Continuous Delivery
LXC to Docker Via Continuous Delivery
 

Similaire à Voxxed Banff 2018 : Containers & Integration tests

Lesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at ProntoLesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at ProntoKan Ouivirach, Ph.D.
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Ortus Solutions, Corp
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Developmentallingeek
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017MarcinStachniuk
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline Docker, Inc.
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stackEric Ahn
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Velocidex Enterprises
 
Troubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineersTroubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineersDocker, Inc.
 
November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkins
November 15 cloud bees clusterhq meetup   fli, flockerhub, and jenkinsNovember 15 cloud bees clusterhq meetup   fli, flockerhub, and jenkins
November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkinsRyan Wallner
 
JFrog container registry - DevOps extravaganza
JFrog container registry - DevOps extravaganza JFrog container registry - DevOps extravaganza
JFrog container registry - DevOps extravaganza Batel Zohar Tova
 
JavaScript All The Things
JavaScript All The ThingsJavaScript All The Things
JavaScript All The ThingsJordan Yaker
 
Docker in Production: Reality, Not Hype - DevOps Chicago
Docker in Production: Reality, Not Hype - DevOps ChicagoDocker in Production: Reality, Not Hype - DevOps Chicago
Docker in Production: Reality, Not Hype - DevOps Chicagobridgetkromhout
 
Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Akhmad Fathonih
 
Docker and the Container Revolution
Docker and the Container RevolutionDocker and the Container Revolution
Docker and the Container RevolutionRomain Dorgueil
 
Boîte à outils d'investigation des soucis de mémoire
Boîte à outils d'investigation des soucis de mémoireBoîte à outils d'investigation des soucis de mémoire
Boîte à outils d'investigation des soucis de mémoireJean Bisutti
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...Ambassador Labs
 
Consistent Development Environment with Vagrant and Chef
Consistent Development Environment with Vagrant and ChefConsistent Development Environment with Vagrant and Chef
Consistent Development Environment with Vagrant and ChefGerald Villorente
 
Boris Stoyanov - some new features in Apache cloudStack
Boris Stoyanov - some new features in Apache cloudStackBoris Stoyanov - some new features in Apache cloudStack
Boris Stoyanov - some new features in Apache cloudStackShapeBlue
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hypebridgetkromhout
 

Similaire à Voxxed Banff 2018 : Containers & Integration tests (20)

Lesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at ProntoLesson Learned from Using Docker Swarm at Pronto
Lesson Learned from Using Docker Swarm at Pronto
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Development
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stack
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
 
GraphQL
GraphQLGraphQL
GraphQL
 
Troubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineersTroubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineers
 
November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkins
November 15 cloud bees clusterhq meetup   fli, flockerhub, and jenkinsNovember 15 cloud bees clusterhq meetup   fli, flockerhub, and jenkins
November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkins
 
JFrog container registry - DevOps extravaganza
JFrog container registry - DevOps extravaganza JFrog container registry - DevOps extravaganza
JFrog container registry - DevOps extravaganza
 
JavaScript All The Things
JavaScript All The ThingsJavaScript All The Things
JavaScript All The Things
 
Docker in Production: Reality, Not Hype - DevOps Chicago
Docker in Production: Reality, Not Hype - DevOps ChicagoDocker in Production: Reality, Not Hype - DevOps Chicago
Docker in Production: Reality, Not Hype - DevOps Chicago
 
Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)
 
Docker and the Container Revolution
Docker and the Container RevolutionDocker and the Container Revolution
Docker and the Container Revolution
 
Boîte à outils d'investigation des soucis de mémoire
Boîte à outils d'investigation des soucis de mémoireBoîte à outils d'investigation des soucis de mémoire
Boîte à outils d'investigation des soucis de mémoire
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 
Consistent Development Environment with Vagrant and Chef
Consistent Development Environment with Vagrant and ChefConsistent Development Environment with Vagrant and Chef
Consistent Development Environment with Vagrant and Chef
 
Boris Stoyanov - some new features in Apache cloudStack
Boris Stoyanov - some new features in Apache cloudStackBoris Stoyanov - some new features in Apache cloudStack
Boris Stoyanov - some new features in Apache cloudStack
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hype
 

Plus de Ixchel Ruiz

JUGUtrecht2023 - GithubActions
JUGUtrecht2023 - GithubActionsJUGUtrecht2023 - GithubActions
JUGUtrecht2023 - GithubActionsIxchel Ruiz
 
Failure is not an option
Failure is not an optionFailure is not an option
Failure is not an optionIxchel Ruiz
 
Failure is not an option
Failure is not an option Failure is not an option
Failure is not an option Ixchel Ruiz
 
JCConf.tw 2022 - DevOps for Java developers
JCConf.tw 2022 - DevOps for Java developersJCConf.tw 2022 - DevOps for Java developers
JCConf.tw 2022 - DevOps for Java developersIxchel Ruiz
 
All about dependencies
All about dependenciesAll about dependencies
All about dependenciesIxchel Ruiz
 
DevoxxMA_MavenPuzzlers.pdf
DevoxxMA_MavenPuzzlers.pdfDevoxxMA_MavenPuzzlers.pdf
DevoxxMA_MavenPuzzlers.pdfIxchel Ruiz
 
(De) Human Future
(De) Human Future(De) Human Future
(De) Human FutureIxchel Ruiz
 
DevoxxMA : The WHY series: Metrics
DevoxxMA : The WHY series: MetricsDevoxxMA : The WHY series: Metrics
DevoxxMA : The WHY series: MetricsIxchel Ruiz
 
Testing libraries for fun & profit. Beware: Increased productivity ahead
Testing libraries for fun & profit. Beware: Increased productivity aheadTesting libraries for fun & profit. Beware: Increased productivity ahead
Testing libraries for fun & profit. Beware: Increased productivity aheadIxchel Ruiz
 
DevoxxUK one size fits all
DevoxxUK   one size fits allDevoxxUK   one size fits all
DevoxxUK one size fits allIxchel Ruiz
 

Plus de Ixchel Ruiz (10)

JUGUtrecht2023 - GithubActions
JUGUtrecht2023 - GithubActionsJUGUtrecht2023 - GithubActions
JUGUtrecht2023 - GithubActions
 
Failure is not an option
Failure is not an optionFailure is not an option
Failure is not an option
 
Failure is not an option
Failure is not an option Failure is not an option
Failure is not an option
 
JCConf.tw 2022 - DevOps for Java developers
JCConf.tw 2022 - DevOps for Java developersJCConf.tw 2022 - DevOps for Java developers
JCConf.tw 2022 - DevOps for Java developers
 
All about dependencies
All about dependenciesAll about dependencies
All about dependencies
 
DevoxxMA_MavenPuzzlers.pdf
DevoxxMA_MavenPuzzlers.pdfDevoxxMA_MavenPuzzlers.pdf
DevoxxMA_MavenPuzzlers.pdf
 
(De) Human Future
(De) Human Future(De) Human Future
(De) Human Future
 
DevoxxMA : The WHY series: Metrics
DevoxxMA : The WHY series: MetricsDevoxxMA : The WHY series: Metrics
DevoxxMA : The WHY series: Metrics
 
Testing libraries for fun & profit. Beware: Increased productivity ahead
Testing libraries for fun & profit. Beware: Increased productivity aheadTesting libraries for fun & profit. Beware: Increased productivity ahead
Testing libraries for fun & profit. Beware: Increased productivity ahead
 
DevoxxUK one size fits all
DevoxxUK   one size fits allDevoxxUK   one size fits all
DevoxxUK one size fits all
 

Dernier

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 

Dernier (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 

Voxxed Banff 2018 : Containers & Integration tests

  • 1. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff INTEGRATION TESTS & CONTAINERS A SUCCESS STORY!
  • 2. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff
  • 3. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff INTEGRATION TESTS & CONTAINERS HEROIC DRAMA
  • 4. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff INTEGRATION TESTS
  • 5. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff
  • 6. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff LHC : Testing facilities
  • 7. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff OCTOBER 2008
  • 8. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff OCTOBER 2008
  • 9. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff OCTOBER 2008
  • 10. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff OCTOBER 2008 ✓24 dipole magnets of 30 dipole magnets
  • 11. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff CONTAINERS
  • 12. “ “ @ i x c h e l r u i z # Vo x x e d D a y s B a n ff Write once, run everywhere WORE
  • 13. “ “ @ i x c h e l r u i z # Vo x x e d D a y s B a n ff Package Once, Deploy Anywhere PODA
  • 14. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff Development Production Tests
  • 15. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff PROJECT “HYDRA” PRODUCT
  • 16. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff PROJECT “HYDRA” DATA SHEET Server : Spring-boot v1.5.1 Client : (2) Webapps polymer v 0.5 - v 2.0 Product: Griffon 2.3.0 Application : JavaFX (UI) Build tool : Gradle v3.5 Database: H2 & Postgresql 9.4 VC Database: Flyway
  • 17. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff PROJECT “HYDRA” DATA SHEET Server : Spring-boot v1.5.1 Client : (2) Webapps polymer v 0.5 - v 2.0 Product: Griffon 2.3.0 Application : JavaFX (UI) Build tool : Gradle v3.5 Database: H2 & Postgresql 9.4 VC Database: Flyway Production Development
  • 18. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff H2 POSTGRES
  • 19. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff H2 ✓In memory database ✓Spring-boot integration ✓Easy to setup
  • 20. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff BUT ✓is not Production ✓(compatibility mode is not enough)
  • 21. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff USE POSTGRES CONTAINERS
  • 22. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff Development Production Tests
  • 23. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff COMMAND LINE
  • 24. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff $ docker run --name my_psql → -e POSTGRES_PASSWORD_FILE=/postgres_password → -e POSTGRES_USER=psql_user → -e POSTGRES_DB=psql_db → -v /Users/ixchelruiz/.config/postgres_passwd:/postgres_password → -p 5432:5432 → -d postgres:9.4
  • 25. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DOCKER-COMPOSE
  • 26. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DOCKER-COMPOSE.YML version: '3.1' services: db: image: postgres:9.4 restart: always environment: POSTGRES_USER: psql_user POSTGRES_PASSWORD_FILE: /postgres_password POSTGRES_DB: psql_db ports: - "5432:5432" volumes: - /Users/ixchelruiz/.config/postgres_passwd:/postures_password
  • 27. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff Success! Developers
  • 28. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff CLIENT ENVIRONMENTS
  • 29. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff POSTGRESQL CONFIGURATION
  • 30. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff CLIENT ✓Postgres configuration for different environments ✓ Test ✓ User acceptance ✓ Production
  • 31. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff REVIEW IDEAS
  • 32. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DEVOPS
  • 33. “ “ @ i x c h e l r u i z # Vo x x e d D a y s B a n ff Snowflake server vs Phoenix server — Martin Fowler Puppy
  • 34. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff SNOWFLAKE PUPPY ✓Evolve with time ✓“unique and special” ✓Difficult to reproduce ✓ Nurse back to health
  • 35. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff PHOENIX SERVER ✓Automatization tools ✓Security patches ✓Configuration
  • 36. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff PHOENIX SERVER ✓Automatization tools ✓Security patches ✓Configuration Base Images
  • 37. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff GRADLE / MAVEN DISCLAIMER
  • 38. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff GRADLE-DOCKER-PLUGIN
  • 39. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff https://github.com/bmuschko/gradle-docker-plugin
  • 40. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff CREATE CUSTOM IMAGES OVERKILL?
  • 41. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff CREATE CUSTOM IMAGES OVERKILL? YEAH!! KIND OF.. BUT
  • 42. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff apply plugin: 'com.bmuschko.docker-remote-api' import com.bmuschko.gradle.docker.tasks.image.Dockerfile import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage task createDockerfile(type: Dockerfile) { destFile = project.file('build/mydockerfile/Dockerfile') from 'ubuntu:12.04' maintainer 'Benjamin Muschko "benjamin.muschko@gmail.com"' } task buildImage(type: DockerBuildImage) { dependsOn createDockerfile inputDir = createDockerfile.destFile.parentFile tag = 'bmuschko/myimage:latest' }
  • 43. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff Success Infrastructure
  • 44. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff AND NOW THE PROJECT
  • 45. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff AND NOW THE PROJECT YAY!!
  • 46. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff PROJECT “HYDRA” DATA SHEET Server : Spring-boot v1.5.1 Client : (2) Webapps polymer v 0.5 - v 2.0 Product: Griffon 2.3.0 Application : JavaFX (UI) Build tool : Gradle v3.5 Database: H2 & Postgresql 9.4 VC Database: Flyway Production Development BO M
  • 47. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff FLYWAY VERSION CONTROL FOR YOUR DATABASE.
  • 48. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff MIGRATE SCHEMA & DATA
  • 49. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff MIGRATE SCHEMA & DATA
  • 50. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff ✓ New Release ✓ Flyway migrating schemas & data
  • 51. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff OPPSSS! ✓ New Release ✓ Flyway migrating schemas & data ✓I made a bubu
  • 52. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff TEST
  • 53. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff TEST LOCALLY
  • 54. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff TEST LOCALLY MIGRATION SCHEMA & DATA
  • 55. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff TEST LOCALLY MIGRATION SCHEMA & DATA SANITY CHECK
  • 56. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DOCKER-COMPOSE
  • 57. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DOCKER-COMPOSE.YML (VERSION 1) version: '3.1' services: db: image: postgres:9.4 restart: always environment: POSTGRES_USER: psql_user POSTGRES_PASSWORD_FILE: /postgres_password POSTGRES_DB: psql_db ports: - "5432:5432" volumes: - /Users/ixchelruiz/.config/postgres_passwd:/postures_password healtcheck: test: ["CMD-SHELL", "pg_isready -U postgres”] web: image: tomcat:8-jre8 ports: 8080 depends_on: - db
  • 58. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff OR WAIT FOR IT!
  • 59. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DOCKER-COMPOSE.YML version: '3.1' services: db: image: postgres:9.4 restart: always environment: POSTGRES_USER: psql_user POSTGRES_PASSWORD_FILE: /postgres_password POSTGRES_DB: psql_db ports: - "5432:5432" volumes: - /Users/ixchelruiz/.config/postgres_passwd:/postures_password web: depends_on: - db command: ["./wait-for-it.sh", "db:5432", "--", “cmd"]
  • 60. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DOCKER-COMPOSE-PLUGIN (GRADLE)
  • 61. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff https://github.com/avast/gradle-docker-compose-plugin
  • 62. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff buildscript { dependencies { classpath "com.avast.gradle:gradle-docker-compose-plugin:$version" } } apply plugin: 'docker-compose' dockerCompose.isRequiredBy(test)
  • 63. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff Success Developers
  • 64. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff INTEGRATION TEST CI : WITH A TWIST!
  • 65. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff CI ✓Port conflict ✓Environment variables
  • 66. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DOCKER-COMPOSE-PLUGIN (GRADLE)
  • 67. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff buildscript { dependencies { classpath "com.avast.gradle:gradle-docker-compose-plugin:$version" } } apply plugin: 'docker-compose' dockerCompose.isRequiredBy(test) test.doFirst { // exposes "${serviceName}_HOST" and "${serviceName}_TCP_${exposedPort}" environment variables dockerCompose.exposeAsEnvironment(test) // exposes "${serviceName}.host" and "${serviceName}.tcp.${exposedPort}" system properties dockerCompose.exposeAsSystemProperties(test) // get information about container of service `web` (declared in docker-compose.yml) def webInfo = dockerCompose.servicesInfos.web.'web_1' // pass host and exposed TCP port 80 as custom-named Java System properties systemProperty 'myweb.host', webInfo.host }
  • 68. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff CI ✓Zombie containers ✓Force compose down ✓Configuration it’s different ✓Development ✓Testing
  • 69. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff
  • 70. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff ✓ Automatic discovery of local docker environment ✓ Pull images or build from Dockerfile ✓ Start/stop container ✓ Wait for it to be ready (log string / listening port / protocol- specific) ✓ Port mapping ✓ Clean up
  • 71. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff ✓ Manage Dockerized external dependencies via a Java object facade ✓ JUnit integration ✓ Starts/stops containers for each class/method ✓ Reliability: ✓ start from clean state ✓ isolated instances ✓ port randomisation ✓ tag-based versioning ✓ Java JUnit support; Spock, Scala and Python wrappers/forks
  • 72. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff DEMO
  • 73. @ i x c h e l r u i z # Vo x x e d D a y s B a n ff THANK YOU QUESTIONS OR FEEDBACK? PLEASE FILL THE SURVEY! PING ME! TALK TO ME!