from ci to cd

57
| © 2012 Axway | All rights reserved. From Continous Integration to Continuous Delivery Henri Gomez INSA Lyon 11 June 2012

Upload: henrigomez

Post on 21-Jun-2015

452 views

Category:

Technology


8 download

DESCRIPTION

From Continuous Integration to Continuous Delivery, Talk at INSA Lyon in June 2012

TRANSCRIPT

Page 1: From ci to cd

| © 2012 Axway | All rights reserved.

From Continous Integration to Continuous Delivery Henri Gomez INSA Lyon 11 June 2012

Page 2: From ci to cd

| © 2012 Axway | All rights reserved. 2

Aim of this document

•  Today Software Challenges •  Expose what are CI and CDs •  Continuous Delivery •  Continuous Deployement •  Contents Repository •  Native Packaging

Page 3: From ci to cd

| © 2012 Axway | All rights reserved.

Business Interaction Networks

Axway is the Business Interaction Networks company. We are the only provider in the market today to manage, run, secure, and monitor all your business interactions — emails, files, messages, services, events, and processes.

Page 4: From ci to cd

| © 2012 Axway | All rights reserved. 4

About @hgomez

•  CI Architect @ Axway

•  Former Senior Ops Director •  Former Developer, Team Leader and Architect

•  JPackage Project Founder •  OpenJDK 7&8 packages for OSX •  ASF Member (Tomcat & XML-RPC)

Page 5: From ci to cd

Software Challenges

Page 6: From ci to cd

Software Challenges Today

•  Software projects are larger and complex •  More and more component interoperability •  Many teams and often remote teams •  Tight schedules •  Frequent needs and requirements changes

| © 2012 Axway | All rights reserved. 6

Page 7: From ci to cd

Software Challenges Early ages

•  Build / Release on a “per request” basis after –  Project reaches a particular step (milestone/release candidate)

•  Mandatory pre-requesites –  Project in proper state -> yes it build –  Well documented per standards -> doc is not an option –  Properly reviewed -> someone tested product

