Senior Lead Solutions Engineer - Solutions Architecture,
WSO2
Continuous Integration, Delivery and
Deployment: Accelerate Innovation and
Drive Business Results
Dakshitha Ratnayake
What Exactly is Digital Transformation?
The realignment of, or
new investment in,
technology and business
models to more
effectively engage digital
customers at every
touchpoint in the
customer experience
lifecycle
@BRIANSOLIS
“If it takes you years to create a bad-looking, outdated
application, while startups adapt to market needs in a matter of
weeks or months, you can guess who will win this race” –
digitaltransformationbook.com
Why a Devops Approach is Critical to Achieve
Digital Transformation
DevOps helps to
• Increase collaboration
between departments
• Increase deployment
frequency
• Improve quality
• Reduce cost on
development and
operations
Success Stories
What Do They Do Differently?
• Agile development
• Deploying smaller
changes frequently
• React fast – faster
feedback from real users
In devops, the entire process cycle is automated to
achieve continuous integration, continuous delivery
and continuous deployment.
Continuous Integration
• Integrate code early and often to the main
branch or code repository
• Goal: Reduce the risk of seeing “integration
hell”
• Getting started: Setting up automated testing
Continuous Integration (CI)
1. Write tests
2. CI service to run tests automatically on every commit.
3. Integrate changes everyday.
4. Fix the build if broken.
5. Write tests for every new story
CI in 5 Steps
Code Build
Static
Code
Analysis
Unit
Tests
Code
Coverage
Analysis
Deploy
to
Staging
Acceptance
Test
Integration
Test
Auto Auto Auto Auto Auto Auto Auto
Continuous Delivery
• Making sure your code is always ready to release -
even if you are not deploying every change to
production
• Goal: Ship changes to customers early and often
• Getting started: Having a good CI culture in place and
set up continuous delivery pipeline.
Continuous Delivery (CD)
• Focus on releasing smaller bits frequently
• Easy to localize cause of problems
• Fail fast and fix fast
• Fewer defects
• Shorter defect lifespan
Releasing Smaller Bits Faster
A Simple Release Flow
Continuous Integration
Code Build
Static
Code
Analysis
Unit
Tests
Deploy
to
Staging
Acceptance
Test
Integration
Test
Auto Auto Auto Auto Auto Auto Auto
Code
Coverage
AnalysisCode Build
Static
Code
Analysis
Unit
Tests
Deploy
to
Staging
Acceptance
Test
Integration
Test
Auto Auto Auto Auto Auto Auto Auto
Code
Coverage
Analysis
Code Build
Static
Code
Analysis
Unit Tests
Code
Coverage
Analysis
Integration
Tests
Deploy to
Staging
Acceptance
Test
Deploy to
ProductionAuto Auto Auto Auto Auto Auto Auto Manual
Continuous Delivery
Continuous Deployment
• New changes pushed to the repository are
automatically deployed to production if they
pass the tests
• A radical approach
• Getting started: Having a good Continuous
Delivery culture in place
Continuous Deployment
Continuous Delivery vs
Continuous Deployment
Continuous Delivery
Continuous Deployment
Code Build
Static
Code
Analysis
Unit Tests
Code
Coverage
Analysis
Integration
Tests
Deploy to
Staging
Acceptance
Test
Deploy to
ProductionAuto Auto Auto Auto Auto Auto Auto Manual
Code Build
Static
Code
Analysis
Unit Tests
Code
Coverage
Analysis
Integrati
on Tests
Deploy to
Staging
Acceptance
Test
Deploy to
ProductionAuto Auto Auto Auto Auto Auto Auto Auto
Feedback Loop
• Feature
suggestions
• Performance and
usage monitoring
• Business use
cases
CI/CD With WSO2
• An organization may have an existing CI/CD
process
• WSO2 product-related development must
align with the existing CI/CD process
• Software delivery would need to include both
WSO2 middleware and application changes
CI/CD for WSO2 Products
Things To Consider
• Solution and deployment
architecture
• Infrastructure
• Configurations
• Extensions and external
libraries
• Tools
• CI/CD pipelines for
deployable artifacts
• Product updates
CI/CD Tools Landscape
Image: http://www.jamesbowman.me/post/continuous-delivery-tool-landscape/?ref=quuu&utm_content=buffer70d94&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer
WSO2 CI/CD Pipelines – An Example
Dev
Pipeline
Staging
Pipeline
Production
Pipeline
Trigger
Staging
Pipeline
Trigger
Production
Pipeline
Dev Pipeline
Commit
Changes to
Source Control
Repository
Maven Multi
Module Project
Polls SCM /
Web Hooks /
Trigger Dev
Pipeline
Create Dev
CAR File
Deploy CAR
File to Dev
WSO2
Server
Functional
Tests
Integration
Tests
Developer IDE
Source
Repository CI Tool Auto Build Automated TestsAuto Deploy
Staging Pipeline
Checkout
Maven Multi
Module
Project
Trigger Test
Pipeline
Create Test
CAR File
Deploy to
Artifact Sync
Folder
Deploy CAR
File to Test
WSO2 Server
Cluster
Integration and
Functional
Test
Performance
Tests
CI Tool
Source
Repository Auto Build
Deployment
Synchronization Auto Deploy Automated Tests
Production Pipeline
Checkout
Maven Multi
Module Project
Create Prod
CAR File
Deploy to
Artifact Sync
Folder
Deploy to
Production
WSO2 Server
Cluster
Smoke Tests
Trigger
Production
Pipeline
CI / CD Tool Source Repository Auto Build
Deployment
Synchronization Auto Deploy Tests
WSO2 Update Pipeline
= WSO2 Update Manager
• A command-line utility
• Allows to get the latest updates available for a
particular product release
Download
WUM Client
Select Products
to Update
Check if Any
Updates are
Available
Get Updates
Push Updates to
Environments
Rolling Out Updates
Run WUM
Tool
Use Updated
Product
Configure and
Deploy
Product(s)
Deploy to
Artifact Sync
Folder
Get Updated
Product
Get Config
Data from
SCM
Get Deployable
Artifacts from
SCM
CAR / JAR
Deploy to
Production
WSO2 Server
Instances
CM Tool
WSO2 Update
Manager
Updated
Product
Source
Repository
Source
Repository
Deployment
Synchronization
• To truly embrace digital transformation,
adopting the ‘continuouses’ is no longer a
‘nice-to-have’
• With CI,CD and CD, you can transform and
accelerate the software delivery pipeline
• Speed to market can break a company or
enable it to survive and thrive into the future
Summary
Because it’s About Creating and Delivering
Amazing Experiences …
Related Talks
Devops Track - Tuesday
wso2.com

