SlideShare a Scribd company logo
1 of 34
Download to read offline
CI & Docker
An experience building
complex CI environments
Patxi Gortázar
francisco.gortazar@urjc.es
@fgortazar
Bio
Project Coordinator at @elastestio EU project
Devops @ Kurento
Teaching Distributed Systems @ URJC
@fgortazar
https://es.linkedin.com/in/franciscogortazar
Consultancy / Training
Cloud Computing
Distributed Systems
Web Technologies
Extreme Programming
Testing / Git / Jenkins
Software Architectures
Concurrent Programming
Open source elastic platform
for end to end testing
http://codeurjc.es http://elastest.io
Advanced log management
Test orchestration
Test execution comparison
Web and Mobile testing
Security testing
IoT testing
Performance testing
Why
A media server for real time video communication
The software under test
WebRTC
Software under test
Software under test
Software under test
So Kurento is…
• A media server
• APIs for managing connections in a WebRTC
communication
• Tutorials
• Applications
• Testing
– Under many scenarios
– Even more testing in different environments
A soup of technologies
Some numbers
• 30 code repositories
• ~400 Jenkins jobs
• +1,000 tests
• +20 different environments to test
• +80 artifacts to be deployed at release time
Feasible infrastructures
Cloud
• Public or private
• 20 environments = 20 different VMs
• Cost increases with each new environment!!
• Effort increases with each new environment to
configure (ops)!!
• Time-to-market increases also!!
Kurento’s CI Infrastructure
Building Debian packages
• 2 Ubuntu Trusty VMs
• 4 Ubuntu Xenial VMs
• 2 Ubuntu latest VMs
Building clients
• 1 node mvn & jdk 7 &
node 4
• 1 node mvn & jdk 7 &
node 6
• 1 node mvn & jdk 8 &
node 4
• 1 node mvn & jdk 8 &
node 6
Further problems
• Developers are pushing hard towards ops/devops
to include changes in infrastructure
• Changes can hardly be reverted (possible, but…)
• Hard to test locally
– Works in my machine effect
• Wasted resources
• And at the same time, insufficient resources
Can we do better?
Simplifying CI with Docker
How
• Leverage Jenkins Pipeline
– CI configuration hosted within code repositories
– Docker support out-of-the-box
– Jenkins jobs launch containers on top of VMs
– VMs have all the same minimum configuration:
Docker
Current Infrastructure
1 VM Jenkins Master
N VMs Jenkins Workers (running Docker)
2 VM configurations
Where are my environments?
• The different environments are encapsulated as Docker
images
• Docker images can be used in any of the workers
• Docker images can be used in your laptop
• Docker images are versioned, easy to maintain, easy to build
• Any version can be used
• Several environments can be run in parallel in the same VM:
isolation
Which environments do I need?
You need images for your builds
You need images for your applications
You need images for your tests
Images for builds
• Heavy images (> 400Mb)
• One image per tool version: jdk7, jdk8
• Download ahead of time
– As opposed to downloading at build time
– E.g., downloading images in a nightly job
Images for builds
With Docker it’s easier to tame matrix envs
• Consider building a project using…
– Ubuntu
• Trusty
• Xenial
• Zesty
– Java
• JDK 7
• JDK 8
• JDK 9
Images for builds
What if we need to mix…
• JDK
• Maven
• Node
• Npm
• Bower
… in the same environment?
Images for applications
You're ready to ship your application as a
container (optional)
• Choose lightweight containers
– Docker is focusing on lightweight containers
leveraging Alpine Linux
• Include just what your application needs
– Leverage new multi-stage build in Docker
• Think about dependencies (databases, caching...)
Images for testing
• You can run browsers within a container
– https://github.com/SeleniumHQ/docker-selenium
• Available images
– selenium/hub
– selenium/node-chrome
– selenium/node-firefox
– selenium/node-chrome-debug
– selenium/node-firefox-debug
Images for testing
• Unfortunately they're a bit out of date
– See https://github.com/SeleniumHQ/docker-
selenium/issues/229#issuecomment-253334224
• Don't worry
– It's easy to build them with the latest browser
– We can test against latest release, beta and canary
• Alternatives
– TestContainers: https://www.testcontainers.org/
Testing with multiple containers
Orchestration...
• docker compose
– Require to know the number of containers in
advance
• Otherwise, docker run
• Cleaning containers and images with spotify-gc
Testing with multiple containers
Orchestration...
• End-to-end tests
– 1-5 browsers
– Test scenario is run several times with different
configurations
• Chrome (stable, beta, canary)
• Firefox (stable, beta)
• …
Testing with multiple containers
Orchestration...
• Tests can include a Docker client for flexibility:
– Start & stop containers
– Container inspection
– Gathering logs
– Managing Volumes
– Managing environment variables
Testing with multiple containers
Orchestration...
• Network topologies
– Specific network plugins
– Handcrafted networks
• docker run --net=none …  Ugly hack!!
• Better use network plugins
Testing with multiple containers
Challenges
• Gathering data
– Logs from several containers
– Metrics (CPU, memory, network…)
– Files generated (browser recording)
• Integrating data with test execution
– Comparing some data across several executions
– Data integration
Challenges
• Reproducing real-world conditions
– Failing nodes
– Failing networks
– Network bandwidth (4G, 5G, DSL)
– Network topologies (NAT traversal, firewalls, …)
– High loads (bursting CPUs)
Consultancy / Training
Cloud Computing
Distributed Systems
Web Technologies
Extreme Programming
Testing / Git / Jenkins
Software Architectures
Concurrent Programming
Open source elastic platform
for end to end testing
http://codeurjc.es http://elastest.io
Advanced log management
Test orchestration
Test execution comparison
Web and Mobile testing
Security testing
IoT testing
Performance testing
Bio
Coordinator http://elastest.io/
Devops @ Kurento
Teaching Distributed Systems @ URJC
@fgortazar
https://es.linkedin.com/in/franciscogortazar

