Continuous Deployment of Clojure Apps
-
Upload
siva-jagadeesan -
Category
Technology
-
view
3.424 -
download
0
Transcript of Continuous Deployment of Clojure Apps
![Page 1: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/1.jpg)
Continuous Deployment of Clojure Apps
Siva Jagadeesan
1Tuesday, April 30, 13
![Page 2: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/2.jpg)
“I am big believe in Continuous Deployment as
long as is not touch production.”
DevOps Borat@DEVOPS_BORAT
2Tuesday, April 30, 13
![Page 3: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/3.jpg)
Continuous Deployment
Deploying every change to Production
Optionally a short QA gate
Practice of releasing every good build to users
“continuous release”
3Tuesday, April 30, 13
![Page 4: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/4.jpg)
Continuous Deployment
Release is in the hands of IT
4Tuesday, April 30, 13
![Page 5: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/5.jpg)
Continuous Deployment
Release is in the hands of IT
is this a good thing?
4Tuesday, April 30, 13
![Page 6: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/6.jpg)
Continuous Deployment
Release is in the hands of IT
is this a good thing?
NO!
4Tuesday, April 30, 13
![Page 7: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/7.jpg)
Continuous Deployment
Release is in the hands of IT
is this a good thing?
dependsBusiness Reason
NO!
4Tuesday, April 30, 13
![Page 8: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/8.jpg)
Continuous Delivery
Release is in the hands of Business
5Tuesday, April 30, 13
![Page 9: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/9.jpg)
Continuous Delivery is about keeping your
application in a state where it is always able to deploy
into production.
6Tuesday, April 30, 13
![Page 10: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/10.jpg)
Continuous Deployment of Clojure Apps
Siva Jagadeesan
Delivery
7Tuesday, April 30, 13
![Page 11: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/11.jpg)
Process
TechnologyPeople
ContinuousDelivery
8Tuesday, April 30, 13
![Page 12: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/12.jpg)
Who am I?
Siva Jagadeesan
Interests
• Clojure • REST• Datomic• Continuous Deployment• TDD• Startups
• Founder & CTO, Zolo Labs Inc• Director of Engineering, Runa Inc•@sivajag• [email protected]• http://blog.zololabs.com• http://techbehindtech.com
About Me
9Tuesday, April 30, 13
![Page 13: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/13.jpg)
• first product from Zolo Labs
• Your digital assistant
• helps with professional networking and relationships
• (and personal ones too!)
10Tuesday, April 30, 13
![Page 14: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/14.jpg)
Why Continuous Delivery?
11Tuesday, April 30, 13
![Page 15: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/15.jpg)
Our highest priority is to satisfy the customer through early and continuous delivery of valuable
software
12Tuesday, April 30, 13
![Page 16: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/16.jpg)
13Tuesday, April 30, 13
![Page 17: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/17.jpg)
Our Goal
• deliver high-quality, valuable software in an efficient, fast, and reliable manner
14Tuesday, April 30, 13
![Page 18: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/18.jpg)
15Tuesday, April 30, 13
![Page 19: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/19.jpg)
Continuous Integration
16Tuesday, April 30, 13
![Page 20: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/20.jpg)
Continuous Integration
development team
16Tuesday, April 30, 13
![Page 21: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/21.jpg)
Continuous Integration
development team
code
16Tuesday, April 30, 13
![Page 22: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/22.jpg)
Continuous Integration
development team
code
requirements
process of delivering software
whole team
16Tuesday, April 30, 13
![Page 23: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/23.jpg)
Continuous Delivery
development team
code
requirements
process of delivering software
whole team
17Tuesday, April 30, 13
![Page 24: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/24.jpg)
Benefits
• Improved Team Attitude
• More Responsive Team
• Less Waste
• Deployment Flexibility
• Less Pressure
• Less Bugs
18Tuesday, April 30, 13
![Page 25: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/25.jpg)
Process
TechnologyPeople
ContinuousDelivery
19Tuesday, April 30, 13
![Page 26: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/26.jpg)
Principles• The process for releasing/deploying software MUST be repeatable and reliable
• Automate everything!
• If something is difficult or painful, do it more often
• Keep everything in source control
• Done means “released”
• Build quality in!
• Everybody has responsibility for the release process
• Improve continuously
20Tuesday, April 30, 13
![Page 27: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/27.jpg)
Deployment Pipeline
is an automated manifestation of your process for getting software from version
control into the hands of your users.
21Tuesday, April 30, 13
![Page 28: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/28.jpg)
AimAids collaboration by making the process of building, testing and releasing software visible to everyone involved
Improves Feedback
Team can deploy any version of software to any environment at will without much effort
22Tuesday, April 30, 13
![Page 29: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/29.jpg)
image from wiki
23Tuesday, April 30, 13
![Page 30: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/30.jpg)
Deployment PipelineStages
Commit Stage
Automated Acceptance Test Stages
Manual Test Stages
Release Stage
24Tuesday, April 30, 13
![Page 31: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/31.jpg)
Deployment Pipeline
image from continuous delivery book
25Tuesday, April 30, 13
![Page 32: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/32.jpg)
Deployment PipelineBest Practices
Only build binaries once
Deploy the same way to every environment
Smoke test your deployments
Each change should propagate through the pipeline instantly
If any part of the pipeline fails, stop the line
26Tuesday, April 30, 13
![Page 33: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/33.jpg)
Process
TechnologyPeople
ContinuousDelivery
27Tuesday, April 30, 13
![Page 34: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/34.jpg)
This is easy ...
28Tuesday, April 30, 13
![Page 35: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/35.jpg)
Deployment PipelineStages
Commit Stage
Automated Acceptance Test Stages
Manual Test Stages
Release Stage
29Tuesday, April 30, 13
![Page 36: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/36.jpg)
Commit Stage
Compile (if needed)
Run tests
Create Binaries / Artifacts
Perform analysis of the code
30Tuesday, April 30, 13
![Page 37: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/37.jpg)
Commit StageCompile
lein compile
lein -U
to force retrieve latest snapshots
lein profiles
with-profile
31Tuesday, April 30, 13
![Page 38: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/38.jpg)
Commit StageRun Tests
lein test
lein test-selectors
to force retrieve latest snapshots
lein plugins
lein-cucumber
lein-difftest
lein-expectations
lein-midje
32Tuesday, April 30, 13
![Page 39: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/39.jpg)
Commit StageCreate Binaries / Artifacts
lein uberjar
profiles to create different uberjars
Plugins
lein-dist
lein-tar
lein-set-version
lein-sha-version
lein-package
33Tuesday, April 30, 13
![Page 40: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/40.jpg)
Commit StagePerform analysis of the code
lein-cloverage
lein-bikeshed
Kitbit - https://github.com/jonase/kibit
Eastwood - https://github.com/jonase/eastwood
34Tuesday, April 30, 13
![Page 41: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/41.jpg)
Acceptance and Manual Test Stages
35Tuesday, April 30, 13
![Page 42: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/42.jpg)
Types of tests
image from continuous delivery book
36Tuesday, April 30, 13
![Page 43: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/43.jpg)
Clojure Web UI Testing
clj-webdriver
webdriver-logic [uses core.logic]
37Tuesday, April 30, 13
![Page 44: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/44.jpg)
Release Stage
• lein run
• chef
• puppet
• pallet
38Tuesday, April 30, 13
![Page 45: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/45.jpg)
to sum up ...
39Tuesday, April 30, 13
![Page 46: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/46.jpg)
Process
TechnologyPeople
ContinuousDelivery
40Tuesday, April 30, 13
![Page 47: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/47.jpg)
Deployment Pipeline
image from continuous delivery book
41Tuesday, April 30, 13
![Page 48: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/48.jpg)
Continuous Delivery
development team
code
requirements
process of delivering software
whole team
42Tuesday, April 30, 13
![Page 49: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/49.jpg)
Benefits
• Improved Team Attitude
• More Responsive Team
• Less Waste
• Deployment Flexibility
• Less Pressure
• Reducing Errors
43Tuesday, April 30, 13
![Page 50: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/50.jpg)
Start doing continuous delivery to deliver high-quality, valuable software in an efficient, fast, and reliable manner.
44Tuesday, April 30, 13
![Page 51: Continuous Deployment of Clojure Apps](https://reader031.fdocuments.in/reader031/viewer/2022030309/58f256291a28abae358b45b3/html5/thumbnails/51.jpg)
Questions?
• @sivajag
• http://blog.zololabs.com
• http://techbehindtech.com
• zolodeck.com
45Tuesday, April 30, 13