[WSO2Con EU 2017] Continuous Integration, Delivery and Deployment: Accelerate Innovation and Drive Business Results

  • 1.
    Senior Lead SolutionsEngineer - Solutions Architecture, WSO2 Continuous Integration, Delivery and Deployment: Accelerate Innovation and Drive Business Results Dakshitha Ratnayake
  • 2.
    What Exactly isDigital Transformation? The realignment of, or new investment in, technology and business models to more effectively engage digital customers at every touchpoint in the customer experience lifecycle @BRIANSOLIS
  • 3.
    “If it takesyou years to create a bad-looking, outdated application, while startups adapt to market needs in a matter of weeks or months, you can guess who will win this race” – digitaltransformationbook.com
  • 4.
    Why a DevopsApproach is Critical to Achieve Digital Transformation DevOps helps to • Increase collaboration between departments • Increase deployment frequency • Improve quality • Reduce cost on development and operations
  • 5.
  • 6.
    What Do TheyDo Differently? • Agile development • Deploying smaller changes frequently • React fast – faster feedback from real users
  • 7.
    In devops, theentire process cycle is automated to achieve continuous integration, continuous delivery and continuous deployment.
  • 8.
  • 9.
    • Integrate codeearly and often to the main branch or code repository • Goal: Reduce the risk of seeing “integration hell” • Getting started: Setting up automated testing Continuous Integration (CI)
  • 10.
    1. Write tests 2.CI service to run tests automatically on every commit. 3. Integrate changes everyday. 4. Fix the build if broken. 5. Write tests for every new story CI in 5 Steps Code Build Static Code Analysis Unit Tests Code Coverage Analysis Deploy to Staging Acceptance Test Integration Test Auto Auto Auto Auto Auto Auto Auto
  • 11.
  • 12.
    • Making sureyour code is always ready to release - even if you are not deploying every change to production • Goal: Ship changes to customers early and often • Getting started: Having a good CI culture in place and set up continuous delivery pipeline. Continuous Delivery (CD)
  • 13.
    • Focus onreleasing smaller bits frequently • Easy to localize cause of problems • Fail fast and fix fast • Fewer defects • Shorter defect lifespan Releasing Smaller Bits Faster
  • 14.
    A Simple ReleaseFlow Continuous Integration Code Build Static Code Analysis Unit Tests Deploy to Staging Acceptance Test Integration Test Auto Auto Auto Auto Auto Auto Auto Code Coverage AnalysisCode Build Static Code Analysis Unit Tests Deploy to Staging Acceptance Test Integration Test Auto Auto Auto Auto Auto Auto Auto Code Coverage Analysis Code Build Static Code Analysis Unit Tests Code Coverage Analysis Integration Tests Deploy to Staging Acceptance Test Deploy to ProductionAuto Auto Auto Auto Auto Auto Auto Manual Continuous Delivery
  • 15.
  • 16.
    • New changespushed to the repository are automatically deployed to production if they pass the tests • A radical approach • Getting started: Having a good Continuous Delivery culture in place Continuous Deployment
  • 17.
    Continuous Delivery vs ContinuousDeployment Continuous Delivery Continuous Deployment Code Build Static Code Analysis Unit Tests Code Coverage Analysis Integration Tests Deploy to Staging Acceptance Test Deploy to ProductionAuto Auto Auto Auto Auto Auto Auto Manual Code Build Static Code Analysis Unit Tests Code Coverage Analysis Integrati on Tests Deploy to Staging Acceptance Test Deploy to ProductionAuto Auto Auto Auto Auto Auto Auto Auto
  • 18.
    Feedback Loop • Feature suggestions •Performance and usage monitoring • Business use cases
  • 19.
  • 20.
    • An organizationmay have an existing CI/CD process • WSO2 product-related development must align with the existing CI/CD process • Software delivery would need to include both WSO2 middleware and application changes CI/CD for WSO2 Products
  • 21.
    Things To Consider •Solution and deployment architecture • Infrastructure • Configurations • Extensions and external libraries • Tools • CI/CD pipelines for deployable artifacts • Product updates
  • 22.
    CI/CD Tools Landscape Image:http://www.jamesbowman.me/post/continuous-delivery-tool-landscape/?ref=quuu&utm_content=buffer70d94&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer
  • 23.
    WSO2 CI/CD Pipelines– An Example
  • 24.
  • 25.
    Dev Pipeline Commit Changes to SourceControl Repository Maven Multi Module Project Polls SCM / Web Hooks / Trigger Dev Pipeline Create Dev CAR File Deploy CAR File to Dev WSO2 Server Functional Tests Integration Tests Developer IDE Source Repository CI Tool Auto Build Automated TestsAuto Deploy
  • 26.
    Staging Pipeline Checkout Maven Multi Module Project TriggerTest Pipeline Create Test CAR File Deploy to Artifact Sync Folder Deploy CAR File to Test WSO2 Server Cluster Integration and Functional Test Performance Tests CI Tool Source Repository Auto Build Deployment Synchronization Auto Deploy Automated Tests
  • 27.
    Production Pipeline Checkout Maven Multi ModuleProject Create Prod CAR File Deploy to Artifact Sync Folder Deploy to Production WSO2 Server Cluster Smoke Tests Trigger Production Pipeline CI / CD Tool Source Repository Auto Build Deployment Synchronization Auto Deploy Tests
  • 28.
  • 29.
    = WSO2 UpdateManager • A command-line utility • Allows to get the latest updates available for a particular product release Download WUM Client Select Products to Update Check if Any Updates are Available Get Updates Push Updates to Environments
  • 30.
    Rolling Out Updates RunWUM Tool Use Updated Product Configure and Deploy Product(s) Deploy to Artifact Sync Folder Get Updated Product Get Config Data from SCM Get Deployable Artifacts from SCM CAR / JAR Deploy to Production WSO2 Server Instances CM Tool WSO2 Update Manager Updated Product Source Repository Source Repository Deployment Synchronization
  • 31.
    • To trulyembrace digital transformation, adopting the ‘continuouses’ is no longer a ‘nice-to-have’ • With CI,CD and CD, you can transform and accelerate the software delivery pipeline • Speed to market can break a company or enable it to survive and thrive into the future Summary
  • 32.
    Because it’s AboutCreating and Delivering Amazing Experiences …
  • 33.
  • 34.