lviv pmday: Дов Німрац Як зробити процес continuous integration...

32
CI is essential but not sufficient for an effective application delivery workflow Dov Nimratz 2016

Upload: lviv-startup-club

Post on 23-Jan-2018

163 views

Category:

Leadership & Management


0 download

TRANSCRIPT

CI is essential but not

sufficient for an effective

application delivery

workflow

Dov Nimratz 2016

E-Mail: [email protected]: dovnmr

About me

• 30 years in R&D

• 17 years in Israel HighTech

• ECI, Telrad, RAD, Audiocodes companies

• HW, SW, Mechanical design engineer

• Project & Product Manager

• Business developer for EMEA & CIS countries

• 22 publications, US patent

• Counseling & SW development teaching

E-Mail: [email protected]: dovnmr

What this speech is about?

• Immutable concepts in R&D

• Major CD fails

• Solutions

E-Mail: [email protected]: dovnmr

Basement - SDLC

The smaller radius creates

smaller amplitude. It closer

to the line.

E-Mail: [email protected]: dovnmr

SDLC pyramid view

Requirement Analysis

Design

Implementation

Testing

EvaluationRefactoring

V - Model

Bug fixing

E-Mail: [email protected]: dovnmr

Monitoring and testing

Infrastructure configuration

CI Server

CD parts

Version control

E-Mail: [email protected]: dovnmr

Three primary tasks for effective CD

• The trouble with monolithic codebases and approaches

to break it down

• Designing the test suite for optimal feedback

• Setting up a deployment pipeline as the backbone of CD

E-Mail: [email protected]: dovnmr

Part I - monolithic codebases

E-Mail: [email protected]: dovnmrMonolithic code immediate symptoms

–«Adagissimo»

• Sluggish build

• App start-up time

• Slow Auto test

E-Mail: [email protected]: dovnmr

Harmful impact - Big SDLC circle radius

E-Mail: [email protected]: dovnmrHarmful impact

New devs penetration

barrier x 100

E-Mail: [email protected]: dovnmrHarmful impact

Less ownership for team members – ”broken build not

mine”

E-Mail: [email protected]: dovnmrHarmful impact

Hacks grows

exponential

E-Mail: [email protected]: dovnmr

Monolithic code, Harmful impact

• Slow build bushes devs not to do it even locally before ci

• Only night CI server build or rarely

• Time cost for tasks are Up to (x10 more) x N devs

• Many manual tests required

• This creates a lot of friction in the pipeline.

E-Mail: [email protected]: dovnmr

Solution - Decomposing the codebase

Service 1

Service 2

Service 2

REST

DLL 1

DLL 2

DLL 3

BUILD

Compile Flags

The Entropy principle works in the development

After build

E-Mail: [email protected]: dovnmr

The Scale Cube

Scale by cloning

Scale by split differentservices

Resource duplication

Functional decomposition

Data Partitioning

Scale by splitting similar services

Z

X

Y

E-Mail: [email protected]: dovnmr

The Scale Cube Z axis

• Scaled as X but for data subset

• Commonly used:• Scale DB by primary key

• Treatment customers by SLA

• Scale DB or Application

• Combine result in later stage

• Each server only deals with a subset of the data.

• Improves utilization (memory usage, I/O), reliability, performance

• But only Y-axis scaling solve application complexity grow

E-Mail: [email protected]: dovnmr

Part II - Designing the test suite

E-Mail: [email protected]: dovnmrTesting & Problem areas

Requirement Analysis

Design

Implementation

Testing

Evaluation Technical

Problems

Architectural

or

Business

ProblemsBug

fixing

Refactoring

E-Mail: [email protected]: dovnmr

Testing pyramid

Automated Unit Test

Code reading

Auto API test

Auto Integration

Auto component

Auto

GUI

Test

Manual

Technical

Problems

Architectural

or

Business

Problems

E-Mail: [email protected]: dovnmr

Ice-Cream cone Anti-pattern

E-Mail: [email protected]: dovnmrAQA daily mail

E-Mail: [email protected]: dovnmr

Part III - Setting up a deployment pipeline

E-Mail: [email protected]: dovnmr

General rule for ISO 9001

Design how,

write it,

do it.

E-Mail: [email protected]: dovnmr

Deployment Pipeline

Commit Stage

Auto Acceptance

Testing

Auto Capacity Testing

Manual Testing

Release

Compile

Unit test

Analysis

Build

Functional

Testing

Performanc

e

Load test

Business

logic

Two

button

Deploy

E-Mail: [email protected]: dovnmr

TBD

TRUNK

Release

MB

Release

MB

E-Mail: [email protected]: dovnmr

TBD

TRUNK

Release 1.0

MB

Release 2.0

MB

Release 1.1

MB

E-Mail: [email protected]: dovnmr

TBD

TRUNK

Release 2.0

MB

Release 1.0

M

B

*Release 1.0M

Release 1.1

MB

M

M

E-Mail: [email protected]: dovnmrCommon anti-patterns with

branch based workflows

• Long-lived feature branches

• Branch per environment (Dev, QA, Staging and

Production)

• Shadow process flow steps - limiting work in process

(WIP)

E-Mail: [email protected]: dovnmr

SDLC pipe line

Build Test & release

E-Mail: [email protected]: dovnmr

Conclusions – Effective CD when:

• Short Dev Life Cycle

• Non monolithic code with Library and Services

• Correct test suite

• Trunk Base Development

• Dev pipeline without shadow steps

Thank you

Contacts:E-Mail: [email protected]

Skype: dovnmr