Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
The Tantric Team:
Getting Your Automated
   Build Groove On
     Rik Tamm-Daniels
Build Automation: How to do Bamboo

            Rik Tamm-Daniels
             VP, Engineering
             June 2nd, 2009
About Attivio

 •      Located in Newton, MA
 •      Founded August 2007
 •      45+ Employees
 •      What we do: Unified Information Access




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

What are we building?

 •  Attivioʼs Active Intelligence Engine
          –  Unified Information Access Platform
          –  Query Unstructured and Structured Information with
             the Precision of SQL and the Fuzziness of Search
 •  Shipped Product (OEM and Direct)
          –  Maintenance Release Window at the end of each
             sprint
          –  Minor Release every 3-4 months
          –  Major Releases Every 12-18 months



©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Builds @ Attivio

 •  Automate Everything
 •  Everything builds off of Bamboo
 •  Maintain High-Quality
          –  8000+ Automated Tests
          –  Code coverage using Clover
          –  Static Analysis: Findbugs
 •  Source code insight/Build Failure Investigation
          –  Fisheye



©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Key Product Stats

 •  Our Code Base
          •  100% Java (core product; 95% including add-on
             modules)
          •  Grails
          •  Flex
          •  C++ (3rd Party Code + Wrappers)
 •  Installer (Install4J)
          –  Java based installer
          –  XML configuration + Graphical UI


©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Supported Platforms

 •  Platforms
          –  Linux
          –  Windows
          –  Solaris
          –  32 and 64-bit




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Build System 


 •  ANT
          –  Heavy Use of MacroDefs
          –  Custom Ant Tasks
          –  Custom JUnit Wrappers for Testing
          –  Generalized Model (Maven like Ant Structure)
          –  Heavy use of AntCall and Ant tasks
          –  Top – Level directory build-import.xml defines all the tasks
             that are used by sub-projects
          –  Dependency management MacroDef at top level inherited
             by sub tasks
 •  Source Control
          –  Subversion



©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Attivio Build Directory Structure




                                                                        A=vio




    Common

                        App
              Core
                           Modules
                             Customers
     Installer

   (3rd
Party)




                               Component
      Component

                                                            Module
1
     Module
2
   Module3
   Customer
1
   Customer
2
   Customer
3

                                   1
              2





©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Attivio Build Directory Structure (Cont.)



                                                                                  Component





                                                         build
                                         src
     test





     classes
             dist
               kit
       doc
     clover
   findbugs
     checkstyle
   com
     com





                                                                                                       a=vio
   a=vio





©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Branching Methodology




                                                         Source:
Collabnet




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Branching Methodology

 •  We use the Unstable Branching Strategy
          –  Fits with the agile methodology better that the Agile
             Branching strategy
                    •  No need to deal with too many branches
                    •  Since our modules are already self contained we are
                       continually integrating all modules right in trunk
                    •  Less merging more branching
                    •  Ready to release code at any time without merging or
                       branching
                             –  In large part because of our test coverage 
                             –  Having system, integration, smoke and performance testing as
                                part of our daily activity




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Bamboo

 •  We use Bamboo for Continuous Integration,
    Nightly Builds and System Test Builds
          –  Continuous Builds run on each check-in 
          –  Nightly Builds of each Branch are scheduled
          –  System Test Builds depend upon Nightly Builds
 •  All Bamboo Agents run on VMWare Virtual
    Machines




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Build Agent Configuration 
                                                                                                                 Build
Agent

                                                                     Linux
x64

                                                                        VM
                                        Build
Type


                                                          Default

                                                          Agent



Linux
x64
             Linux
x64
               Linux
x64
           Linux
x86
        Windows
         Windows
         Solaris
x64

   VM
                    VM
                      VM
                  VM
            x86
VM
          x64
VM
              VM


  Con,nuous
              Old
Version
              QA
Install/        Full
Nightly
                     Full
Nightly
      Full
Nightly

                                                                                        Code
Check

  Trunk
Build
            Con,nuous
               System
Tests
          Build
                            Build
             Build


  Full
