SlideShare uma empresa Scribd logo
1 de 33
Continuous Integration



Adin Scannell
CTO, Gridcentric
adin@gridcentric.com
WHO AM I?


• Adin Scannell – Co-founder & CTO, Gridcentric.
• Systems and virtualization guy.
• Responsible for technology vision
  • (and the most annoying bugs).
• Email: adin@gridcentric.com
What’s continuous integration?
Classic “waterfall”




                      4
5
%#@$!
        %#@$!
                %#@$!
Minimize time between phases
(and “distance” between developers)



      Integrate continuously



         Test continuously
“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. Many teams find that this
approach leads to significantly reduced integration problems
and allows a team to develop cohesive software more
rapidly.”
                                                 - Martin Fowler
Continuous Integration


Does require             Does not require
• Source control         • Constant releases
• Automated builds          • (i.e. continuous delivery)

• Automated tests        • No manual testing
                         • “Operations/Infrastructure as code”
                         • Agile, Scrum or Kanban
Source control
Commit early and often (develop incrementally)


Branch (when necessary) for features, releases



   Perform integration across all branches
Source control tools

• Distributed: git, hg, bzr, bitkeeper, etc.
• “Classic”: cvs, svn, etc.




• A good branching and tagging strategy is important.
Build automation
Build every commit, or as frequently as possible


Have a consistent and easily replicable environment



   Build all branches, or build from staging repos
Build tools

• The one true tool: Make

• Alternatives: Ant, mvn, scons
• On Windows: Visual Studio platform or Cmake




• Not a good build tool: your IDE
Test automation
Types: unit testing,
             component testing,
              coverage testing,
      system and integration testing,
       installation verification testing

 Purposes: smoke tests, regression tests,
    usability tests, performance tests,
     security tests, acceptance tests

Methodologies: whitebox, blackbox, greybox
More tests are better, but figure out
   what you delivers the most value to you.

              When in doubt…..




Great idea: gate your main branches with tests.
Test tools

•   Web: selenium
•   C/C++: check, cunit, cppunit
•   Python: pytest, nosetests
•   Ruby: cucumber, rspec
•   And lots more…




• Test frameworks are like a$$holes…
Continuous integration
Ties together builds and tests


 Archives artifacts, test results, build logs, etc.



         Automates triggers, pipelines



Allows for gating of merges, staging of changes
Continuous integration tools

•   Jenkins (Hudson)
•   TravisCI
•   Cruise Control
•   TeamCity
•   Buildbot
•   Bamboo
•   Team Foundation Server

• Gerrit (reviews)
WORKFLOW
OpenStack (& Gridcentric) CI Workflow

                                             4) Jenkins builds and
                                             tests change                                    8) Jenkins pulls
                                             (triggered)                                     from github, builds,
                        Gerrit                                           Jenkins
                                                                                             tests and publishes
                                             5) Jenkins updates
                                             changeset on Gerrit




  3) Developer pushes         7) On approval                         6) Another developer
  changeset to Gerrit         Gerrit merges and                      reviews the changeset
                              pushes to github

                                                  github
                        1) Developer pulls
                        from github


  2) Developer writes
  and tests code
How does openstack help me?
OpenStack cloud

OpenStack CI Workflow
                                                                                                  Test
                                                  Test                                            VM
                                                                                 Test
                                                  VM
                                                                   Test          VM
                                                                   VM

                                                   Test                            Build
                                                    VM                              VM
                                             4) Jenkins builds and Build
                                             tests change           VM                         8) Jenkins pulls
                                             (triggered)                                       from github, builds,
                        Gerrit                                             Jenkins
                                                                                               tests and publishes
                                             5) Jenkins updates
                                             changeset on Gerrit




  3) Developer pushes         7) On approval                           6) Another developer
  changeset to Gerrit         Gerrit merges and                        reviews the changeset
                              pushes to github

                                                  github
                        1) Developer pulls
                        from github


  2) Developer writes
  and tests code
Advanced continuous integration

• Leverage OpenStack to provide infrastructure.
  • Build slaves, test slaves, infrastructure dependencies.


• Structure continuous integration tests as:
  • Boot a base OpenStack image.
  • Provision software using tool like Puppet / Chef.
  • Run full tests.

• The same standardize procedures can be used to
  stand up production environments.
Continuous delivery
Discussion questions

•   Where is continuous integration easiest? Hardest?
•   Which tests (unit/component/system) are critical?
•   What are the biggest wins from CI?
•   What are your favorite tools?
•   How do you set a release cadence?
•   How are larger features incorporated?

Mais conteúdo relacionado

Mais procurados

Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICDKnoldus Inc.
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101Hazzim Anaya
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins IntroductionPavan Gupta
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CDHoang Le
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps JourneyDevOps.com
 
