SlideShare a Scribd company logo
1 of 31
Download to read offline
Continuous Delivery
with OpenShift
Docker Meetup 31.5.2016
Thomas Philipona
CTO
Agenda
1. OpenShift v3
2. CI / CD
3. Key Concepts
4. OpenShift CI /CD
Pipeline with Jenkins
OpenShift v3
1
OpenShift v3
“next generation PaaS” OpenShift v3 by Red Hat
V3 new implementation based on « de facto » standard technologies
Based on reliable open source concepts
Docker Kubernetes
OpenShift v3
Container Platform as a Service (PaaS)
Multinode platform, Docker container runtime
Docker build platform
Docker registry
One platform runs it all!
Fancy CLI und GUI (self-service)
Container security enabled
Workflows
● Docker build
● Prebuilt image
● Custom builder
● Source To Image
Workflow: Source To Image (S2I)
Git ?
s2i builder image
eg. openshift/ruby-22-centos7
code
code
My App
1.push code to git
2.trigger webhook
3.clone repo
4.evaluate builder
5.assemble image
6.push to registry and deploy
1
2
3
4
5
MyApplicationMyApplicationMyApp
6
Ruby, Java, PHP, NodeJs, ...
CI / CD
2
Continuous Integration
● SCM
● compile and test
● software integration
● reporting
● deployment to test
environment
● extension of CI
● one artifact on all
environments
● fully automated
deployment with a single
click
● prod release with a single
click
● each release is deployed to
production
● rolling deployments
necessary
● blue - green deployments
Continuous Delivery Continuous Deployment
If It Hurts, Do It More Frequently,
and Bring the Pain Forward
Source: Jez Humble, David Farley, Continuous Delivery, Pearson Education, Inc. 2011
CI / CD Workflow Overview
Git
code
Compile, Unit-tests
Integration Tests, Package
Deploy to Dev
Acceptance Tests
Deploy to UAT env
Manual Tests
Deploy to Prod
Key Concepts
3
Maven / Artefactrepository
Maven versioning doesn't work well with continuous delivery
Each commit is a potential release candidate
SNAPSHOT versions do not exist
Maven release plugin is integrated into the Maven lifecycle. All or
nothing
mvn release:prepare mvn release:perform→
Many releases artifactrepository clean up→
Rolling Updates
OpenShift supports rolling updates.
The application notifies the platform when it’s ready for requests.
The routing layer then forwards requests to the new containers.
Automated Database Migration
DB Migrationscripts are part of the deployed application and
executed during startup.
$ php bin/console doctrine:schema:update
$ rake db:migrate
Automated Database Migration
Database knows the current schema version
During application startup / deployment lifecycle hook, the DB
migration is executed
Rolling update
DB must be backward compatible
Concepts: Automated Database Migration
V41 V42 V43
dropColumn
dropColumn
dropTable
dropTable
MyApplicationMyApplicationApp
DB
Concepts: Automated Database Migration
App.v41 App.v42
... oldColumn newColumn ...
guild42 guild42
DB Trigger
OpenShift CI /CD Pipeline with
Jenkins
4
Java Maven Example (1)
Git
code
Jenkins
code
Artefact Repo
artefact
checkout build release deploy
Jenkins
code
Jenkins
artefact
cfg
+ Unit test
+ Integration test
+ Code analyse
Workflow: deploy
1.Jenkins build
mvn clean install
trigger build on OSE
2.custom build
download artefact
build docker image
3.deploy container
Jenkins
artifact
1
2
MyApplicationMyApplicationMyApp
Custom builder
image
3
My App
cfg
Java Maven Example (2)
acceptance tests
Jenkins
test
Jenkins
artefact
cfg
deploy to UAT manual test
Jenkins
artefact
cfg
deploy to Prod
Jenkins Pipeline Plugin
Build jobs written as Groovy scripts.
Build job script is next to source code in git repository
Jenkins provides the environment
● Git / Artifactory / OpenShift Accounts
https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin
Example Build Script
// Stage Checkout
stage 'Checkout'
git url: 'https://gitlab.puzzle.ch/tphilipona/appuio-javaee-
example.git'
// Stage Build
stage 'Build'
sh "${mvnHome}/bin/mvn clean install"
Stage View
Conclusion
5
Key Factors: Automation and Fast Feedback
Customer,
PO
Dev Production
DeploymentIdea, Feature, Bug
Fast, qualified Feedback
Resources
https://docs.openshift.com
Q & A
01.6.2016 in BE
15.6.2016 in ZH
Free APPUiO
OpenShift Techlab
Thank You!