Nightly
                                                                         Full
Nightly

     Build
                                                                                Build





 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Build Plans

 •  Trunk Continuous – check-in triggered
 •  Trunk Nightly Full (Windows, Linux, Solaris)
 •  Code Check – Clover, Findbugs, Corbertura,
    FlexCover
 •  System Test
 •  QA –Product Installer is run on isolated VMs
 •  Supported Version Continuous
 •  Support Version Full
 •  Move Head Tag – ensures consistent SVN version
    for all nightly builds



©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

The Tantric Team: Getting Your Automated Build Groove On
Nightly Builds

 •  Nightly builds are scheduled
 •  Version Consistency
          –  An SVN tag is built using a “Move to Head Tag” Plan
          –  OS Specific builds are kicked off on the tag
          –  Code coverage Plan is kicked off on the tag
          –  System Test Plan kicked off on the tag
 •  Artifacts
          –  Short-circuit default behavior
          –  Send to NFS mount via symbolic link



©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

The Tantric Team: Getting Your Automated Build Groove On
The Tantric Team: Getting Your Automated Build Groove On
Code Coverage Build

 •  Run separately from other builds to reduce build
    times
 •  Produces Code Coverage Artifacts
          –  Clover
          –  Cobertura
          –  Findbugs
 •  We donʼt use Bambooʼs integrated Clover
    Report because it doesnʼt ft our build directory
    structure (each module built separately)


©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

The Tantric Team: Getting Your Automated Build Groove On
System Test Build

 •  Runs system tests
          –  Installs our product to one or more nodes
          –  Runs functional and/or performance tests
          –  Tests produce JUnit-like output




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

The Tantric Team: Getting Your Automated Build Groove On
QA Builds

 •  QA picks up the latest successful build artifacts
          –  Post Build plug-in called to tag successful,
             unsuccessful and unsuccessful builds that just had
             test failures.
 •  QA runs multiple Plans testing customer specific,
    system, performance and scalability tests from
    Bamboo
 •  All QA tests are written using a custom JUnit
    framework


©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

The Tantric Team: Getting Your Automated Build Groove On
Post-Build Automation

 •  Java Docs automatically generated via ANT task
    and written to the Confluence Wiki
 •  Hotfixes are posted on and linked from
    Confluence to the Artifact Repository




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Takeaways

 •  Why do we do Bamboo?
          –  Quality, quality, quality
          –  Time-to-market
          –  Release Flexibility




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

Questions?




©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.


More Related Content

The Tantric Team: Getting Your Automated Build Groove On

  • 1. The Tantric Team: Getting Your Automated Build Groove On Rik Tamm-Daniels
  • 2. Build Automation: How to do Bamboo Rik Tamm-Daniels VP, Engineering June 2nd, 2009
  • 3. About Attivio •  Located in Newton, MA •  Founded August 2007 •  45+ Employees •  What we do: Unified Information Access ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 4. What are we building? •  Attivioʼs Active Intelligence Engine –  Unified Information Access Platform –  Query Unstructured and Structured Information with the Precision of SQL and the Fuzziness of Search •  Shipped Product (OEM and Direct) –  Maintenance Release Window at the end of each sprint –  Minor Release every 3-4 months –  Major Releases Every 12-18 months ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 5. Builds @ Attivio •  Automate Everything •  Everything builds off of Bamboo •  Maintain High-Quality –  8000+ Automated Tests –  Code coverage using Clover –  Static Analysis: Findbugs •  Source code insight/Build Failure Investigation –  Fisheye ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 6. Key Product Stats •  Our Code Base •  100% Java (core product; 95% including add-on modules) •  Grails •  Flex •  C++ (3rd Party Code + Wrappers) •  Installer (Install4J) –  Java based installer –  XML configuration + Graphical UI ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 7. Supported Platforms •  Platforms –  Linux –  Windows –  Solaris –  32 and 64-bit ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 8. Build System •  ANT –  Heavy Use of MacroDefs –  Custom Ant Tasks –  Custom JUnit Wrappers for Testing –  Generalized Model (Maven like Ant Structure) –  Heavy use of AntCall and Ant tasks –  Top – Level directory build-import.xml defines all the tasks that are used by sub-projects –  Dependency management MacroDef at top level inherited by sub tasks •  Source Control –  Subversion ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 9. Attivio Build Directory Structure A=vio
 Common
 App
 Core
 Modules
 Customers
 Installer
 (3rd
Party)
 Component
 Component
 Module