•  Late discovery –  Some pre-requesites where just not there ;(

| © 2012 Axway | All rights reserved. 7

Page 8: From ci to cd

Software Challenges Then came Agile

| © 2012 Axway | All rights reserved. 8

Page 9: From ci to cd

Software Challenges Mandatory tooling for Agile

•  Standardize Build, Test and Deployment

•  Provide Continuous Builds, Test and Deployment

•  Ensures solid, reproducible and analyzable steps

•  Visible to all actors (Dev, QA, Product Owner)

| © 2012 Axway | All rights reserved. 9

Page 10: From ci to cd

Software Challenges Ideal life-cycle for Agile

| © 2012 Axway | All rights reserved. 10

Page 11: From ci to cd

Continuous Integration

Page 12: From ci to cd

| © 2012 Axway | All rights reserved. 12

Continuous Integration Definition

•  Continuous Integration is the practice of integrating early and often, so as to avoid the pitfalls of "integration hell".!

•  The ultimate goal is to reduce timely rework and thus reduce cost and time. When done well, continuous integration has been shown to achieve these goals."

Page 13: From ci to cd

Continuous Integration Workflow

| © 2012 Axway | All rights reserved. 13

Page 14: From ci to cd

Continuous Integration Workflow

•  Team members work on code –  Code and Unit tests –  Push on SCM after local tests passed

•  CI Server periodically polls SCM and if changes –  Check out all code –  Build all code Run all unit tests –  Run acceptance tests –  Deploy snapshots to artifacts repository

| © 2012 Axway | All rights reserved. 14

In case of error in any step, CI server inform all parties

Page 15: From ci to cd

| © 2012 Axway | All rights reserved. 15

Continuous Integration Building

•  Fetch code –  From SCM

•  Build code –  Test code in its dependency land

•  Run tests –  Unit tests –  Acceptance tests

•  Deploy Dev artifacts –  Developers artifacts (ie: Maven jar/war) –  Precisely identified (name and version)

Page 16: From ci to cd

| © 2012 Axway | All rights reserved. 16

Continuous Integration QA = Quality Assurance

•  Functional Testing –  Match expected behavior –  Test regressions fixes

•  Performance Testing –  Smoke Tests –  Stress Tests –  Response Speed –  Throughput –  Application behavior metering –  Systems hosting application behavior

Page 17: From ci to cd

Continuous Integration Build in Action #1

| © 2012 Axway | All rights reserved. 17

Page 18: From ci to cd

Continuous Integration Build in Action #2

| © 2012 Axway | All rights reserved. 18

Page 19: From ci to cd

Continuous Integration Build in Action #3

| © 2012 Axway | All rights reserved. 19

Page 20: From ci to cd

Continuous Integration Build in Action #4

| © 2012 Axway | All rights reserved. 20

Page 21: From ci to cd

Continuous Integration – QA Focus

Page 22: From ci to cd

Continuous Integration – QA Unit Testing

•  Unit Tests test the code •  Ensures the code is doing what we intend it to do •  Many extremely quick and small tests

| © 2012 Axway | All rights reserved. 22

Unit Testing ensure we make the software right

Page 23: From ci to cd

Continuous Integration – QA Functional Testing

•  Check code behavior •  Automated or manual •  Tests performed in real world, ie a Web UI

| © 2012 Axway | All rights reserved. 23

Functional Testing ensure we make the right software

Page 24: From ci to cd

Continuous Integration – QA Performance Testing

•  Check system and application behavior •  Stress tests •  System and application metrics collected and analyzed

| © 2012 Axway | All rights reserved. 24

Performance Testing help figure hotspots and runtime problems quickly

Page 25: From ci to cd

Continuous Integration – QA Capacity Planning

•  Performance testing ++ •  Stress and tortures tests •  Define Limits (ie: x transaction/s for a fixed system)

| © 2012 Axway | All rights reserved. 25

Capacity Planning bring abacus to support and sales teams to answer customers needs

Page 26: From ci to cd

Continuous Integration – Tools

Page 27: From ci to cd

| © 2012 Axway | All rights reserved. 27

Continuous Integration - Tools A rich ecosystem

•  Sources Repositories"•  Build Engines"•  Test Engines"•  Integration Engines"•  Binaries Repositories!•  Deployment Tooling"

Page 28: From ci to cd

| © 2012 Axway | All rights reserved. 28

Continuous Integration – Tools Some names and logos

Page 29: From ci to cd

Continuous Integration – What’s next ?

Page 30: From ci to cd

| © 2012 Axway | All rights reserved. 30

Continuous Integration – Next What’s next ?

•  Continuous Deployment is not Continuous Integration

Page 31: From ci to cd

| © 2012 Axway | All rights reserved. 31

Continuous Integration – Next Continuous Deployment in action

Page 32: From ci to cd

| © 2012 Axway | All rights reserved. 32

Continuous Integration – Next Assembly is key !

•  Fetch Dev Artifacts –  Mandate component approach

•  Assemble Artifacts –  Components Assembly guidelines –  Special care of Components configurations

•  Deploy Usable Artifacts –  Ready to use by upstream teams like QA-Ops –  Should be configurable from the outside

Page 33: From ci to cd

| © 2012 Axway | All rights reserved. 33

Continuous Integration – Next Delivery and Deployment

•  Delivery "–  Providing product to end user"–  User could then install or update it on his own systems!

•  Deployement "–  Providing operational solution to end user"–  User could directly use it on his own or leased systems"

Page 34: From ci to cd

Continuous Delivery

Page 35: From ci to cd

| © 2012 Axway | All rights reserved. 35

Continuous Delivery Definition

•  Continuous Delivery could be seen as the process who bring products to internal and external customers

•  Internal customers –  Developers –  QA –  Sales

•  Various medias –  CD/DVD –  AMI/VMDK/VDI –  Native packages

Page 36: From ci to cd

| © 2012 Axway | All rights reserved. 36

Continous Delivery Requirements

•  Contents Repository –  Precisely identified components –  Components fetchable via APIs

•  Scriptable operations –  Components Fetch –  Components Assembly –  Media generation (packages or burn)

•  It will turn into a Media Factory –  Predicable process –  Automated process

Page 37: From ci to cd

Continuous Deployment

Page 38: From ci to cd

| © 2012 Axway | All rights reserved. 38

Continuous Deployment Definition

•  Continuous Deployment is the process who bring products running on systems to internal and external customers

•  3 main requesters –  Dev Teams –  QA Teams –  Ops Teams (internal or customers)

Page 39: From ci to cd

| © 2012 Axway | All rights reserved. 39

Continuous Deployment For Dev Teams

•  Code Testing from Trunk

•  Deployment decision by Dev Teams

•  Operated on Dev Teams Servers

Page 40: From ci to cd

| © 2012 Axway | All rights reserved. 40

Continuous Deployment For QA Teams

•  Product Testing on Internal Releases

•  Deployment decisions on demand by QA Teams

•  Operated on QA Teams Servers

Page 41: From ci to cd

| © 2012 Axway | All rights reserved. 41

Continuous Deployment For OPS Teams

•  Product install or update from Releases

•  Deployment decision by OPS/Customers –  To inform users about planned operation –  To follow their customers SLA

•  Operated on Production Servers –  Under control of customers Ops –  With customers agreements (Cloud/Saas)

Page 42: From ci to cd

| © 2012 Axway | All rights reserved. 42

Continuous Deployment Requirements

•  Products Repository –  Precisely identified products –  Products fetchable via APIs

•  Automated operations –  Products Fetch –  Products Deploy (install/update)

Page 43: From ci to cd

| © 2012 Axway | All rights reserved. 43

Continuous Deployment Factory

•  Deployment Factory –  Production of Native Packages –  Production of OS Images

(VMWare, Amazon Web Service)

•  Images and Packages –  Images for boot strap

operations (Virtualized environments)

–  Packages to install and update systems (Virtualized and Physical)

Page 44: From ci to cd

Contents Repository

Page 45: From ci to cd

| © 2012 Axway | All rights reserved. 45

Contents Repository Definition

•  Shared referential –  For Development Teams –  For QA Team –  For Assembly Team

•  APIs powered –  Upload / Download operations by APIs

•  Security in mind –  By Repository sections –  By Users –  Peering and sites replication

Page 46: From ci to cd

| © 2012 Axway | All rights reserved. 46

Contents Repository Benefits

•  Common referential –  Artifacts provided by developers in development phase –  Artifacts tested by QA in validation phase –  Artifacts assembled in continuous delivery and deployment

chains

•  Automation ready –  Unique identifier for artifacts (id, group, version, kind) –  Programatic access to artifacts easily via APIs

•  Web based –  Security via redundancy (on/off sites) –  Peering via replication (on remote sites)

Page 47: From ci to cd

CI Today and beyond

Page 48: From ci to cd

Today CI

| © 2012 Axway | All rights reserved. 48

•  From Source to Artifacts –  Developper commit –  CI build project(s) related to commit –  CI publish artifacts project(s) to Content Repository

Page 49: From ci to cd

Today Delivery

| © 2012 Axway | All rights reserved. 49

•  From Artifacts to Delivery –  Assembler collect artifacts, build and deploy from its workstation –  Assembler push usable delivery to WebLiv –  Customers and Axway team get delivery from WebLiv

Page 50: From ci to cd

Today Deployment

| © 2012 Axway | All rights reserved. 50

•  From Artifacts to Deployment –  Assembler collect artifacts and launch appliances build –  Appliances deployed on WebLiv and Amazon S3 (Cloud) –  Customers and Axway team get delivery from WebLiv or S3

Page 51: From ci to cd

| © 2012 Axway | All rights reserved. 51

Tomorrow Continuous Delivery

•  On demand delivery via QA/Project Manager

Page 52: From ci to cd

Tomorrow Continuous Packaging

| © 2012 Axway | All rights reserved. 52

•  Native packages continuous production –  For developpers usage –  For QA usage –  For Cloud Factory usage –  For Ops usage

Page 53: From ci to cd

Tomorrow On Demand Deployment

•  On Demand Deployment (ie: QA on Internal Releases)

| © 2012 Axway | All rights reserved. 53

Page 54: From ci to cd

Tomorrow Applicances Builder Feeding

| © 2012 Axway | All rights reserved. 54

•  Appliance Builder feeded with native packages –  Turn Appliances builder in Appliances Factory –  From source to VMWare appliances –  From source to EC2 AMIs

Page 55: From ci to cd

Native Packaging

Page 56: From ci to cd

| © 2012 Axway | All rights reserved. 56

Native Packaging Situation

•  Widely used in Unix world •  Componentisation approach •  Runtime dependencies aware •  Powerfull life-cycle support •  Web based packages repositories for

modern delivery

Page 57: From ci to cd

| © 2012 Axway | All rights reserved. 57

Native Packaging Bonus

•  Quicker bootstrap for customers on their own systems

•  Customers Ops Teams may use them as regular packages

•  Help create VM images or appliances with up to date products

•  Help update products in existing VM images/appliances

•  Faster install/update process for customers •  Perfectly suited for Cloud Operations