SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
SPAIN
ATCINFINITE
POSSIBILITIES
MULTILANGUAGE
PIPELINES WITH
JENKINS, DOCKER
AND KUBERNETES
Jorge Hidalgo @_deors @deors
Toni de la Prieta @tldpa @antonio-de-la-prieta-antoli
COMMIT CONF NOVEMBER 2018
WHO WE ARE
Toni de la Prieta @tldpa
@antonio-de-la-prieta-antoli
Director
Accenture Technology Spain
Spain Custom Software Engineering Lead
Jorge Hidalgo @_deors
@deors
Senior Technology Architect
Accenture Technology Spain
Spain ATC Custom & Architecture Lead
Honorable mentions:
Vicente González, Julio Palma and the whole
Architecture & DevOps Squad at Spain ATC
TL;DR
All code and pipeline examples can be found online
in these repositories:
https://github.com/deors/deors-demos-petclinic
https://github.com/deors/deors-demos-python-pipeline
Don’t hesitate to ask, log issues or send your pull
requests – HACKERS WELCOMED!
AT THE BEGINNING...
...ONLY PAIN AND BREAKING BUILDS
ARE THESE FAMILIAR TO YOU?
Code change paralysis
Production environments
hard to observe
Lack of automation Inadequate code analysis
Obsolete processes (waste)
Brittle, tightly coupled
applications
Limited test environments Stop-the-world deployments
50 DEPLOYMENTS PER DAY IS POSSIBLE
Netflix proactively identify
and resolve issues before
they impact customers
Amazon deploys new
features to production
every 11 seconds
Uber deploys more
than 500 times per
day
WHAT ‘AWESOME’ LOOKS LIKE
(THE VALUE PROPOSITION OF MODERN ENGINEERING)
Provision environments dynamically
Spawn a new environment in under 5 minutes
Have “eagle eyes” to observe everything
Precise, real-time metrics on KPIs of interest
No manual effort in repetitive tasks
All common tasks are automated
Eliminate regression and security defects
Achieving 0 regression defects is feasible
Deliver at the pace of business
From weeks to hours or minutes
Build resilient, self-healing apps
No downtime, no unexpected errors
MODERN ENGINEERING
IS A KEY ENABLER FOR
BUSINESS AGILITY
COST OF
INEFFICIENCY
COST OF
DELAY
“In the new world, it is not the big fish
which eats the small fish, it's the fast
fish which eats the slow fish.”
-- Klaus Schwab
AGILE
DEVOPS
CLOUD-NATIVE
ARCHITECTURE
VALUE PRIORITISED
DELIVER–REFLECT–IMPROVE
DECOUPLED & DISTRIBUTED
RESILIENT BY DESIGN
AUTOMATED PIPELINES
CROSS-FUNCTIONAL TEAMS
PRODUCT AND CUSTOMER CENTRIC
BUILT-IN QUALITY
DECENTRALISED EXECUTION
ELASTIC SUPPLY OF RESOURCES
M
O
D
E
R
N
E
N
G
I
N
E
E
R
I
N
G
AGILE & DEVOPS – BRIEF DEFINITIONS
Agile & DevOps are sets of principles for iterative development, promoting lean processes,
communication and collaboration, adaptation to changes, and continuous improvement, to
speed up the TIME TO MARKET and the CONTINUOUS DELIVERY of business value
Agile & DevOps both focus on nurturing SELF-ORGANISING, CROSS-FUNCTIONAL
teams, with all the skills and capabilities needed to achieve the PRODUCT VISION
IDEATION VALUE
Adapted image from Wikimedia – https://commons.wikimedia.org/wiki/File:Devops-toolchain.svg
Agile focuses on the interactions between the
CUSTOMER (business) and DEVELOPMENT
DevOps focuses on the interactions between
DEVELOPMENT and OPERATIONS
AGILE & DEVOPS DRIVE
A NEW WAY OF
WORKING TOGETHER
AS TEAMS
BY DOING…
OWNERSHIP & COMMITMENT
BREAKING DOWN SILOS
COLLABORATING
LEARNING TOGETHER
LOOKING FOR SOLUTIONS
SHARING RESPONSIBILITIES
CRAFTMANSHIP
CREATIVE THINKING
PROBLEM SOLVING
PRODUCT VISION
CUSTOMER EXPERIENCE
DESIGN & BUILD
CONTINUOUS INTEGRATION
CONTINUOUS TESTING
CONTINUOUS DEPLOYMENT
CONTINUOUS MONITORING
HUMAN + MACHINE
IMPROVING
ONE BY ONE
BUT ALSO…
IMPROVING
EVERYONE
CAN WE REALLY
MANUFACTURE
‘UNICORNS’?
https://en.wikipedia.org/wiki/Unicorn_(finance)
https://www.linkedin.com/pulse/5-signs-youre-unicorn-employee-ryan-holmes/
STANDARDIZATION
FAST
PREDICTABLE
FAMILIAR
THE THREE AMIGOS
PIPELINES
AS
CODE
THE THREE AMIGOS
UNIVERSAL
APPLICATION
PACKAGING
THE THREE AMIGOS
UNIVERSAL
RUNTIME
PLATFORM
THE THREE AMIGOS
K8S – HAVE IT YOUR WAY
SKETCH THE
EXEMPLAR
PIPELINE IN
ARCHETYPES
AND TEMPLATES
EVERYTHING
TOGETHER
AND IN
VERSION
CONTROL
JENKINS
LIBRARIES
TO REUSE
COMMON
TASKS
FREEDOM TO
OVERRIDE
WHATEVER
IS NEEDED
AND LET THE
PLATFORM
CARE OF
ANYTHING ELSE
INCLUDING
MANAGEMENT
OF BUILDER
NODES
(NO NEED TO CARE
ABOUT SLAVES/SWARMS
ANYMORE)
STANDARDIZATION
TAKES FORM
OF AN AGREED
PIPELINE SCHEMA
“Behavior-over-tool”
WHAT’S IN A CI PIPELINE
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
“THE BRIEF HISTORY OF A COMMIT”
• Prepare environment for pipeline execution
• Builder image with basic stuff: JDK, Maven, npm, Node.js,
Python…
• Install all needed dependencies
• Python: pip install
• Node.js: npm install
• Java: Maven, either explicit or along the pipeline
ENVIRONMENT PREPARATION
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• Transform source code to binaries
• In some cases compilation is replaced by other activities like
uglyfication, minification, transpilation…
• For interpreted languages, when viable, check for syntax
errors
COMPILE
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• Run project unit tests
• And never forget: gather code coverage metrics
• Coverage will highlight which code is not being exercized
• “EXERCIZED” does not imply “TESTED”
UNIT TESTS
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• In a nutshell: validates whether your tests are actually testing
anything
• Mutation tests will uncover:
• Untested use cases
• Test cases without assertions
• Also, test cases with insufficient or wrong assertions
MUTATION TESTS
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• Package all application resources:
• Binaries
• Static resources
• Application configuration which does not depend on the environment, e.g.
literals, error codes…
• Environment specific configuration must be externalized (package once run
everywhere)
PACKAGE
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• Put together all pieces which constitute our application
• Base image
• Build artifacts
• Dependencies
• Base images have their own pipeline
• Typically maintained by someone else (vendor, community, other team…)
BUILD DOCKER IMAGE
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• The purpose of this step is to ensure that our application runs
and to make it available for tests
• If application depends on other applications (database,
message queue, other services…) they will be executed all
together (docker compose, application.yml…)
• The test environment is not lasting — will be available only to
tests during the life of the pipelines
• Should allow for concurrent execution (fast feedback on a
continuous integration build-per-commit approach)
RUN DOCKER IMAGE
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• Run tests requiring the application running and its
dependencies
• Integration tests may include: UI tests, API tests…
• Should be user-oriented whenever possible
• Test data preparation is performed at this step too
• For web applications use vulnerability scan agent/proxy
• And remember: gather code coverage metrics
INTEGRATION TESTS
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• Exercise the application under load
• Response times are important but will also uncover errors due
to concurrency usage
• Quality gate should be asserting both metrics
• Should be user-oriented too — reuse integration tests
whenever possible
• Use of dynamic performance monitor agents is also advised
PERFORMANCE TESTS
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• Assessing application security is not negotiable
• But usually we forget that most vulnerabilities, if not all, come
from external dependencies
• Some tools for this step include:
• OWASP Dependency Check
• Snyk
• Black Duck
• Nexus Lifecycle
• PyUp Safety
DEPENDENCY VULNERABILITY TESTS
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• Static code analysis:
• Adherence to coding standards
• Possible bugs
• Code smells and best practices
• Security vulnerabilities
• Documentation and complexity metrics
• Code duplication
• This step usually happens at the same time that the overall quality
gate (SonarQube)
• Ideally this should happen earlier in the pipeline — however we
assume that this is happening before code is pushed and/or
merged
CODE INSPECTION
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
• After the final quality gate, if all pass, the image is pushed to a
shared registry
• Once pushed it is available to be used by:
• Other applications that depends on this image
• To be promoted to a stage environment
• All the way up to production
PUSH DOCKER IMAGE
ENVIRONMENT
PREPARATION
COMPILE UNIT TESTS MUTATION
TESTS
PACKAGE BUILD DOCKER
IMAGE
RUN DOCKER
IMAGE
INTEGRATION
TESTS
PERFORMANCE
TESTS
DEPENDENCY
VULNERABILITY
TESTS
CODE
INSPECTION
PUSH DOCKER
IMAGE
GOT ANY
QUESTIONS?
LET’S TALK!

