André Agostinho - Software Engineer
Cloud Continuous
Integration
andre@magnadev.com.br
A distributed approach using distinct services
aragostinho.github.io
in/andre-rocha-agostinho/
Timing
How long would it take your organization to deploy a change that
involves just one single line of code?
Cycle time
Lead time
Bill Gross
“The ideal matters a lot. But timing matters more.” Bill Gross
Timing
EDC Research – 2013
https://www.perforce.com/pdf/continuous-delivery-report.pdf
https://medium.com/netflix-techblog/multi-cloud-continuous-delivery-with-spinnaker-report-now-available-6040ba83b765
On the Rise
Continuous
Integration
Continuous
Delivery
Continuous
Deployment
Devops
Build
Deploy
Tests
Pipeline Artifact
Questions
Frustrations
Planning
Reasons
- 3Cs Misunderstanding
- CI/CDs Benefits
- Pipeline Architecture
- Scaling Pipelines
- Technical Demo
- Concluding Remarks
Topics
1. Continuous Integration
2. Continuous Delivery
3. Continuous Deployment
3Cs Misunderstanding
Agile Development
Agile software development describes an approach to
software development under which requirements and
solutions evolve through the collaborative effort of
self-organizing and cross-functional teams and their
customer(s)/end user(s).
The Agile Manifesto Meeting
“Our highest priority is to satisfy the
customer through early and continuous
delivery of valuable software.”
12 practices
1.Continuous integration
2.Refactoring
3.Small releases
4.Collective code ownership
5.Test-driven development
6.Pair programing
7.Planning game
8.Extreme programming practices
9.Coding standards
10.Simple design
11.Simple metaphor
12.Sustainable pace Kent Beck
Extreme Programming
12 practices
1.Continuous integration
2.Refactoring
3.Small releases
4.Collective code ownership
5.Test-driven development
6.Pair programing
7.Planning game
8.Extreme programming practices
9.Coding standards
10.Simple design
11.Simple metaphor
12.Sustainable pace Kent Beck
Extreme Programming
Continuous Integration
“Continuous Integration is a software development practice where members of a team integrate their work
frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each
integration is verified by an automated build (including test) to detect integration errors as quickly as possible”
(Fowler, 2006)
Continuous Delivery
“Continuous delivery is an extension of continuous integration to make sure that you can release new
changes to your customers quickly in a sustainable way. This means that on top of having automated your
testing, you also have automated your release process and you can deploy your application at any point of
time by clicking on a button.”
(Sten Pittet, Atlassian)
“Continuous Delivery is a software development discipline where you build software in such a way that the
software can be released to production at any time.”
(Fowler, 2007)
“Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.”
(Agile Manifesto, 2001)
Continuous Delivery
Backlog
Feature 1
Feature 2
Feature 3
Feature 4
Commit 1
Commit 2
Commit 3
Commit 4
Repository
Customers
Devops Engineer / Developers
Developers
Continuous Deployment
“Continuous deployment goes one step further than continuous delivery. With this practice, every change that
passes all stages of your production pipeline is released to your customers. There's no human intervention, and
only a failed test will prevent a new change to be deployed to production.”
(Sten Pittet, Atlassian)
Continuous deployment:
Multiple products deployed to multiple customers at multiple platform.
Agent (Robot)
Release
Targets
Server1 Server2 Server3
Server
N
...
DEPLOY
Agent (Robot)
Backlog
Feature 1
Feature 2
Feature 3
Feature 4
Commit 1
Commit 2
Commit 3
Commit 4
Repository
Customers
Developers
CONTINUOUS
DEPLOY
Continuous Deployment
Overview
Continuous Integration Benefits
"On the whole I think the
greatest and most wide
ranging benefit of Continuous
Integration is reduced risk"
Martin Fowler
Repeat
Reduce risk
Continuous Delivery Benefits
Reduce Lead Time
•Earlier return on investment for each feature after it is developed.
•Earlier feedback from users on each new feature as it is released to production .
Continuous Deployment Benefits
Reduce operation
• Eliminate DIY for Continuous.
• Automate the repetitive tasks.
• Scale from a single application to
an Enterprise IT portfolio.
• Connect your existing tools and
technologies into a harmonious
workflow.
• Integrate teams and processes
with a unified pipeline.
Pipeline Architecture
Pipelines are deployable unit path for CI and CD.
https://dzone.com/articles/the-anatomy-of-a-release-pipeline
Stages are the control points in pipeline with tasks that are triggered.
Pipeline Architecture
Triggers are events configured in each stage.
Manually, automatically (on demand) or scheduled
Pipeline Architecture
Tasks are the things that actually get done
Tasks Tasks Tasks Tasks Tasks Tasks Tasks
Ex: Infrastructure provisioning, Infrastructure shutdown,
Application deployment, Testing, etc.
Pipeline Architecture
Artifacts are available packaged software for deployment
The artifact store is a set of artifacts
for a single build.
Artifact
Artifact
Store
Pipeline Architecture
Execution Engine is an agent that execute the pipeline workflow.
Metadata Store, Notification Service, Logging
and Configuration Store
Pipeline Architecture
Scaling Pipelines
How to scale a pipeline using distinct services?
Example
Scaling Pipelines
Scaling Pipelines - Planning
• Scope definition
• Reasons
• Goals
• Analysis and Requirements
• Architecture definition
• Cloud platforms
• Services
• Technologies
Proibida cópia ou divulgação sem permissão escrita
do CMG Brasil.
Scaling Pipelines - Planning
• Scope definition
• Reasons
• Goals
• Analysis and Requirements
• Architecture definition
• Cloud platforms
• Services
• Technologies
Proibida cópia ou divulgação sem permissão escrita
do CMG Brasil.
Scaling Pipelines - Planning
• Scope definition
• Reasons
• Goals
• Analysis and Requirements
• Architecture definition
• Cloud platforms
• Services
• Technologies
Distributed Continuous Delivery Framework
Scope
Cloud platforms
Services
Technologies
Software Products Processes
People or
systems
Scheduling
information
Deployment
Targets
Reasons
WHAT HOW WHO WHEN WHERE WHY
Code
Repository
Build
Pipeline
Build
Agent
Scheduling
Deployment
Artifact
Deployment
Motivation
Repository
Platform
Build
Process Platform
Build
Agent
Platform
Deployment
Schedule
Platform
Deployment
Target Platform
Reasons
Service
repository
Service
build process
Service
build agent
Service
Schedule
Service
Deployment
Reasons
Details of code
repository
Details of build
pipeline
Details of build
agent
Details of
schedule
Details of deploy
configuration
Reasons
Technical Demo
Using DCC Framework
Web App Rocket
Launch
Increased code
with test coverage
with 100% success
Agent (auto) On Demand (auto)
1 server running on
public network
Reduce 30%
time-to-market
Atlassian
Microsoft
Azure
Amazon
Webservices
Microsoft
Azure
Amazon Webservices
Better prices and
full compatibility
Bitbucket
Azure DevOps
Pipeline
AWS EC2 Azure DevOps Pipeline
AWS Code Deploy,
Lambda, S3. EC2
Technical team
decided to abandon
MS Web Deploy in
Build pipeline.
Git
Dotrestore,
Dotnetbuild,
DotnetTest, Npm
Restore /Install
MS agent
Powershell running
on Windows 2016
Pipeline Triggers
listening
repository
Lambda Triggers in
Node.JS, YML file,
Code deploy Agent
running on Windows
2016
Experts in the
Technical team.
Scalability and
better performance.
Scope
Cloud platforms
Services
Technologies
WHAT HOW WHO WHEN WHERE WHY
Code
Repository
Build
Pipeline
Build
Agent
Scheduling
Deployment
Artifact
Deployment
Motivation
Running PoC
Proibida cópia ou divulgação sem permissão escrita
do CMG Brasil.
Code Repository
Proibida cópia ou divulgação sem permissão escrita
do CMG Brasil.
Pipeline (Get code / Restore / Build / Tests)
Proibida cópia ou divulgação sem permissão escrita
do CMG Brasil.
Proibida cópia ou divulgação sem permissão escrita
do CMG Brasil.
Pipeline (Get Artifact / Deploy Server)
Proibida cópia ou divulgação sem permissão escrita
do CMG Brasil.
Web published
Visualizing the process
Atlassian
Bitbucket
AWS
EC2
Azure
DevOps
AWS
Lambda
AWS
CodeDepoy
AWS
S3
Get codes
Send code to Build Agent
Retrieve artifact (if sucess)
Send artifact to S3
Compress Artifact
AWS
EC2
Lambda listened
from S3
Notify team (email) if sucess or fail
Clean up
Codeploy gets artifact from S3
Codeploy deploys
the artifact in EC2
Webpage
On line
Commit and push
Build Agent
DotRestore
DotnetBuild
DotnetTest
Publish Artifact
Listening repository and active triggers
Triggers Lambda .Node JS
Lambda call
CodeDeploy
Deploy Agent
YML file
Code deploy Agent
Deploy (.YML Steps / Powershell)
Concluding remarks
• Ensure good planning
• Work with experts
• Track business value
• Change is difficult
• Automation is the key
• Continuous Delivery is the goal
That’s all folks!
andre@magnadev.com.br
aragostinho.github.io
in/andre-rocha-agostinho/
Doubts? Reach me!
André Agostinho