More Related Content

What's hot

Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Michal Ziarnik
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesAn Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesSteffen Gebert
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker AgileDenver
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Longericlongtx
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovyjgcloudbees
 
Open Source tools overview
Open Source tools overviewOpen Source tools overview
Open Source tools overviewLuciano Resende
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebSteffen Gebert
 
Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Malcolm Groves
 
Ci with jenkins docker and mssql belgium
Ci with jenkins docker and mssql belgiumCi with jenkins docker and mssql belgium
Ci with jenkins docker and mssql belgiumChris Adkin
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsFrancesco Bruni
 
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeVoxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeDamien Duportal
 
State of the Jenkins Automation
State of the Jenkins AutomationState of the Jenkins Automation
State of the Jenkins AutomationJulien Pivotto
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins UsersJules Pierre-Louis
 
Automate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsAutomate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsDaniel Oh
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins UsersJules Pierre-Louis
 
Locally it worked! virtualizing docker
Locally it worked! virtualizing dockerLocally it worked! virtualizing docker
Locally it worked! virtualizing dockerSascha Brinkmann
 
Joomla Continuous Delivery with Docker
Joomla Continuous Delivery with DockerJoomla Continuous Delivery with Docker
Joomla Continuous Delivery with DockerJirayut Nimsaeng
 
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgartOpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgartTobias Schneck
 

What's hot (20)

Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesAn Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovy
 
Open Source tools overview
Open Source tools overviewOpen Source tools overview
Open Source tools overview
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
 
Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101
 
Ci with jenkins docker and mssql belgium
Ci with jenkins docker and mssql belgiumCi with jenkins docker and mssql belgium
Ci with jenkins docker and mssql belgium
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
 
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeVoxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
 
State of the Jenkins Automation
State of the Jenkins AutomationState of the Jenkins Automation
State of the Jenkins Automation
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
Automate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOpsAutomate App Container Delivery with CI/CD and DevOps
Automate App Container Delivery with CI/CD and DevOps
 
Docker 2014
Docker 2014Docker 2014
Docker 2014
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
Locally it worked! virtualizing docker
Locally it worked! virtualizing dockerLocally it worked! virtualizing docker
Locally it worked! virtualizing docker
 
Joomla Continuous Delivery with Docker
Joomla Continuous Delivery with DockerJoomla Continuous Delivery with Docker
Joomla Continuous Delivery with Docker
 
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgartOpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
 

Similar to Docker & ci

DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CDHenry Huang
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsElasTest Project
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochranedotCloud
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deploymentjavaonfly
 
Intro docker and demo monitor on docker
Intro docker and demo monitor on dockerIntro docker and demo monitor on docker
Intro docker and demo monitor on dockerWatcharin Yang-Ngam
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsRamit Surana
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013dotCloud
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationGiacomo Vacca
 