More Related Content

What's hot

#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...
#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...
#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...
Docker, Inc.
 

What's hot (20)

Multi-cloud Kubernetes BCDR with Velero
Multi-cloud Kubernetes BCDR with VeleroMulti-cloud Kubernetes BCDR with Velero
Multi-cloud Kubernetes BCDR with Velero
 
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - PirosOpenbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
 
Containerd + buildkit breakout
Containerd + buildkit breakoutContainerd + buildkit breakout
Containerd + buildkit breakout
 
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java ApplicationsAutomating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
 
Cloud Native Landscape (CNCF and OCI)
Cloud Native Landscape (CNCF and OCI)Cloud Native Landscape (CNCF and OCI)
Cloud Native Landscape (CNCF and OCI)
 
#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...
#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...
#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...
 
DockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times NewsroomDockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times Newsroom
 
DockerCon EU 2015: Placing a container on a train at 200mph
DockerCon EU 2015: Placing a container on a train at 200mphDockerCon EU 2015: Placing a container on a train at 200mph
DockerCon EU 2015: Placing a container on a train at 200mph
 
DockerCon SF 2015: Ben Golub's Keynote Day 1
DockerCon SF 2015: Ben Golub's Keynote Day 1DockerCon SF 2015: Ben Golub's Keynote Day 1
DockerCon SF 2015: Ben Golub's Keynote Day 1
 
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep DiveDocker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
 
DEVNET-1183 OpenShift + Kubernetes + Docker
DEVNET-1183	OpenShift + Kubernetes + DockerDEVNET-1183	OpenShift + Kubernetes + Docker
DEVNET-1183 OpenShift + Kubernetes + Docker
 
Open shift enterprise 3.1 paas on kubernetes
Open shift enterprise 3.1   paas on kubernetesOpen shift enterprise 3.1   paas on kubernetes
Open shift enterprise 3.1 paas on kubernetes
 
Openshift presentation
Openshift presentationOpenshift presentation
Openshift presentation
 
DCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application Packages
 
Webinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSWebinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OS
 
Introduction To Flink
Introduction To FlinkIntroduction To Flink
Introduction To Flink
 
JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers
 
Multi-container Applications on OpenShift with the Ansible Service Broker Mul...
Multi-container Applications on OpenShift with the Ansible Service Broker Mul...Multi-container Applications on OpenShift with the Ansible Service Broker Mul...
Multi-container Applications on OpenShift with the Ansible Service Broker Mul...
 
How Docker EE is Finnish Railway’s Ticket to App Modernization
How Docker EE is Finnish Railway’s Ticket to App ModernizationHow Docker EE is Finnish Railway’s Ticket to App Modernization
How Docker EE is Finnish Railway’s Ticket to App Modernization
 
Cloud Native Applications on OpenShift
Cloud Native Applications on OpenShiftCloud Native Applications on OpenShift
Cloud Native Applications on OpenShift
 

Viewers also liked

Hapa Japan Festival 2013 Flyer
Hapa Japan Festival 2013 FlyerHapa Japan Festival 2013 Flyer
Hapa Japan Festival 2013 Flyer
Jayme Kiko
 
Mitos y errores en las relaciones de pareja
Mitos y errores en las relaciones de parejaMitos y errores en las relaciones de pareja
Mitos y errores en las relaciones de pareja
Admingac
 

Viewers also liked (20)

Revista Fundación Carlos Sanz
Revista Fundación Carlos SanzRevista Fundación Carlos Sanz
Revista Fundación Carlos Sanz
 
The 4 Knights of Content Marketing
The 4 Knights of Content MarketingThe 4 Knights of Content Marketing
The 4 Knights of Content Marketing
 
Hapa Japan Festival 2013 Flyer
Hapa Japan Festival 2013 FlyerHapa Japan Festival 2013 Flyer
Hapa Japan Festival 2013 Flyer
 
Straffe madammen lunch januari 2015
Straffe madammen lunch januari 2015Straffe madammen lunch januari 2015
Straffe madammen lunch januari 2015
 
Some thoughts about the gaps across languages and domains through the experi...
Some thoughts about the gaps across languages and domains through the experi...Some thoughts about the gaps across languages and domains through the experi...
Some thoughts about the gaps across languages and domains through the experi...
 