Cloud continuous integration- A distributed approach using distinct services

  • 1.
    André Agostinho -Software Engineer Cloud Continuous Integration andre@magnadev.com.br A distributed approach using distinct services aragostinho.github.io in/andre-rocha-agostinho/
  • 2.
    Timing How long wouldit take your organization to deploy a change that involves just one single line of code? Cycle time Lead time
  • 3.
    Bill Gross “The idealmatters a lot. But timing matters more.” Bill Gross Timing
  • 4.
    EDC Research –2013 https://www.perforce.com/pdf/continuous-delivery-report.pdf
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
    - 3Cs Misunderstanding -CI/CDs Benefits - Pipeline Architecture - Scaling Pipelines - Technical Demo - Concluding Remarks Topics
  • 11.
    1. Continuous Integration 2.Continuous Delivery 3. Continuous Deployment 3Cs Misunderstanding
  • 12.
    Agile Development Agile softwaredevelopment describes an approach to software development under which requirements and solutions evolve through the collaborative effort of self-organizing and cross-functional teams and their customer(s)/end user(s). The Agile Manifesto Meeting “Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.”
  • 13.
    12 practices 1.Continuous integration 2.Refactoring 3.Smallreleases 4.Collective code ownership 5.Test-driven development 6.Pair programing 7.Planning game 8.Extreme programming practices 9.Coding standards 10.Simple design 11.Simple metaphor 12.Sustainable pace Kent Beck Extreme Programming
  • 14.
    12 practices 1.Continuous integration 2.Refactoring 3.Smallreleases 4.Collective code ownership 5.Test-driven development 6.Pair programing 7.Planning game 8.Extreme programming practices 9.Coding standards 10.Simple design 11.Simple metaphor 12.Sustainable pace Kent Beck Extreme Programming
  • 15.
    Continuous Integration “Continuous Integrationis a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible” (Fowler, 2006)
  • 16.
    Continuous Delivery “Continuous deliveryis an extension of continuous integration to make sure that you can release new changes to your customers quickly in a sustainable way. This means that on top of having automated your testing, you also have automated your release process and you can deploy your application at any point of time by clicking on a button.” (Sten Pittet, Atlassian) “Continuous Delivery is a software development discipline where you build software in such a way that the software can be released to production at any time.” (Fowler, 2007) “Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.” (Agile Manifesto, 2001)
  • 17.
    Continuous Delivery Backlog Feature 1 Feature2 Feature 3 Feature 4 Commit 1 Commit 2 Commit 3 Commit 4 Repository Customers Devops Engineer / Developers Developers
  • 18.
    Continuous Deployment “Continuous deploymentgoes one step further than continuous delivery. With this practice, every change that passes all stages of your production pipeline is released to your customers. There's no human intervention, and only a failed test will prevent a new change to be deployed to production.” (Sten Pittet, Atlassian) Continuous deployment: Multiple products deployed to multiple customers at multiple platform. Agent (Robot) Release Targets Server1 Server2 Server3 Server N ... DEPLOY
  • 19.
    Agent (Robot) Backlog Feature 1 Feature2 Feature 3 Feature 4 Commit 1 Commit 2 Commit 3 Commit 4 Repository Customers Developers CONTINUOUS DEPLOY Continuous Deployment
  • 20.
  • 21.
    Continuous Integration Benefits "Onthe whole I think the greatest and most wide ranging benefit of Continuous Integration is reduced risk" Martin Fowler Repeat Reduce risk
  • 22.
    Continuous Delivery Benefits ReduceLead Time •Earlier return on investment for each feature after it is developed. •Earlier feedback from users on each new feature as it is released to production .
  • 23.
    Continuous Deployment Benefits Reduceoperation • Eliminate DIY for Continuous. • Automate the repetitive tasks. • Scale from a single application to an Enterprise IT portfolio. • Connect your existing tools and technologies into a harmonious workflow. • Integrate teams and processes with a unified pipeline.
  • 24.
    Pipeline Architecture Pipelines aredeployable unit path for CI and CD. https://dzone.com/articles/the-anatomy-of-a-release-pipeline
  • 25.
    Stages are thecontrol points in pipeline with tasks that are triggered. Pipeline Architecture
  • 26.
    Triggers are eventsconfigured in each stage. Manually, automatically (on demand) or scheduled Pipeline Architecture
  • 27.
    Tasks are thethings that actually get done Tasks Tasks Tasks Tasks Tasks Tasks Tasks Ex: Infrastructure provisioning, Infrastructure shutdown, Application deployment, Testing, etc. Pipeline Architecture
  • 28.
    Artifacts are availablepackaged software for deployment The artifact store is a set of artifacts for a single build. Artifact Artifact Store Pipeline Architecture
  • 29.
    Execution Engine isan agent that execute the pipeline workflow. Metadata Store, Notification Service, Logging and Configuration Store Pipeline Architecture
  • 30.
    Scaling Pipelines How toscale a pipeline using distinct services?
  • 31.
  • 32.
    Scaling Pipelines -Planning • Scope definition • Reasons • Goals • Analysis and Requirements • Architecture definition • Cloud platforms • Services • Technologies
  • 33.
    Proibida cópia oudivulgação sem permissão escrita do CMG Brasil. Scaling Pipelines - Planning • Scope definition • Reasons • Goals • Analysis and Requirements • Architecture definition • Cloud platforms • Services • Technologies
  • 34.
    Proibida cópia oudivulgação sem permissão escrita do CMG Brasil. Scaling Pipelines - Planning • Scope definition • Reasons • Goals • Analysis and Requirements • Architecture definition • Cloud platforms • Services • Technologies
  • 35.
    Distributed Continuous DeliveryFramework Scope Cloud platforms Services Technologies Software Products Processes People or systems Scheduling information Deployment Targets Reasons WHAT HOW WHO WHEN WHERE WHY Code Repository Build Pipeline Build Agent Scheduling Deployment Artifact Deployment Motivation Repository Platform Build Process Platform Build Agent Platform Deployment Schedule Platform Deployment Target Platform Reasons Service repository Service build process Service build agent Service Schedule Service Deployment Reasons Details of code repository Details of build pipeline Details of build agent Details of schedule Details of deploy configuration Reasons
  • 36.
  • 37.
    Using DCC Framework WebApp Rocket Launch Increased code with test coverage with 100% success Agent (auto) On Demand (auto) 1 server running on public network Reduce 30% time-to-market Atlassian Microsoft Azure Amazon Webservices Microsoft Azure Amazon Webservices Better prices and full compatibility Bitbucket Azure DevOps Pipeline AWS EC2 Azure DevOps Pipeline AWS Code Deploy, Lambda, S3. EC2 Technical team decided to abandon MS Web Deploy in Build pipeline. Git Dotrestore, Dotnetbuild, DotnetTest, Npm Restore /Install MS agent Powershell running on Windows 2016 Pipeline Triggers listening repository Lambda Triggers in Node.JS, YML file, Code deploy Agent running on Windows 2016 Experts in the Technical team. Scalability and better performance. Scope Cloud platforms Services Technologies WHAT HOW WHO WHEN WHERE WHY Code Repository Build Pipeline Build Agent Scheduling Deployment Artifact Deployment Motivation
  • 38.
  • 39.
    Proibida cópia oudivulgação sem permissão escrita do CMG Brasil. Code Repository
  • 40.
    Proibida cópia oudivulgação sem permissão escrita do CMG Brasil. Pipeline (Get code / Restore / Build / Tests)
  • 41.
    Proibida cópia oudivulgação sem permissão escrita do CMG Brasil. Proibida cópia ou divulgação sem permissão escrita do CMG Brasil. Pipeline (Get Artifact / Deploy Server)
  • 42.
    Proibida cópia oudivulgação sem permissão escrita do CMG Brasil. Web published
  • 43.
    Visualizing the process Atlassian Bitbucket AWS EC2 Azure DevOps AWS Lambda AWS CodeDepoy AWS S3 Getcodes Send code to Build Agent Retrieve artifact (if sucess) Send artifact to S3 Compress Artifact AWS EC2 Lambda listened from S3 Notify team (email) if sucess or fail Clean up Codeploy gets artifact from S3 Codeploy deploys the artifact in EC2 Webpage On line Commit and push Build Agent DotRestore DotnetBuild DotnetTest Publish Artifact Listening repository and active triggers Triggers Lambda .Node JS Lambda call CodeDeploy Deploy Agent YML file Code deploy Agent
  • 44.
    Deploy (.YML Steps/ Powershell)
  • 45.
    Concluding remarks • Ensuregood planning • Work with experts • Track business value • Change is difficult • Automation is the key • Continuous Delivery is the goal
  • 46.