hands on continouous delivery, i take 2014
DESCRIPTION
Tools needed to build a Continuous delivery pipeline. Most tools are generic and can be used regardless of language, some are specific for Java/JVM. http://2014.itakeunconf.com/TRANSCRIPT
![Page 1: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/1.jpg)
Hands on continuous delivery
Ioan Eugen Stan - I T.A.K.E. , Bucharest 2014
![Page 2: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/2.jpg)
Disclaimer
This is my way of making software that runs great in production.
It’s work in progress and
adapted to the environment.
![Page 3: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/3.jpg)
Software ‘goods’
Operating System, Firmware
Web ApplicationDeskptop/Mobile Application
![Page 4: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/4.jpg)
Software consumprtion: versions
● Debian 7, Windows 8.1, Android 4.4.2● Firefox 24, Java 8● Wikipedia version ? - current● Facebook version ? - current● Google version ? - current
![Page 5: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/5.jpg)
Continuous Delivery (CD) is a design practice used in software development to automate and improve the process of software delivery(Make releases boring)
http://en.wikipedia.org/wiki/File:Worksman_delivery_trike.jpg
Continuous delivery
![Page 6: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/6.jpg)
Process
http://blog.crisp.se/2013/02/05/yassalsundman/continuous-delivery-vs-continuous-deployment
![Page 7: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/7.jpg)
Continuous delivery diagram - Jez Humble http://continuousdelivery.com/2010/02/continuous-delivery/
![Page 8: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/8.jpg)
Tools● distributed version control system● a build tool (project management tool)● software artifact repository● continuous integration server● many environments - test, staging,
production, etc.
![Page 9: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/9.jpg)
Version controlWhere all the code gets refactored
![Page 10: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/10.jpg)
● manage and track source code changes● history tracking● enable colaboration on code
What do they do?
![Page 11: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/11.jpg)
Popular implementations
Developer Productivity Report 2013 (Zeroturnaround)
![Page 12: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/12.jpg)
Take advantage of the VCS● use a distributed VCS (git or similar)● ‘master’ branch only for releases● ‘develop’ contains the next release ● use feature branches
![Page 13: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/13.jpg)
A successful Git branching model by Vincent Driessen
![Page 14: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/14.jpg)
Git branching model by Lemi Orhan Ergin
![Page 15: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/15.jpg)
Git branching model by Lemi Orhan Ergin
![Page 16: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/16.jpg)
Git branching model by Lemi Orhan Ergin
![Page 17: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/17.jpg)
My advice● use profesional services like Github,
BitBucket or the like as much as posible● use the integrated code review tools they
provide● roll your own only with strong SysAdmin
team
![Page 18: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/18.jpg)
Build (automation) tools
![Page 19: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/19.jpg)
Generic build process
Simple build processhttp://physinfo-mac0.ulb.ac.be/divers_html/powerpc_programming_info/intro_to_ppc/ppc5_porting5.html
![Page 20: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/20.jpg)
Some popular build automation tools
Tool Mostly used for languages
make C/C++ mostly
distcc C/C++ mostly
rake Ruby
Apache Ant Java
Apaceh Maven JVM langs, JavaScript,PHP
Gradle JVM languages, generic
sbt Scala, JVM
Grunt JavaScript
![Page 21: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/21.jpg)
DevProd Redux (Zeroturnaround)
![Page 22: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/22.jpg)
Maven standard build process
Build life cycle
![Page 23: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/23.jpg)
● fixed life-cycle - disadvantage● very Java centric, but● promotes dependency management● is a standard for Artifact Repositories● used for PHP: http://www.php-maven.org/● used for JS: http://www.webjars.org/
About Maven
![Page 24: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/24.jpg)
The software/artifact repository
![Page 25: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/25.jpg)
What are they good for● store versions of artifacts (libraries,
resources, binaries)● eases consumption for tools/users● could be a simple FTP location/ git repos
![Page 26: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/26.jpg)
http://wiki.netbeans.org/MavenBestPractices
![Page 27: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/27.jpg)
Software package repositories by language
Language/purpose Repository
C++ Boost
Haskell Hackage
Java Maven
.NET NuGet
Node.js NPM
Python PyPl
R CRAN
Ruby Ruby Application Archive
http://en.wikipedia.org/wiki/Software_repository
![Page 28: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/28.jpg)
Continuous Integration
![Page 29: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/29.jpg)
Simple CI definition
A set of software engineering practices that speed up the delivery of software by
decreasing integration times.
![Page 30: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/30.jpg)
In practice● build application on commit● run unit tests on commit● run integration test on commit● execute other post-build jobs
![Page 31: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/31.jpg)
Developer Productivity Report 2013 (Zeroturnaround)
![Page 32: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/32.jpg)
My attempt to achieve CD● keep everything in version control● standard deployment infrastructure (Debian stable VM’
s)● build a single artifact - .deb package - that builds and
starts our app● rely on Jenkins automated build● automated integration testing, via Jenkins● automated acceptance testing, via Jenkins
![Page 33: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/33.jpg)
Demo (fingers crossed)
![Page 34: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/34.jpg)
Conclusion
The key test is that a business sponsor could request that the current development version of the software can be deployed into production at a moment's notice - and nobody would bat an
eyelid, let alone panic.(Martin Fowler)
![Page 35: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/35.jpg)
DZone Continuous Delivery Research 2014
![Page 36: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/36.jpg)
About me
IT Consultant/DeveloperApache CommitterDebian Contributor
BJUG leader
http://ro.linkedin.com/in/ieugen/@ieugen222
![Page 37: Hands on continouous delivery, I TAKE 2014](https://reader033.vdocuments.us/reader033/viewer/2022052822/554f3e4eb4c90572088b5157/html5/thumbnails/37.jpg)
Resources● http://dzone.com/research/continuousdelivery● http://nvie.com/posts/a-successful-git-branching-model/● http://www.slideshare.net/lemiorhan/git-branching-model● http://continuousdelivery.com/● http://martinfowler.com/books/continuousDelivery.html● http://jenkins-ci.org/● http://maven.apache.org/● http://git-scm.com/● http://blog.idrsolutions.com/2013/09/3-build-automation-tools-featured-at-
javaone/