Weitere ähnliche Inhalte

Was ist angesagt?

DevOps Workshop, DevOps for DoD Professionals
DevOps Workshop, DevOps for DoD ProfessionalsDevOps Workshop, DevOps for DoD Professionals
DevOps Workshop, DevOps for DoD Professionals
Tonex
 
DevOps_Automation White Paper
DevOps_Automation White PaperDevOps_Automation White Paper
DevOps_Automation White Paper
Toby Thorslund
 

Was ist angesagt? (20)

TMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael PalotasTMF2014 CI-CD Workshop Michael Palotas
TMF2014 CI-CD Workshop Michael Palotas
 
An introduction to DevOps
An introduction to DevOpsAn introduction to DevOps
An introduction to DevOps
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
 
A day in the life with devops automation
A day in the life with devops automationA day in the life with devops automation
A day in the life with devops automation
 
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
 
Using DevOps to Improve Software Quality in the Cloud
Using DevOps to Improve Software Quality in the CloudUsing DevOps to Improve Software Quality in the Cloud
Using DevOps to Improve Software Quality in the Cloud
 
Top DevOps tools
Top DevOps toolsTop DevOps tools
Top DevOps tools
 
DevOps Workshop, DevOps for DoD Professionals
DevOps Workshop, DevOps for DoD ProfessionalsDevOps Workshop, DevOps for DoD Professionals
DevOps Workshop, DevOps for DoD Professionals
 
