Upload
rafal-leszko
View
60
Download
4
Embed Size (px)
Citation preview
Rafal Leszko (@RafalLeszko, [email protected])
Continuous Delivery: Jenkins, Docker and Spring Boot
Jez Humble
Continuous Delivery
The ability to get changes-features, configuration changes, bug fixes, experiments - into production or into the hands of users safely and quickly in a sustainable way
What is Continuous Delivery?
"Traditional" Delivery
Customer
"Agile" team
Centralized QA IT OperationsAnalysis + Design
Development
Testing + Showcase
Integration + QARelease and operation
Acceptance Tests
Continuous Integration
Customer
"Agile" team
Centralized QA IT OperationsAnalysis + Design
Development
Testing + Showcase
Integration + QARelease and operation
Acceptance Tests
Continuous Integration
https://github.com/Dynatrace/ufo
Continuous Integration
Customer
"Agile" team
Centralized QA IT OperationsAnalysis + Design
Development
Testing + Showcase
Integration + QARelease and operation
Acceptance Tests
"last mile"Continuous Integration
Customer
"Agile" team
Centralized QA IT OperationsAnalysis + Design
Development
Testing + Showcase
Integration + QARelease and operation
Acceptance Tests
Automated Tests
"last mile"Continuous Integration
Customer
"Agile" team
Centralized QA IT OperationsAnalysis + Design
Development
Testing + Showcase
Integration + QARelease and operation
Acceptance Tests
AutomatedTesting
Automated Tests
"last mile"Continuous Integration
Customer
"Agile" team
Centralized QA IT OperationsAnalysis + Design
Development
Testing + Showcase
Integration + QARelease and operation
Acceptance Tests
Configuration Management
+MonitoringAutomated Tests
"last mile"Continuous Integration
Customer
"Agile" team
Centralized QA IT OperationsAnalysis + Design
Development
Testing + Showcase
Integration + QARelease and operation
Acceptance Tests
Continuous Delivery Pipeline
Checkout
Compile
Unit Tests
Deploy to Staging
Acceptance Tests
Release
Smoke Test
dev machine
github server
jenkins server
push
pull
Checkout
Compile
Unit Tests
Deploy to Staging
Acceptance Tests
Release
Smoke Test
issues?
● Each server has to be configured
● Different environment in staging and production
● Different Java version for different applications
● Applications using the same ports
● Versioning
serverapplicationapp.jar
serverapplicationapp.jar
java -jar app.jar
server
applicationapp2.jar
java -jar app.jar
applicationapp.jar
treat your servers like cattle, not pets
Dockerfile:
FROM frolvlad/alpineoraclejdk8:slimADD build/libs/vox0.0.1SNAPSHOT.jar app.jarENTRYPOINT ["java","jar","app.jar"]
Dockerfile:
FROM frolvlad/alpineoraclejdk8:slimADD build/libs/vox0.0.1SNAPSHOT.jar app.jarENTRYPOINT ["java","jar","app.jar"]
docker build t <image_name> .
Dockerfile:
$ docker run name <container_name> <image_name>
$ docker run name <container_name> <image_name>
Docker registry
● registry for docker images
Docker image name
<registry_address>/<image_name>
Docker image name
<registry_address>/<image_name>
docker push <image_name>
Docker image name
<registry_address>/<image_name>
docker push <image_name>
docker pull <image_name>
Port Mapping
$ docker run p 8080:8080 name <container_name> <image_name>
External Docker Host
$ docker run p 8080:8080 name <container_name> <image_name>
$ docker run H 192.168.0.15:2375 p 8080:8080 name <container_name> <image_name>
Example
$ docker run H 192.168.0.15:2375 p 8080:8080 d name exchangerate 192.168.0.20/exchangerate:15
dev machine
github server
jenkins server
push
pull
staging machine
production machine
deploy
acceptance test
deploy
smoke test
docker registry
push
pull
pull
Manual Testing
Legacy Projects
Performance Tests
Blue-Green Deployment
Canary Release
Code coverage
Static code analysis
“continuous”
Feature Toggle
Easy?
Questions?