Lightweight Virtualization Docker in Practice
Lightweight Virtualization Docker in PracticeLightweight Virtualization Docker in Practice
Lightweight Virtualization Docker in PracticeDocker, Inc.
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerDavid Currie
 
CI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and TutumCI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and TutumSreenivas Makam
 
DockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaDockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaRoman Dembitsky
 

Similar to Docker & ci (20)

DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CD
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Django and Docker
Django and DockerDjango and Docker
Django and Docker
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
Intro docker and demo monitor on docker
Intro docker and demo monitor on dockerIntro docker and demo monitor on docker
Intro docker and demo monitor on docker
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Lightweight Virtualization Docker in Practice
Lightweight Virtualization Docker in PracticeLightweight Virtualization Docker in Practice
Lightweight Virtualization Docker in Practice
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in Testing
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
 
CI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and TutumCI, CD with Docker, Jenkins and Tutum
CI, CD with Docker, Jenkins and Tutum
 
DockerCon EU 2015 Barcelona
DockerCon EU 2015 BarcelonaDockerCon EU 2015 Barcelona
DockerCon EU 2015 Barcelona
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 

More from Patxi Gortázar

Desarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y AzureDesarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y AzurePatxi Gortázar
 
La computación en la nube en el aula
La computación en la nube en el aulaLa computación en la nube en el aula
La computación en la nube en el aulaPatxi Gortázar
 
Path relinking for high dimensional continuous optimization
Path relinking for high dimensional continuous optimizationPath relinking for high dimensional continuous optimization
Path relinking for high dimensional continuous optimizationPatxi Gortázar
 
Grammarware engineering: un enfoque dirigido por modelos
Grammarware engineering: un enfoque dirigido por modelosGrammarware engineering: un enfoque dirigido por modelos
Grammarware engineering: un enfoque dirigido por modelosPatxi Gortázar
 
Git: un enfoque práctico
Git: un enfoque prácticoGit: un enfoque práctico
Git: un enfoque prácticoPatxi Gortázar
 

More from Patxi Gortázar (7)

Jenkins pipeline
Jenkins pipelineJenkins pipeline
Jenkins pipeline
 
Migrando CI a Docker
Migrando CI a DockerMigrando CI a Docker
Migrando CI a Docker
 
Desarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y AzureDesarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y Azure
 
La computación en la nube en el aula
La computación en la nube en el aulaLa computación en la nube en el aula
La computación en la nube en el aula
 
Path relinking for high dimensional continuous optimization
Path relinking for high dimensional continuous optimizationPath relinking for high dimensional continuous optimization
Path relinking for high dimensional continuous optimization
 
Grammarware engineering: un enfoque dirigido por modelos
Grammarware engineering: un enfoque dirigido por modelosGrammarware engineering: un enfoque dirigido por modelos
Grammarware engineering: un enfoque dirigido por modelos
 
Git: un enfoque práctico
Git: un enfoque prácticoGit: un enfoque práctico
Git: un enfoque práctico
 