"DevOps > CI+CD "
"DevOps > CI+CD ""DevOps > CI+CD "
"DevOps > CI+CD "
 
DevOps_Automation White Paper
DevOps_Automation White PaperDevOps_Automation White Paper
DevOps_Automation White Paper
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps Journey
 
Dev ops Training Course
Dev ops Training CourseDev ops Training Course
Dev ops Training Course
 
Let your tests drive your code
Let your tests drive your codeLet your tests drive your code
Let your tests drive your code
 
CA - Entrega Continua
CA - Entrega ContinuaCA - Entrega Continua
CA - Entrega Continua
 
Breaking the 2 Pizza Paradox with your Platform as an Application
Breaking the 2 Pizza Paradox with your Platform as an ApplicationBreaking the 2 Pizza Paradox with your Platform as an Application
Breaking the 2 Pizza Paradox with your Platform as an Application
 
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | EdurekaDevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
 
Devops certification training course
Devops certification training courseDevops certification training course
Devops certification training course
 
iOS CI/CD: Continuous Integration and Continuous Delivery Explained
iOS CI/CD: Continuous Integration and Continuous Delivery ExplainediOS CI/CD: Continuous Integration and Continuous Delivery Explained
iOS CI/CD: Continuous Integration and Continuous Delivery Explained
 