Transforming Organizations with CI/CD
Transforming Organizations with CI/CDTransforming Organizations with CI/CD
Transforming Organizations with CI/CDCprime
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With CypressKnoldus Inc.
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIDavid Hahn
 
Flusso Continuous Integration & Continuous Delivery
Flusso Continuous Integration & Continuous DeliveryFlusso Continuous Integration & Continuous Delivery
Flusso Continuous Integration & Continuous DeliveryJoost van der Griendt
 

Mais procurados (20)

Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins Introduction
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps Journey
 
Jenkins
JenkinsJenkins
Jenkins
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
devops
devops devops
devops
 
Jenkins
JenkinsJenkins
Jenkins
 
Transforming Organizations with CI/CD
Transforming Organizations with CI/CDTransforming Organizations with CI/CD
Transforming Organizations with CI/CD
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
 
Jenkins CI presentation
Jenkins CI presentationJenkins CI presentation
Jenkins CI presentation
 
"DevOps > CI+CD "
"DevOps > CI+CD ""DevOps > CI+CD "
"DevOps > CI+CD "
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
Flusso Continuous Integration & Continuous Delivery
Flusso Continuous Integration & Continuous DeliveryFlusso Continuous Integration & Continuous Delivery
Flusso Continuous Integration & Continuous Delivery
 

Semelhante a Continuous integration

Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayContinuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayLeonard Fingerman
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developerAbe Diaz
 
Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009sstolberg
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdfMahmoudAlnmr1
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Alm 4 Azure with screenshots
Alm 4 Azure with screenshotsAlm 4 Azure with screenshots
Alm 4 Azure with screenshotsClemens Reijnen
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevillePromet Source
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Anton Arhipov
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsTomohide Kakeya
 
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
Jenkins - Continuous Integration after Hudson, CruiseControl, and home builtJenkins - Continuous Integration after Hudson, CruiseControl, and home built
Jenkins - Continuous Integration after Hudson, CruiseControl, and home builtMark Waite
 
How to push to production a project with 100+ plugins in less than 10 minutes
How to push to production a project with 100+ plugins in less than 10 minutes How to push to production a project with 100+ plugins in less than 10 minutes
How to push to production a project with 100+ plugins in less than 10 minutes Thiago Leão Moreira
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonVladLica
 
Continuous Integration as a Way of Life
Continuous Integration as a Way of LifeContinuous Integration as a Way of Life
Continuous Integration as a Way of LifeMelissa Benua
 
Grooving with Jenkins
Grooving with JenkinsGrooving with Jenkins
Grooving with JenkinsAnton Weiss
 

Semelhante a Continuous integration (20)

Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayContinuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developer
 
Jenkins & IaC
Jenkins & IaCJenkins & IaC
Jenkins & IaC
 
Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Alm 4 Azure with screenshots
Alm 4 Azure with screenshotsAlm 4 Azure with screenshots
Alm 4 Azure with screenshots
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in Asheville
 
Alm 4 Azure
Alm 4 AzureAlm 4 Azure
Alm 4 Azure
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012
 
Jenkins for One
Jenkins for OneJenkins for One
Jenkins for One
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
Jenkins - Continuous Integration after Hudson, CruiseControl, and home builtJenkins - Continuous Integration after Hudson, CruiseControl, and home built
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
 
How to push to production a project with 100+ plugins in less than 10 minutes
How to push to production a project with 100+ plugins in less than 10 minutes How to push to production a project with 100+ plugins in less than 10 minutes
How to push to production a project with 100+ plugins in less than 10 minutes
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
 
Continuous Integration as a Way of Life
Continuous Integration as a Way of LifeContinuous Integration as a Way of Life
Continuous Integration as a Way of Life
 
Contineous integration
Contineous integrationContineous integration
Contineous integration
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Grooving with Jenkins
Grooving with JenkinsGrooving with Jenkins
Grooving with Jenkins
 

Último

Introduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxIntroduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxmprakaash5
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Memoori
 
A PowerPoint Presentation on Vikram Lander pptx
A PowerPoint Presentation on Vikram Lander pptxA PowerPoint Presentation on Vikram Lander pptx
A PowerPoint Presentation on Vikram Lander pptxatharvdev2010
 
Dynamical Context introduction word sensibility orientation
Dynamical Context introduction word sensibility orientationDynamical Context introduction word sensibility orientation
Dynamical Context introduction word sensibility orientationBuild Intuit
 
Transport in Open Pits______SM_MI10415MI
Transport in Open Pits______SM_MI10415MITransport in Open Pits______SM_MI10415MI
Transport in Open Pits______SM_MI10415MIRomil Mishra
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Dublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxDublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxKunal Gupta
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Software Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerSoftware Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerAnchore
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 

Último (20)

Introduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxIntroduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptx
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!
 
A PowerPoint Presentation on Vikram Lander pptx
A PowerPoint Presentation on Vikram Lander pptxA PowerPoint Presentation on Vikram Lander pptx
A PowerPoint Presentation on Vikram Lander pptx
 