Recently uploaded

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Docker & ci

  • 1.
  • 2. CI & Docker An experience building complex CI environments Patxi Gortázar francisco.gortazar@urjc.es @fgortazar
  • 3. Bio Project Coordinator at @elastestio EU project Devops @ Kurento Teaching Distributed Systems @ URJC @fgortazar https://es.linkedin.com/in/franciscogortazar
  • 4. Consultancy / Training Cloud Computing Distributed Systems Web Technologies Extreme Programming Testing / Git / Jenkins Software Architectures Concurrent Programming Open source elastic platform for end to end testing http://codeurjc.es http://elastest.io Advanced log management Test orchestration Test execution comparison Web and Mobile testing Security testing IoT testing Performance testing
  • 5. Why A media server for real time video communication The software under test
  • 9. Software under test So Kurento is… • A media server • APIs for managing connections in a WebRTC communication • Tutorials • Applications • Testing – Under many scenarios – Even more testing in different environments
  • 10. A soup of technologies
  • 11. Some numbers • 30 code repositories • ~400 Jenkins jobs • +1,000 tests • +20 different environments to test • +80 artifacts to be deployed at release time
  • 12. Feasible infrastructures Cloud • Public or private • 20 environments = 20 different VMs • Cost increases with each new environment!! • Effort increases with each new environment to configure (ops)!! • Time-to-market increases also!!
  • 13. Kurento’s CI Infrastructure Building Debian packages • 2 Ubuntu Trusty VMs • 4 Ubuntu Xenial VMs • 2 Ubuntu latest VMs Building clients • 1 node mvn & jdk 7 & node 4 • 1 node mvn & jdk 7 & node 6 • 1 node mvn & jdk 8 & node 4 • 1 node mvn & jdk 8 & node 6
  • 14. Further problems • Developers are pushing hard towards ops/devops to include changes in infrastructure • Changes can hardly be reverted (possible, but…) • Hard to test locally – Works in my machine effect • Wasted resources • And at the same time, insufficient resources Can we do better?
  • 16. How • Leverage Jenkins Pipeline – CI configuration hosted within code repositories – Docker support out-of-the-box – Jenkins jobs launch containers on top of VMs – VMs have all the same minimum configuration: Docker
  • 17. Current Infrastructure 1 VM Jenkins Master N VMs Jenkins Workers (running Docker) 2 VM configurations
  • 18. Where are my environments? • The different environments are encapsulated as Docker images • Docker images can be used in any of the workers • Docker images can be used in your laptop • Docker images are versioned, easy to maintain, easy to build • Any version can be used • Several environments can be run in parallel in the same VM: isolation
  • 19. Which environments do I need? You need images for your builds You need images for your applications You need images for your tests
  • 20. Images for builds • Heavy images (> 400Mb) • One image per tool version: jdk7, jdk8 • Download ahead of time – As opposed to downloading at build time – E.g., downloading images in a nightly job
  • 21. Images for builds With Docker it’s easier to tame matrix envs • Consider building a project using… – Ubuntu • Trusty • Xenial • Zesty – Java • JDK 7 • JDK 8 • JDK 9
  • 22. Images for builds What if we need to mix… • JDK • Maven • Node • Npm • Bower … in the same environment?
  • 23. Images for applications You're ready to ship your application as a container (optional) • Choose lightweight containers – Docker is focusing on lightweight containers leveraging Alpine Linux • Include just what your application needs – Leverage new multi-stage build in Docker • Think about dependencies (databases, caching...)
  • 24. Images for testing • You can run browsers within a container – https://github.com/SeleniumHQ/docker-selenium • Available images – selenium/hub – selenium/node-chrome – selenium/node-firefox – selenium/node-chrome-debug – selenium/node-firefox-debug
  • 25. Images for testing • Unfortunately they're a bit out of date – See https://github.com/SeleniumHQ/docker- selenium/issues/229#issuecomment-253334224 • Don't worry – It's easy to build them with the latest browser – We can test against latest release, beta and canary • Alternatives – TestContainers: https://www.testcontainers.org/
  • 26. Testing with multiple containers Orchestration... • docker compose – Require to know the number of containers in advance • Otherwise, docker run • Cleaning containers and images with spotify-gc
  • 27. Testing with multiple containers Orchestration... • End-to-end tests – 1-5 browsers – Test scenario is run several times with different configurations • Chrome (stable, beta, canary) • Firefox (stable, beta) • …
  • 28. Testing with multiple containers Orchestration... • Tests can include a Docker client for flexibility: – Start & stop containers – Container inspection – Gathering logs – Managing Volumes – Managing environment variables
  • 29. Testing with multiple containers Orchestration... • Network topologies – Specific network plugins – Handcrafted networks • docker run --net=none …  Ugly hack!! • Better use network plugins
  • 30. Testing with multiple containers
  • 31. Challenges • Gathering data – Logs from several containers – Metrics (CPU, memory, network…) – Files generated (browser recording) • Integrating data with test execution – Comparing some data across several executions – Data integration
  • 32. Challenges • Reproducing real-world conditions – Failing nodes – Failing networks – Network bandwidth (4G, 5G, DSL) – Network topologies (NAT traversal, firewalls, …) – High loads (bursting CPUs)
  • 33. Consultancy / Training Cloud Computing Distributed Systems Web Technologies Extreme Programming Testing / Git / Jenkins Software Architectures Concurrent Programming Open source elastic platform for end to end testing http://codeurjc.es http://elastest.io Advanced log management Test orchestration Test execution comparison Web and Mobile testing Security testing IoT testing Performance testing
  • 34. Bio Coordinator http://elastest.io/ Devops @ Kurento Teaching Distributed Systems @ URJC @fgortazar https://es.linkedin.com/in/franciscogortazar