Ähnlich wie Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)

From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
Dynatrace
 

Ähnlich wie Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018) (20)

Enterprise Node - Code Quality
Enterprise Node - Code QualityEnterprise Node - Code Quality
Enterprise Node - Code Quality
 
Cloud load testing with Visual Studio Team Services
Cloud load testing with Visual Studio Team ServicesCloud load testing with Visual Studio Team Services
Cloud load testing with Visual Studio Team Services
 
Containers and the Docker EE Difference and usecases
Containers and the Docker EE Difference and usecasesContainers and the Docker EE Difference and usecases
Containers and the Docker EE Difference and usecases
 
Full stack development best practice and toolset
Full stack development best practice and toolsetFull stack development best practice and toolset
Full stack development best practice and toolset
 
Transformacion e innovacion digital Meetup - Application Modernization and Mi...
Transformacion e innovacion digital Meetup - Application Modernization and Mi...Transformacion e innovacion digital Meetup - Application Modernization and Mi...
Transformacion e innovacion digital Meetup - Application Modernization and Mi...
 
Gopikrishanan
GopikrishananGopikrishanan
Gopikrishanan
 
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0
 
Practical DevOps & Continuous Delivery – A Webinar to learn in depth on DevO...
Practical DevOps & Continuous Delivery –  A Webinar to learn in depth on DevO...Practical DevOps & Continuous Delivery –  A Webinar to learn in depth on DevO...
Practical DevOps & Continuous Delivery – A Webinar to learn in depth on DevO...
 
Docker for the Enterprise with Containers as a Service by Banjot Chanana
Docker for the Enterprise with Containers as a Service by Banjot ChananaDocker for the Enterprise with Containers as a Service by Banjot Chanana
Docker for the Enterprise with Containers as a Service by Banjot Chanana
 
DevOps for Network Engineers
DevOps for Network EngineersDevOps for Network Engineers
DevOps for Network Engineers
 
Microdeployments for microservices dev ops nashville
Microdeployments for microservices   dev ops nashvilleMicrodeployments for microservices   dev ops nashville
Microdeployments for microservices dev ops nashville
 
DevOps For Everyone: Bringing DevOps Success to Every App and Every Role in y...
DevOps For Everyone: Bringing DevOps Success to Every App and Every Role in y...DevOps For Everyone: Bringing DevOps Success to Every App and Every Role in y...
DevOps For Everyone: Bringing DevOps Success to Every App and Every Role in y...
 
Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...
 
Kubernetes Certification Training Course
Kubernetes Certification Training CourseKubernetes Certification Training Course
Kubernetes Certification Training Course
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
 
Real-World Application How DevOps Certifications Translate into Practical Ski...
Real-World Application How DevOps Certifications Translate into Practical Ski...Real-World Application How DevOps Certifications Translate into Practical Ski...
Real-World Application How DevOps Certifications Translate into Practical Ski...
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
DevOps Transformation: Learnings and Best Practices
DevOps Transformation: Learnings and Best PracticesDevOps Transformation: Learnings and Best Practices
DevOps Transformation: Learnings and Best Practices
 
Harman deepak v - agile on steriod - dev ops led transformation
Harman  deepak v - agile on steriod - dev ops led transformationHarman  deepak v - agile on steriod - dev ops led transformation
Harman deepak v - agile on steriod - dev ops led transformation
 
Red Hat Container Strategy
Red Hat Container StrategyRed Hat Container Strategy
Red Hat Container Strategy
 

Mehr von Jorge Hidalgo

Mehr von Jorge Hidalgo (20)

GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18
 
Architecture 2020 - eComputing 2019-07-01
Architecture 2020 - eComputing 2019-07-01Architecture 2020 - eComputing 2019-07-01
Architecture 2020 - eComputing 2019-07-01
 
GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28
 
GraalVM - MálagaJUG 2018-11-29
GraalVM - MálagaJUG 2018-11-29GraalVM - MálagaJUG 2018-11-29
GraalVM - MálagaJUG 2018-11-29
 
DevOps Te Cambia la Vida - eComputing 2018-07-03
DevOps Te Cambia la Vida - eComputing 2018-07-03DevOps Te Cambia la Vida - eComputing 2018-07-03
DevOps Te Cambia la Vida - eComputing 2018-07-03
 