Youtube marketing jokes
Youtube marketing jokesYoutube marketing jokes
Youtube marketing jokes
 
Gestão atuarial compilado
Gestão atuarial   compiladoGestão atuarial   compilado
Gestão atuarial compilado
 
corripio
corripio corripio
corripio
 
Sigmund freud obras completas - lopez ballesteros
Sigmund freud   obras completas - lopez ballesterosSigmund freud   obras completas - lopez ballesteros
Sigmund freud obras completas - lopez ballesteros
 
Manual dqp
Manual dqpManual dqp
Manual dqp
 
Augmenter la satisfaction de l'utilisateur
Augmenter la satisfaction de l'utilisateurAugmenter la satisfaction de l'utilisateur
Augmenter la satisfaction de l'utilisateur
 
Estrategia nal. obesidad 1
Estrategia nal. obesidad 1Estrategia nal. obesidad 1
Estrategia nal. obesidad 1
 
Marketing na Internet
Marketing na InternetMarketing na Internet
Marketing na Internet
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015
 
OpenStack @ CERN, by Tim Bell
OpenStack @ CERN, by Tim BellOpenStack @ CERN, by Tim Bell
OpenStack @ CERN, by Tim Bell
 
Mitos y errores en las relaciones de pareja
Mitos y errores en las relaciones de parejaMitos y errores en las relaciones de pareja
Mitos y errores en las relaciones de pareja
 
Roteiro de estudo de caso simulação do processo de compras
Roteiro de estudo de caso simulação do processo de comprasRoteiro de estudo de caso simulação do processo de compras
Roteiro de estudo de caso simulação do processo de compras
 
Problemas de aprendizaje
Problemas de aprendizajeProblemas de aprendizaje
Problemas de aprendizaje
 
OpenShift for Java EE Developers
OpenShift for Java EE DevelopersOpenShift for Java EE Developers
OpenShift for Java EE Developers
 
Seo proposal for tensator group
Seo proposal for tensator groupSeo proposal for tensator group
Seo proposal for tensator group
 

Similar to Puzzle ITC Talk @Docker CH meetup CI CD_with_Openshift_0.2

Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Jonas Rosland
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
Fabio Fumarola
 
Docker intro
Docker introDocker intro
Docker intro
spiddy
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
Suresh Balla
 

Similar to Puzzle ITC Talk @Docker CH meetup CI CD_with_Openshift_0.2 (20)

AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
 
Agile Software Development & Tools
Agile Software Development & ToolsAgile Software Development & Tools
Agile Software Development & Tools
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your way
 
Building Distributed Systems without Docker, Using Docker Plumbing Projects -...
Building Distributed Systems without Docker, Using Docker Plumbing Projects -...Building Distributed Systems without Docker, Using Docker Plumbing Projects -...
Building Distributed Systems without Docker, Using Docker Plumbing Projects -...
 
Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015Docker and containers - For Boston Docker Meetup Workshop in March 2015
Docker and containers - For Boston Docker Meetup Workshop in March 2015
 
Docker Training - June 2015
Docker Training - June 2015Docker Training - June 2015
Docker Training - June 2015
 
Gentle introduction to containers and kubernetes
Gentle introduction to containers and kubernetesGentle introduction to containers and kubernetes
Gentle introduction to containers and kubernetes
 
Docker and Containers overview - Docker Workshop
Docker and Containers overview - Docker WorkshopDocker and Containers overview - Docker Workshop
Docker and Containers overview - Docker Workshop
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby project
 
Docker intro
Docker introDocker intro
Docker intro
 
Are VMs Passé?
Are VMs Passé?Are VMs Passé?
Are VMs Passé?
 
Are VM Passé?
Are VM Passé? Are VM Passé?
Are VM Passé?
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016
 
0507 057 01 98 * Adana Klima Tamir Servisi
0507 057 01 98 * Adana Klima Tamir Servisi0507 057 01 98 * Adana Klima Tamir Servisi
0507 057 01 98 * Adana Klima Tamir Servisi
 
Arquitectura en detalle de una anatomia devops
Arquitectura en detalle de una anatomia devopsArquitectura en detalle de una anatomia devops
Arquitectura en detalle de una anatomia devops
 

