Building a private CI/CD pipeline with Java and Docker in the Cloud as presented at DevNexus 2017
Intro to CI/CD using Docker
-
Upload
michael-irwin -
Category
Software
-
view
73 -
download
0
Transcript of Intro to CI/CD using Docker
![Page 1: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/1.jpg)
Intro to CI/CDMichael Irwin - February 8, 2017
![Page 2: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/2.jpg)
First... a history lesson!
![Page 3: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/3.jpg)
The Pareto Principal (the 80/20rule)
80% of bugs are found in 20% of code
90% of downtime comes from 10% of defects
"80% of the errors and crashes in Windows and O�ce
were caused by 20% of the entire pool of bugs
detected." --Microsoft's CEO, 2002
"Microsoft’s own research found that the average user
of Word uses only 8% of the functionality." --
http://www.allaboutagile.com/agile-principle-8-enough-is-enough/
![Page 4: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/4.jpg)
How do we reduce waste?
![Page 5: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/5.jpg)
![Page 6: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/6.jpg)
![Page 7: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/7.jpg)
![Page 8: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/8.jpg)
How would YOU de�ne continuousintegration?
![Page 9: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/9.jpg)
Continuous Integration is asoftware development practicewhere members of a teamintegrate their work frequently,usually each person integrates atleast daily - leading to multipleintegrations per day. Eachintegration is veri�ed by anautomated build (including test)to detect integration errors asquickly as possible.
![Page 10: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/10.jpg)
How would YOU de�ne continuousdelivery?
![Page 11: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/11.jpg)
Continuous Delivery is a softwaredevelopment discipline whereyou build software in such a waythat the software can be releasedto production at any time.
-- Martin Fowler
![Page 12: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/12.jpg)
Recap
Continuous...
Integration - running automated builds to test
integration of application
Delivery - discipline to be able to release to
production at any time
Deployment - every change goes through the
pipeline and straight to production
![Page 13: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/13.jpg)
What's it look like?
It really depends on your organization!
A fairly typical pipeline...
Developer commits code locally
Pushes code to shared repository
Build server sees change (either via webhook or
polling)
Build server performs build and runs tests
Artifact is created and published
Artifact rolled out to various tiers
![Page 14: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/14.jpg)
What tools exist?
This is obviously not an exhaustive collection...
![Page 15: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/15.jpg)
Why have a pipeline?
More reliable code
Tests are run automatically
Every stage is automated/scripted to reduce error
More frequent merges reduce merge issues
Get feedback quicker
Did a build break? Are tests passing?
Are we developing the right feature?
Morale boost
Engineers love seeing their work being used. Get it
out faster!
![Page 16: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/16.jpg)
Getting Started
We're going to build a pipeline that looks like this...
1. Commit code locally
2. Push to a GitHub repository
3. Docker image built automatically using Docker Cloud
4. Docker image pushed and hosted on Docker Hub
Works very well for open-source types of projects. I use
this exact pipeline for my mikesir87/aws-cli image.
![Page 17: Intro to CI/CD using Docker](https://reader031.fdocuments.in/reader031/viewer/2022022413/58ee8d271a28ab10718b4667/html5/thumbnails/17.jpg)
Hands-on time
https://github.com/mikesir87/ci-cd-intro-using-docker