JavaOne 2017 CON3282 - Code Generation with Annotation Processors: State of t...
JavaOne 2017 CON3282 - Code Generation with Annotation Processors: State of t...JavaOne 2017 CON3282 - Code Generation with Annotation Processors: State of t...
JavaOne 2017 CON3282 - Code Generation with Annotation Processors: State of t...
 
JavaOne 2017 CON3276 - Selenium Testing Patterns Reloaded
JavaOne 2017 CON3276 - Selenium Testing Patterns ReloadedJavaOne 2017 CON3276 - Selenium Testing Patterns Reloaded
JavaOne 2017 CON3276 - Selenium Testing Patterns Reloaded
 
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power Tools
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power ToolsJavaOne 2017 CON2902 - Java Code Inspection and Testing Power Tools
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power Tools
 
All Your Faces Belong to Us - Opensouthcode 2017-05-06
All Your Faces Belong to Us - Opensouthcode 2017-05-06All Your Faces Belong to Us - Opensouthcode 2017-05-06
All Your Faces Belong to Us - Opensouthcode 2017-05-06
 
Por qué DevOps, por qué ahora @ CHAPI 2017
Por qué DevOps, por qué ahora @ CHAPI 2017Por qué DevOps, por qué ahora @ CHAPI 2017
Por qué DevOps, por qué ahora @ CHAPI 2017
 
Accenture Liquid Architectures (for Master EMSE UPM-FI - April 2017)
Accenture Liquid Architectures (for Master EMSE UPM-FI - April 2017)Accenture Liquid Architectures (for Master EMSE UPM-FI - April 2017)
Accenture Liquid Architectures (for Master EMSE UPM-FI - April 2017)
 
La JVM y el Internet de las Cosas @ MálagaJUG 2016-11-17
La JVM y el Internet de las Cosas @ MálagaJUG 2016-11-17La JVM y el Internet de las Cosas @ MálagaJUG 2016-11-17
La JVM y el Internet de las Cosas @ MálagaJUG 2016-11-17
 
OpenSlava 2016 - Lightweight Java Architectures
OpenSlava 2016 - Lightweight Java ArchitecturesOpenSlava 2016 - Lightweight Java Architectures
OpenSlava 2016 - Lightweight Java Architectures
 
JavaOne 2016 - CON3080 - Testing Java Web Applications with Selenium: A Cookbook
JavaOne 2016 - CON3080 - Testing Java Web Applications with Selenium: A CookbookJavaOne 2016 - CON3080 - Testing Java Web Applications with Selenium: A Cookbook
JavaOne 2016 - CON3080 - Testing Java Web Applications with Selenium: A Cookbook
 
OpenSouthCode 2016 - Accenture DevOps Platform 2016-05-07
OpenSouthCode 2016  - Accenture DevOps Platform 2016-05-07OpenSouthCode 2016  - Accenture DevOps Platform 2016-05-07
OpenSouthCode 2016 - Accenture DevOps Platform 2016-05-07
 
JavaOne 2015 - CON6489 - Smart Open Spaces Powered by Low Cost Computers
JavaOne 2015 - CON6489 - Smart Open Spaces Powered by Low Cost ComputersJavaOne 2015 - CON6489 - Smart Open Spaces Powered by Low Cost Computers
JavaOne 2015 - CON6489 - Smart Open Spaces Powered by Low Cost Computers
 
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
 
Next-gen IDE v2 - OpenSlava 2013-10-11
Next-gen IDE v2 - OpenSlava 2013-10-11Next-gen IDE v2 - OpenSlava 2013-10-11
Next-gen IDE v2 - OpenSlava 2013-10-11
 
The Usual Suspects - Red Hat Developer Day 2012-11-01
The Usual Suspects - Red Hat Developer Day 2012-11-01The Usual Suspects - Red Hat Developer Day 2012-11-01
The Usual Suspects - Red Hat Developer Day 2012-11-01
 

Kürzlich hochgeladen

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 

Kürzlich hochgeladen (20)