Recently uploaded

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
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 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
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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...
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
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, ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Puzzle ITC Talk @Docker CH meetup CI CD_with_Openshift_0.2

  • 1. Continuous Delivery with OpenShift Docker Meetup 31.5.2016 Thomas Philipona CTO
  • 2. Agenda 1. OpenShift v3 2. CI / CD 3. Key Concepts 4. OpenShift CI /CD Pipeline with Jenkins
  • 4. OpenShift v3 “next generation PaaS” OpenShift v3 by Red Hat V3 new implementation based on « de facto » standard technologies
  • 5. Based on reliable open source concepts Docker Kubernetes
  • 6. OpenShift v3 Container Platform as a Service (PaaS) Multinode platform, Docker container runtime Docker build platform Docker registry One platform runs it all! Fancy CLI und GUI (self-service) Container security enabled
  • 7. Workflows ● Docker build ● Prebuilt image ● Custom builder ● Source To Image
  • 8. Workflow: Source To Image (S2I) Git ? s2i builder image eg. openshift/ruby-22-centos7 code code My App 1.push code to git 2.trigger webhook 3.clone repo 4.evaluate builder 5.assemble image 6.push to registry and deploy 1 2 3 4 5 MyApplicationMyApplicationMyApp 6 Ruby, Java, PHP, NodeJs, ...
  • 10. Continuous Integration ● SCM ● compile and test ● software integration ● reporting ● deployment to test environment ● extension of CI ● one artifact on all environments ● fully automated deployment with a single click ● prod release with a single click ● each release is deployed to production ● rolling deployments necessary ● blue - green deployments Continuous Delivery Continuous Deployment
  • 11. If It Hurts, Do It More Frequently, and Bring the Pain Forward Source: Jez Humble, David Farley, Continuous Delivery, Pearson Education, Inc. 2011
  • 12. CI / CD Workflow Overview Git code Compile, Unit-tests Integration Tests, Package Deploy to Dev Acceptance Tests Deploy to UAT env Manual Tests Deploy to Prod
  • 14. Maven / Artefactrepository Maven versioning doesn't work well with continuous delivery Each commit is a potential release candidate SNAPSHOT versions do not exist Maven release plugin is integrated into the Maven lifecycle. All or nothing mvn release:prepare mvn release:perform→ Many releases artifactrepository clean up→
  • 15. Rolling Updates OpenShift supports rolling updates. The application notifies the platform when it’s ready for requests. The routing layer then forwards requests to the new containers.
  • 16. Automated Database Migration DB Migrationscripts are part of the deployed application and executed during startup. $ php bin/console doctrine:schema:update $ rake db:migrate
  • 17. Automated Database Migration Database knows the current schema version During application startup / deployment lifecycle hook, the DB migration is executed Rolling update DB must be backward compatible
  • 18. Concepts: Automated Database Migration V41 V42 V43 dropColumn dropColumn dropTable dropTable MyApplicationMyApplicationApp DB
  • 19. Concepts: Automated Database Migration App.v41 App.v42 ... oldColumn newColumn ... guild42 guild42 DB Trigger
  • 20. OpenShift CI /CD Pipeline with Jenkins 4
  • 21. Java Maven Example (1) Git code Jenkins code Artefact Repo artefact checkout build release deploy Jenkins code Jenkins artefact cfg + Unit test + Integration test + Code analyse
  • 22. Workflow: deploy 1.Jenkins build mvn clean install trigger build on OSE 2.custom build download artefact build docker image 3.deploy container Jenkins artifact 1 2 MyApplicationMyApplicationMyApp Custom builder image 3 My App cfg
  • 23. Java Maven Example (2) acceptance tests Jenkins test Jenkins artefact cfg deploy to UAT manual test Jenkins artefact cfg deploy to Prod
  • 24. Jenkins Pipeline Plugin Build jobs written as Groovy scripts. Build job script is next to source code in git repository Jenkins provides the environment ● Git / Artifactory / OpenShift Accounts https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin
  • 25. Example Build Script // Stage Checkout stage 'Checkout' git url: 'https://gitlab.puzzle.ch/tphilipona/appuio-javaee- example.git' // Stage Build stage 'Build' sh "${mvnHome}/bin/mvn clean install"
  • 28. Key Factors: Automation and Fast Feedback Customer, PO Dev Production DeploymentIdea, Feature, Bug Fast, qualified Feedback
  • 30. Q & A 01.6.2016 in BE 15.6.2016 in ZH Free APPUiO OpenShift Techlab