Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build Trust in Your Build to Deployment Flow!

Build Trust in Your Build to Deployment Flow!

Frequently deploying to production puts bigger pressure than before on DevOps to make sure the good, qualified application is provisioned with no mistakes.
This session will explore some common pitfalls with traditional Continuous-Integration that increase risk, introduce manual input and human error, and generally make DevOps cringe before hitting the “deploy” button.
We will then demonstrate automation techniques that overcome these issues using popular tools, like Maven, Gradle, your CI server, custom scripts and a Binary Repository.
Whether you are building software for the cloud or in-house, this presentation will show you how to assemble completely automated production builds which release applications that are fully traceable, managed and ready to be provisioned with no fear!

Baruch Sadogursky

June 04, 2012
Tweet

More Decks by Baruch Sadogursky

Other Decks in Programming

Transcript

  1.  Baruch Sadogursky  Developer Advocate @JFrog > Job definition

    (part of): Hang out with the DevOps guys  @jbaruch 2 About me JavaOne Russia 2012
  2.  The cloud silver bullet  The right tool for

    the job  Binaries all the way  The magic of release Agenda JavaOne Russia 2012 3
  3.  User advantages > Latest version/features > No upgrades/maintenance 

    Developer advantages > Agile > Rapid feedback > Users are the best beta-testers > No long-term support  Everybody wins? 6 Continuous Delivery FTW JavaOne Russia 2012
  4.  Used to quarterly release cycles  “Secure” pace 

    Minimizing the entropy caused by developers with ADD 7 Almost, except the IT JavaOne Russia 2012
  5. Herding Cats Developers > Increasing entropy + IT (operations) >

    Maintaining stability = DevOps > Stable change 8 JavaOne Russia 2012
  6. Continuous Delivery Challenge  Very frequent releases  More than

    one version in production  Complicated access levels  Root cause analysis > Tracing from binaries to source  Version tracking  Not everyone is ready for CD 9 JavaOne Russia 2012
  7. Continuous Delivery Challenge  Very frequent releases  More than

    one version in production  Complicated access levels  Root cause analysis > Tracing from binaries to source  Version tracking  Not everyone is ready for CD 10 JavaOne Russia 2012
  8. It’s… Agile! 11 JavaOne Russia 2012  Agile principles applied

    for DevOps  We have good tooling for Agile development > Version control > Unit testing and code coverage > CI servers > Hot swap tools  What’s up with tooling for agile DevOps?
  9. Agile Tooling for DevOps Checklist  Versioning  Access control

     Traceability  Promotions  Tags and annotations  Search 12 JavaOne Russia 2012
  10. How Do I Know?  JFrog SaaS offering > Artifactory

    Online › Gradle, Grails, SpringSource, Typesafe, Jenkins, etc.  We build, release and eat our own dog food > Continuously 13 JavaOne Russia 2012
  11. Here Comes Binary Repository 15 JavaOne Russia 2012  E.g.

    Artifactory  Proxy  Smart storage > Much more than a passive space  Critical for CI/CD and ALM
  12. Binaries All the Way  From some point product in

    your lifecycle, all you care about is binaries  Lots of things to do after the software is built JavaOne Russia 2012 19
  13. Passing the software to QA  Different access rights 

    Different physical location  Ability to annotate JavaOne Russia 2012 21
  14. Staging and Preproduction  Replication of Production environment > Lock

    versions of dependencies and artifacts  Allow access to set of users JavaOne Russia 2012 22
  15. Going to Production  Convert staging binaries to production 

    Allow public access  Change settings  Tag JavaOne Russia 2012 23
  16. Traceability  Binaries should be traceable at every stage >

    Sources > Dependencies > Environment details > Tags  Where’s the information? > Version control system > Build server JavaOne Russia 2012 24
  17. Traceability with Artifactory Plugin  Adding Metadata about the build

    > Gathers build information > Uploads artifacts in a bulk > Uploads build information > Maintains bi-directional links JavaOne Russia 2012 25
  18. Target: Automation  It’s impossible to release frequently with manual

    procedures > While maintaining quality  Use your binaries storage to release JavaOne Russia 2012 33
  19. Release Candidates  Your next build is a release-candidate 

    Once successfully built and tested, click the button > Automatic versions switch › From integration to release > Right place to put your binaries › Move from Staging to Public > Automatic VCS tagging JavaOne Russia 2012 35
  20. Releasing with Release Candidates  Process: 1. Produce and build

    snapshots until satisfied 2. Once satisfied, build a release candidate 3. Stage RC, check and verify 4. Once verified, release JavaOne Russia 2012 36
  21. Releasing With Artifactory Plugin JavaOne Russia 2012 37  Changes

    versions in build script  Allows choosing a target deploy repository  Creates a VCS tag/branch
  22. OOTB Release Management  Pros > Out of the box

    > Supports the “by the book” release cycle > Supports majority of the tools  Cons > Limited extensibility > May not fit your requirements JavaOne Russia 2012
  23. Releasing with Release Candidates  Process: 1. Produce and build

    snapshots until satisfied 2. Once satisfied, build a release candidate 3. Stage RC, check and verify 4. Once checked, release JavaOne Russia 2012 40
  24. Releasing with Release Candidates  Process: 1. Produce and build

    snapshots until satisfied 3. Stage RC, check and verify 4. Once checked, release JavaOne Russia 2012 41
  25. Releasing with Release Candidates  Lots of things can go

    wrong during one more build  If we won’t build it, we won’t screw it  Revised Process: 1. Produce and build snapshots until satisfied 2. When satisfied, check and verify 3. Once checked, release JavaOne Russia 2012 42
  26. Target: Automation  It’s impossible to release frequently with manual

    procedures > While maintaining quality  Use your binaries storage to release JavaOne Russia 2012 43
  27. Automation Flexibility  YMMV (great deal)  Write your own

    release logic  Pre and post build deploy hooks JavaOne Russia 2012 44  We Know: We Don’t Know Better
  28. Flexible Release  Code your release strategy > Versioning scheme

    > VCS (tagging, branching, commit comments) > Promotion hook (copy/move, comments, status)  Available by REST JavaOne Russia 2012 45
  29. Controlling Versioning Scheme  Classic versioning scheme: > Release version

    › 2.0.3 > Integration version › 2.0.4-SNAPSHOT  YMMV > Write your own strategy for versioning JavaOne Russia 2012 46
  30. Example: Promotion of Snapshots  Sometimes the build takes long

    time…  But that’s the silly reason 47 JavaOne Russia 2012
  31. Example: Promotion of Snapshots  Choose existing build to become

    a release  Using REST API without build server  Invoke promotion plugin > Convert to next version > Tag, branch, etc. > Promote (copy/move) JavaOne Russia 2012 48
  32.  Artifactory is open for user plugins  Simple Groovy

    DSL  Your code runs inside the server  Uses Public API (PAPI) > Search for artifacts > Search for builds > Copy/move artifacts > Manipulate files › E.g. change versions in descriptors Pluggable Architecture with DSLs JavaOne Russia 2012
  33.  As a response for various events > Download/Create/Delete >

    Login > Release  Scheduled  On demand JavaOne Russia 2012 51 Plugin Invocation Options
  34. http://repo-demo:8080/ artifactory/api/plugins/ build/promote/snapshotToRelease/ gradle-multi-example/1? params=snapExp=d14| targetRepository=gradle-release- local JavaOne Russia 2012

    62 Calling REST API With CURL Artifactory server Plugins API Plugin name Build name and number versioning scheme Target repository for release
  35. Recap: Promotion of Snapshots  Choose existing build to become

    a release  Using the REST API without building  Invoking the promotion plugin > Convert to next version > Tag, branch, etc. > Promote (copy/move) JavaOne Russia 2012 63
  36. 4 Commandments of DevOps  Automate everything  Version everything

     Trace everything  Report/Log/Feed back everything JavaOne Russia 2012 65 Designed by Jessica Allen on Dribbble.com
  37. 4 Commandments of DevOps  Automate everything  Version everything

     Trace everything  Report/Log/Feed back everything JavaOne Russia 2012 66 Designed by Jessica Allen on Dribbble.com