Dynamical Context introduction word sensibility orientation
Dynamical Context introduction word sensibility orientationDynamical Context introduction word sensibility orientation
Dynamical Context introduction word sensibility orientation
 
Transport in Open Pits______SM_MI10415MI
Transport in Open Pits______SM_MI10415MITransport in Open Pits______SM_MI10415MI
Transport in Open Pits______SM_MI10415MI
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Dublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxDublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptx
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Software Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerSoftware Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey Hightower
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 

Continuous integration

  • 1. Continuous Integration Adin Scannell CTO, Gridcentric adin@gridcentric.com
  • 2. WHO AM I? • Adin Scannell – Co-founder & CTO, Gridcentric. • Systems and virtualization guy. • Responsible for technology vision • (and the most annoying bugs). • Email: adin@gridcentric.com
  • 5. 5
  • 6. %#@$! %#@$! %#@$!
  • 7. Minimize time between phases (and “distance” between developers) Integrate continuously Test continuously
  • 8.
  • 9. “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. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.” - Martin Fowler
  • 10. Continuous Integration Does require Does not require • Source control • Constant releases • Automated builds • (i.e. continuous delivery) • Automated tests • No manual testing • “Operations/Infrastructure as code” • Agile, Scrum or Kanban
  • 12. Commit early and often (develop incrementally) Branch (when necessary) for features, releases Perform integration across all branches
  • 13. Source control tools • Distributed: git, hg, bzr, bitkeeper, etc. • “Classic”: cvs, svn, etc. • A good branching and tagging strategy is important.
  • 14.
  • 16. Build every commit, or as frequently as possible Have a consistent and easily replicable environment Build all branches, or build from staging repos
  • 17. Build tools • The one true tool: Make • Alternatives: Ant, mvn, scons • On Windows: Visual Studio platform or Cmake • Not a good build tool: your IDE
  • 19. Types: unit testing, component testing, coverage testing, system and integration testing, installation verification testing Purposes: smoke tests, regression tests, usability tests, performance tests, security tests, acceptance tests Methodologies: whitebox, blackbox, greybox
  • 20. More tests are better, but figure out what you delivers the most value to you. When in doubt….. Great idea: gate your main branches with tests.
  • 21. Test tools • Web: selenium • C/C++: check, cunit, cppunit • Python: pytest, nosetests • Ruby: cucumber, rspec • And lots more… • Test frameworks are like a$$holes…
  • 23. Ties together builds and tests Archives artifacts, test results, build logs, etc. Automates triggers, pipelines Allows for gating of merges, staging of changes
  • 24. Continuous integration tools • Jenkins (Hudson) • TravisCI • Cruise Control • TeamCity • Buildbot • Bamboo • Team Foundation Server • Gerrit (reviews)
  • 25.
  • 26.
  • 28. OpenStack (& Gridcentric) CI Workflow 4) Jenkins builds and tests change 8) Jenkins pulls (triggered) from github, builds, Gerrit Jenkins tests and publishes 5) Jenkins updates changeset on Gerrit 3) Developer pushes 7) On approval 6) Another developer changeset to Gerrit Gerrit merges and reviews the changeset pushes to github github 1) Developer pulls from github 2) Developer writes and tests code
  • 29. How does openstack help me?
  • 30. OpenStack cloud OpenStack CI Workflow Test Test VM Test VM Test VM VM Test Build VM VM 4) Jenkins builds and Build tests change VM 8) Jenkins pulls (triggered) from github, builds, Gerrit Jenkins tests and publishes 5) Jenkins updates changeset on Gerrit 3) Developer pushes 7) On approval 6) Another developer changeset to Gerrit Gerrit merges and reviews the changeset pushes to github github 1) Developer pulls from github 2) Developer writes and tests code
  • 31. Advanced continuous integration • Leverage OpenStack to provide infrastructure. • Build slaves, test slaves, infrastructure dependencies. • Structure continuous integration tests as: • Boot a base OpenStack image. • Provision software using tool like Puppet / Chef. • Run full tests. • The same standardize procedures can be used to stand up production environments.
  • 33. Discussion questions • Where is continuous integration easiest? Hardest? • Which tests (unit/component/system) are critical? • What are the biggest wins from CI? • What are your favorite tools? • How do you set a release cadence? • How are larger features incorporated?

Notas do Editor

  1. Classical waterfall model. Doesn’t *really* exist in practice. All phases are necessary important pieces of the software development process.
  2. Problem is that the longer you wait or the more you build up between phases, the more risk you take on.
  3. In reality, you’ve always got a back arrow to all the previous steps. A poor design decision could come out in integration or test, forcing you to go back.
  4. Key insights
  5. Key insights
  6. Key insights
  7. Key insights
  8. Key insights
  9. Key insights