1
 Module
2
 Module3
 Customer
1
 Customer
2
 Customer
3
 1
 2
 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 10. Attivio Build Directory Structure (Cont.) Component
 build
 src
 test
 classes
 dist
 kit
 doc
 clover
 findbugs
 checkstyle
 com
 com
 a=vio
 a=vio
 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 11. Branching Methodology Source:
Collabnet
 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 12. Branching Methodology •  We use the Unstable Branching Strategy –  Fits with the agile methodology better that the Agile Branching strategy •  No need to deal with too many branches •  Since our modules are already self contained we are continually integrating all modules right in trunk •  Less merging more branching •  Ready to release code at any time without merging or branching –  In large part because of our test coverage –  Having system, integration, smoke and performance testing as part of our daily activity ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 13. Bamboo •  We use Bamboo for Continuous Integration, Nightly Builds and System Test Builds –  Continuous Builds run on each check-in –  Nightly Builds of each Branch are scheduled –  System Test Builds depend upon Nightly Builds •  All Bamboo Agents run on VMWare Virtual Machines ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 14. Build Agent Configuration Build
Agent
 Linux
x64
 VM
 Build
Type
 Default
 Agent
 Linux
x64
 Linux
x64
 Linux
x64
 Linux
x86
 Windows
 Windows
 Solaris
x64
 VM
 VM
 VM
 VM
 x86
VM
 x64
VM
 VM
 Con,nuous
 Old
Version
 QA
Install/ Full
Nightly
 Full
Nightly
 Full
Nightly
 Code
Check
 Trunk
Build
 Con,nuous
 System
Tests
 Build
 Build
 Build
 Full
Nightly
 Full
Nightly
 Build
 Build
 ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 15. Build Plans •  Trunk Continuous – check-in triggered •  Trunk Nightly Full (Windows, Linux, Solaris) •  Code Check – Clover, Findbugs, Corbertura, FlexCover •  System Test •  QA –Product Installer is run on isolated VMs •  Supported Version Continuous •  Support Version Full •  Move Head Tag – ensures consistent SVN version for all nightly builds ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 17. Nightly Builds •  Nightly builds are scheduled •  Version Consistency –  An SVN tag is built using a “Move to Head Tag” Plan –  OS Specific builds are kicked off on the tag –  Code coverage Plan is kicked off on the tag –  System Test Plan kicked off on the tag •  Artifacts –  Short-circuit default behavior –  Send to NFS mount via symbolic link ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 20. Code Coverage Build •  Run separately from other builds to reduce build times •  Produces Code Coverage Artifacts –  Clover –  Cobertura –  Findbugs •  We donʼt use Bambooʼs integrated Clover Report because it doesnʼt ft our build directory structure (each module built separately) ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 22. System Test Build •  Runs system tests –  Installs our product to one or more nodes –  Runs functional and/or performance tests –  Tests produce JUnit-like output ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 24. QA Builds •  QA picks up the latest successful build artifacts –  Post Build plug-in called to tag successful, unsuccessful and unsuccessful builds that just had test failures. •  QA runs multiple Plans testing customer specific, system, performance and scalability tests from Bamboo •  All QA tests are written using a custom JUnit framework ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 26. Post-Build Automation •  Java Docs automatically generated via ANT task and written to the Confluence Wiki •  Hotfixes are posted on and linked from Confluence to the Artifact Repository ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.

  • 27. Takeaways •  Why do we do Bamboo? –  Quality, quality, quality –  Time-to-market –  Release Flexibility ©
2007
Confiden,al
&
Proprietary.
All
Rights
Reserved.