continuous deployment of clojure apps

Post on 16-Apr-2017

3.424 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Continuous Deployment of Clojure Apps

Siva Jagadeesan

1Tuesday, April 30, 13

“I am big believe in Continuous Deployment as

long as is not touch production.”

DevOps Borat@DEVOPS_BORAT

2Tuesday, April 30, 13

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

Continuous Deployment

Release is in the hands of IT

4Tuesday, April 30, 13

Continuous Deployment

Release is in the hands of IT

is this a good thing?

4Tuesday, April 30, 13

Continuous Deployment

Release is in the hands of IT

is this a good thing?

NO!

4Tuesday, April 30, 13

Continuous Deployment

Release is in the hands of IT

is this a good thing?

dependsBusiness Reason

NO!

4Tuesday, April 30, 13

Continuous Delivery

Release is in the hands of Business

5Tuesday, April 30, 13

Continuous Delivery is about keeping your

application in a state where it is always able to deploy

into production.

6Tuesday, April 30, 13

Continuous Deployment of Clojure Apps

Siva Jagadeesan

Delivery

7Tuesday, April 30, 13

Process

TechnologyPeople

ContinuousDelivery

8Tuesday, April 30, 13

Who am I?

Siva Jagadeesan

Interests

• Clojure • REST• Datomic• Continuous Deployment• TDD• Startups

• Founder & CTO, Zolo Labs Inc• Director of Engineering, Runa Inc•@sivajag• siva@zololabs.com• http://blog.zololabs.com• http://techbehindtech.com

About Me

9Tuesday, April 30, 13

• first product from Zolo Labs

• Your digital assistant

• helps with professional networking and relationships

• (and personal ones too!)

10Tuesday, April 30, 13

Why Continuous Delivery?

11Tuesday, April 30, 13

Our highest priority is to satisfy the customer through early and continuous delivery of valuable

software

12Tuesday, April 30, 13

13Tuesday, April 30, 13

Our Goal

• deliver high-quality, valuable software in an efficient, fast, and reliable manner

14Tuesday, April 30, 13

15Tuesday, April 30, 13

Continuous Integration

16Tuesday, April 30, 13

Continuous Integration

development team

16Tuesday, April 30, 13

Continuous Integration

development team

code

16Tuesday, April 30, 13

Continuous Integration

development team

code

requirements

process of delivering software

whole team

16Tuesday, April 30, 13

Continuous Delivery

development team

code

requirements

process of delivering software

whole team

17Tuesday, April 30, 13

Benefits

• Improved Team Attitude

• More Responsive Team

• Less Waste

• Deployment Flexibility

• Less Pressure

• Less Bugs

18Tuesday, April 30, 13

Process

TechnologyPeople

ContinuousDelivery

19Tuesday, April 30, 13

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

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

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

image from wiki

23Tuesday, April 30, 13

Deployment PipelineStages

Commit Stage

Automated Acceptance Test Stages

Manual Test Stages

Release Stage

24Tuesday, April 30, 13

Deployment Pipeline

image from continuous delivery book

25Tuesday, April 30, 13

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

Process

TechnologyPeople

ContinuousDelivery

27Tuesday, April 30, 13

This is easy ...

28Tuesday, April 30, 13

Deployment PipelineStages

Commit Stage

Automated Acceptance Test Stages

Manual Test Stages

Release Stage

29Tuesday, April 30, 13

Commit Stage

Compile (if needed)

Run tests

Create Binaries / Artifacts

Perform analysis of the code

30Tuesday, April 30, 13

Commit StageCompile

lein compile

lein -U

to force retrieve latest snapshots

lein profiles

with-profile

31Tuesday, April 30, 13

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

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

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

Acceptance and Manual Test Stages

35Tuesday, April 30, 13

Types of tests

image from continuous delivery book

36Tuesday, April 30, 13

Clojure Web UI Testing

clj-webdriver

webdriver-logic [uses core.logic]

37Tuesday, April 30, 13

Release Stage

• lein run

• chef

• puppet

• pallet

38Tuesday, April 30, 13

to sum up ...

39Tuesday, April 30, 13

Process

TechnologyPeople

ContinuousDelivery

40Tuesday, April 30, 13

Deployment Pipeline

image from continuous delivery book

41Tuesday, April 30, 13

Continuous Delivery

development team

code

requirements

process of delivering software

whole team

42Tuesday, April 30, 13

Benefits

• Improved Team Attitude

• More Responsive Team

• Less Waste

• Deployment Flexibility

• Less Pressure

• Reducing Errors

43Tuesday, April 30, 13

Start doing continuous delivery to deliver high-quality, valuable software in an efficient, fast, and reliable manner.

44Tuesday, April 30, 13

Questions?

• @sivajag

• siva@zololabs.com

• http://blog.zololabs.com

• http://techbehindtech.com

• zolodeck.com

45Tuesday, April 30, 13

top related