%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 

Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)

  • 1. SPAIN ATCINFINITE POSSIBILITIES MULTILANGUAGE PIPELINES WITH JENKINS, DOCKER AND KUBERNETES Jorge Hidalgo @_deors @deors Toni de la Prieta @tldpa @antonio-de-la-prieta-antoli COMMIT CONF NOVEMBER 2018
  • 2. WHO WE ARE Toni de la Prieta @tldpa @antonio-de-la-prieta-antoli Director Accenture Technology Spain Spain Custom Software Engineering Lead Jorge Hidalgo @_deors @deors Senior Technology Architect Accenture Technology Spain Spain ATC Custom & Architecture Lead Honorable mentions: Vicente González, Julio Palma and the whole Architecture & DevOps Squad at Spain ATC
  • 3. TL;DR All code and pipeline examples can be found online in these repositories: https://github.com/deors/deors-demos-petclinic https://github.com/deors/deors-demos-python-pipeline Don’t hesitate to ask, log issues or send your pull requests – HACKERS WELCOMED!
  • 4. AT THE BEGINNING... ...ONLY PAIN AND BREAKING BUILDS
  • 5. ARE THESE FAMILIAR TO YOU? Code change paralysis Production environments hard to observe Lack of automation Inadequate code analysis Obsolete processes (waste) Brittle, tightly coupled applications Limited test environments Stop-the-world deployments
  • 6. 50 DEPLOYMENTS PER DAY IS POSSIBLE Netflix proactively identify and resolve issues before they impact customers Amazon deploys new features to production every 11 seconds Uber deploys more than 500 times per day
  • 7. WHAT ‘AWESOME’ LOOKS LIKE (THE VALUE PROPOSITION OF MODERN ENGINEERING) Provision environments dynamically Spawn a new environment in under 5 minutes Have “eagle eyes” to observe everything Precise, real-time metrics on KPIs of interest No manual effort in repetitive tasks All common tasks are automated Eliminate regression and security defects Achieving 0 regression defects is feasible Deliver at the pace of business From weeks to hours or minutes Build resilient, self-healing apps No downtime, no unexpected errors
  • 8. MODERN ENGINEERING IS A KEY ENABLER FOR BUSINESS AGILITY COST OF INEFFICIENCY COST OF DELAY “In the new world, it is not the big fish which eats the small fish, it's the fast fish which eats the slow fish.” -- Klaus Schwab
  • 9. AGILE DEVOPS CLOUD-NATIVE ARCHITECTURE VALUE PRIORITISED DELIVER–REFLECT–IMPROVE DECOUPLED & DISTRIBUTED RESILIENT BY DESIGN AUTOMATED PIPELINES CROSS-FUNCTIONAL TEAMS PRODUCT AND CUSTOMER CENTRIC BUILT-IN QUALITY DECENTRALISED EXECUTION ELASTIC SUPPLY OF RESOURCES M O D E R N E N G I N E E R I N G
  • 10. AGILE & DEVOPS – BRIEF DEFINITIONS Agile & DevOps are sets of principles for iterative development, promoting lean processes, communication and collaboration, adaptation to changes, and continuous improvement, to speed up the TIME TO MARKET and the CONTINUOUS DELIVERY of business value Agile & DevOps both focus on nurturing SELF-ORGANISING, CROSS-FUNCTIONAL teams, with all the skills and capabilities needed to achieve the PRODUCT VISION IDEATION VALUE Adapted image from Wikimedia – https://commons.wikimedia.org/wiki/File:Devops-toolchain.svg Agile focuses on the interactions between the CUSTOMER (business) and DEVELOPMENT DevOps focuses on the interactions between DEVELOPMENT and OPERATIONS
  • 11. AGILE & DEVOPS DRIVE A NEW WAY OF WORKING TOGETHER AS TEAMS
  • 12. BY DOING… OWNERSHIP & COMMITMENT BREAKING DOWN SILOS COLLABORATING LEARNING TOGETHER LOOKING FOR SOLUTIONS SHARING RESPONSIBILITIES CRAFTMANSHIP
  • 13. CREATIVE THINKING PROBLEM SOLVING PRODUCT VISION CUSTOMER EXPERIENCE DESIGN & BUILD CONTINUOUS INTEGRATION CONTINUOUS TESTING CONTINUOUS DEPLOYMENT CONTINUOUS MONITORING HUMAN + MACHINE
  • 22. K8S – HAVE IT YOUR WAY
  • 27. AND LET THE PLATFORM CARE OF ANYTHING ELSE
  • 28. INCLUDING MANAGEMENT OF BUILDER NODES (NO NEED TO CARE ABOUT SLAVES/SWARMS ANYMORE)
  • 29. STANDARDIZATION TAKES FORM OF AN AGREED PIPELINE SCHEMA “Behavior-over-tool”
  • 30. WHAT’S IN A CI PIPELINE ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE “THE BRIEF HISTORY OF A COMMIT”
  • 31. • Prepare environment for pipeline execution • Builder image with basic stuff: JDK, Maven, npm, Node.js, Python… • Install all needed dependencies • Python: pip install • Node.js: npm install • Java: Maven, either explicit or along the pipeline ENVIRONMENT PREPARATION ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 32. • Transform source code to binaries • In some cases compilation is replaced by other activities like uglyfication, minification, transpilation… • For interpreted languages, when viable, check for syntax errors COMPILE ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 33. • Run project unit tests • And never forget: gather code coverage metrics • Coverage will highlight which code is not being exercized • “EXERCIZED” does not imply “TESTED” UNIT TESTS ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 34. • In a nutshell: validates whether your tests are actually testing anything • Mutation tests will uncover: • Untested use cases • Test cases without assertions • Also, test cases with insufficient or wrong assertions MUTATION TESTS ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 35. • Package all application resources: • Binaries • Static resources • Application configuration which does not depend on the environment, e.g. literals, error codes… • Environment specific configuration must be externalized (package once run everywhere) PACKAGE ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 36. • Put together all pieces which constitute our application • Base image • Build artifacts • Dependencies • Base images have their own pipeline • Typically maintained by someone else (vendor, community, other team…) BUILD DOCKER IMAGE ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 37. • The purpose of this step is to ensure that our application runs and to make it available for tests • If application depends on other applications (database, message queue, other services…) they will be executed all together (docker compose, application.yml…) • The test environment is not lasting — will be available only to tests during the life of the pipelines • Should allow for concurrent execution (fast feedback on a continuous integration build-per-commit approach) RUN DOCKER IMAGE ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 38. • Run tests requiring the application running and its dependencies • Integration tests may include: UI tests, API tests… • Should be user-oriented whenever possible • Test data preparation is performed at this step too • For web applications use vulnerability scan agent/proxy • And remember: gather code coverage metrics INTEGRATION TESTS ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 39. • Exercise the application under load • Response times are important but will also uncover errors due to concurrency usage • Quality gate should be asserting both metrics • Should be user-oriented too — reuse integration tests whenever possible • Use of dynamic performance monitor agents is also advised PERFORMANCE TESTS ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 40. • Assessing application security is not negotiable • But usually we forget that most vulnerabilities, if not all, come from external dependencies • Some tools for this step include: • OWASP Dependency Check • Snyk • Black Duck • Nexus Lifecycle • PyUp Safety DEPENDENCY VULNERABILITY TESTS ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 41. • Static code analysis: • Adherence to coding standards • Possible bugs • Code smells and best practices • Security vulnerabilities • Documentation and complexity metrics • Code duplication • This step usually happens at the same time that the overall quality gate (SonarQube) • Ideally this should happen earlier in the pipeline — however we assume that this is happening before code is pushed and/or merged CODE INSPECTION ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE
  • 42. • After the final quality gate, if all pass, the image is pushed to a shared registry • Once pushed it is available to be used by: • Other applications that depends on this image • To be promoted to a stage environment • All the way up to production PUSH DOCKER IMAGE ENVIRONMENT PREPARATION COMPILE UNIT TESTS MUTATION TESTS PACKAGE BUILD DOCKER IMAGE RUN DOCKER IMAGE INTEGRATION TESTS PERFORMANCE TESTS DEPENDENCY VULNERABILITY TESTS CODE INSPECTION PUSH DOCKER IMAGE