The Brave New World of Continuous Release

download The Brave New World of Continuous Release

If you can't read please download the document

description

While rapid release cycles provide numerous benefits for end-users and developers, it puts additional pressure on DevOps to make sure that a good application is provisioned with no mistakes. In this session, we will look at the release process from the binaries point of view. We will explain what are the processes and the methodologies for moving your build binaries between different phases until declared production-ready. In the second part of the session, we will show how business requirements can affect release procedures. We will discuss what it takes to customize the logic of the process in the context of CI servers and binary artifacts. We will demonstrate several common release methodologies and compare the pros and cons of each one.

Transcript of The Brave New World of Continuous Release

  • 1. The Brave New World ofContinuous Release Baruch, JFrog

2. About me Baruch Developer Advocate @JFrog> Job definition (part of):@jbaruch2 3. About me Developer Advocate @JFrog Job definition:> Hang out withthe DevOps guys> Talk about it github.com/jbaruch @jbaruch3 4. Agenda The cloud silver bullet The right tool for the job Binaries all the way The magic of release 4 5. EVERYTHING *aaSThe New Silver Bullet 6. Whats So Good About *aaS? *aaS features Continuous Delivery6 7. Continuous Delivery FTW 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?7 8. Almost, except the IT Used to quarterly release cycles Secure pace Minimizing the entropy caused bydevelopers with ADD 8 9. Herding CatsDevelopers> Increasing entropy +IT (operations)> Maintaining stability =DevOps> Stable change9 10. 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 CD10 11. 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 CD11 12. Its Agile! Agile principles applied for DevOps We have good tooling for Agiledevelopment> Version control> Unit testing and code coverage> CI servers> Hot swap tools Whats up with tooling for agile DevOps? 12 13. Agile Tooling for DevOps Checklist Versioning Access control Traceability Promotions Tags andannotations Search 13 14. Recursive Slide with Baby Photo Artifactory is releasedwith Artifactory JFrog SaaS offering > Artifactory Online Gradle, Grails, SpringSource, Typesafe, Jenkins, etc. We build, release andeat our own dog food > Continuously14 15. HERE COMES BINARY REPOSITORYThe Right Tool for the Job 16. Here Comes Binary Repository E.g. Artifactory Proxy Smart storage> Much more than a passive space Critical for CI/CD and ALM 16 17. Tooling Chain17 18. In the Beginning it was 18 19. Binary Repo in DevOps Ecosystem19 20. Binaries All the Way From some point product in yourlifecycle, all you care about is binaries Lots of things to do after the software isbuilt 20 21. The Release PipelineSource: Agile ALM, Michael Httermann, Manning Publications Co.21 22. Passing the software to QA Different access rights Different physical location Ability to annotate22 23. Staging and Preproduction Replication of Production environment> Lock versions of dependencies and artifacts Allow access to set of users23 24. Going to Production Convert staging binaries to production Allow public access Change settings Tag 24 25. TRACEABILITYWhy and How? 26. The Time Machine Sometimes you need to go back in time 27. Quest for Traceability What should be restored?> Sources> Dependencies> Environment details> Tags Wheres the information?> Version control system> Build Tool> Build server 27 28. Rebuilding from Sources Checkout branch/tag/revision Build Done! Time consuming Unstable 28 29. Dependencies Lie Dependency Descriptors arent stable 29 30. Evil Dependencies Resolution POMs deployedwith variables> Ivy is OK Resolutionstrategies changeover time> Both Ivy and Maven 30 31. Single Source of Truth Record information on spot> When binaries are created Build Server31 32. Single Target of Truth Truth should be saved with the binaries in binaries storage! 32 33. Open Standard Of Truth Bill of Materials JSON REST accessible API accessible APLv2 on GitHub 33 34. Build Server Plugin Build information> Resolved and realized duringthe build> Attached to the artifacts> Uploaded with theartifacts 34 35. DEMO TIME!Tracing Artifacts 36. WHAT MY FRIENDS THINK I DODevOps 37. What Others Think I Do 37 38. What I Think I Do38 39. What I Really Do 39 40. What I Really Do 40 41. What I should Do 41 42. Target: Automation Its impossible to release frequently withmanual procedures> While maintaining quality Use your binaries storage to release 42 43. THE MAGIC OF RELEASEPut your repository to work 44. Release Candidates Your next build is a release-candidate Once successfully built and tested, clickthe button> Automatic versions switch From integration to release> Right place to put your binaries Move from Staging to Public> Automatic VCS tagging44 45. Releasing with Release Candidates Process:1. Produce and build snapshots until satisfied2. Once satisfied, build a release candidate3. Stage RC, check and verify4. Once verified, release 45 46. Releasing With Artifactory Plugin Changes versions in build script Allows choosing a target deployrepository Creates a VCS tag/branch 46 47. DEMO TIME!Release With Release Candidates 48. OOTB Release Management Pros Cons> Out of the box> Limited> Supports the byextensibilitythe book > May not fit yourrelease cycle requirements> Supportsmajority of thetools 48 49. Releasing with Release Candidates Process:1. Produce and build snapshots until satisfied2. Once satisfied, build a release candidate3. Stage RC, check and verify4. Once checked, release 49 50. Releasing with Release Candidates Process:1. Produce and build snapshots until satisfied3. Stage RC, check and verify4. Once checked, release 50 51. Releasing with Release Candidates? 51 52. Releasing with Release Candidates? Lots of things can go wrong during onemore build If we wont build it, we wont screw it Revised Process:1. Produce and build snapshots until satisfied2. When satisfied, check and verify3. Once checked, release 52 53. Automation Flexibility We Know: We Dont Know Better YMMV (great deal) Write your own release logic Pre and post build deploy hooks53 54. Controlling Versioning Scheme Classic versioning scheme:> Release version 2.0.3> Integration version 2.0.4-SNAPSHOT YMMV54 55. Flexible Release Code your release strategy> Versioning scheme> VCS (tagging, branching, commit comments)> Promotion hook(copy/move, comments, status) Available by REST55 56. REST == Scriptability == Automation Its impossible to release frequently withmanual procedures> While maintaining quality Use your scriptable binaries storage torelease 56 57. Example: Promotion of Snapshots Choose existing build to become arelease Using REST API without build server Invoke promotion plugin> Convert to next version> Tag, branch, etc.> Promote (copy/move)57 58. CODE TIME!Plugin What? 59. Pluggable Architecture with DSLs Artifactory is open for user plugins Groovy 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 descriptors59 60. Community Effort https://github.com/JFrogDev/artifactory-user-plugins 60 61. Plugin Invocation Options As a response for various events> Download/Create/Delete> Login> Release Scheduled On demand 61 62. Plugin Code Manipulating Version Control Systems 62 63. Plugin Code Manipulating BuildInfo object63 64. Plugin Code Creating and replacing artifacts 64 65. Calling REST API With CURL 65 66. Calling REST API With CURLhttp://repo-demo:8080/artifactory/api/plugins/build/promote/snapshotToRelease/gradle-multi-example/1?params=snapExp=d14|targetRepository=gradle-release-local 66 67. Calling REST API With CURLhttp://repo-demo:8080/ Artifactory serverartifactory/api/plugins/build/promote/snapshotToRelease/gradle-multi-example/1?params=snapExp=d14|targetRepository=gradle-release-local67 68. Calling REST API With CURLhttp://repo-demo:8080/ Artifactory serverartifactory/api/plugins/ Plugins APIbuild/promote/snapshotToRelease/gradle-multi-example/1?params=snapExp=d14|targetRepository=gradle-release-local68 69. Calling REST API With CURLhttp://repo-demo:8080/ Artifactory serverartifactory/api/plugins/ Plugins APIbuild/promote/snapshotToRelease/ Plugin namegradle-multi-example/1?params=snapExp=d14|targetRepository=gradle-release-local69 70. Calling REST API With CURLhttp://repo-demo:8080/Artifactory serverartifactory/api/plugins/Plugins APIbuild/promote/snapshotToRelease/Plugin namegradle-multi-example/1? Build name and numberparams=snapExp=d14|targetRepository=gradle-release-local70 71. Calling REST API With CURLhttp://repo-demo:8080/ Artifactory serverartifactory/api/plugins/ Plugins APIbuild/promote/snapshotToRelease/ Plugin namegradle-multi-example/1? Build name and numberparams=snapExp=d14|versioning schemetargetRepository=gradle-release-local71 72. Calling REST API With CURLhttp://repo-demo:8080/Artifactory serverartifactory/api/plugins/Plugins APIbuild/promote/snapshotToRelease/Plugin namegradle-multi-example/1? Build name and numberparams=snapExp=d14|versioning schemetargetRepository=gradle-release-local Target repository for release 72 73. Recap: Promotion of Snapshots Choose existing build to become arelease Using the REST API without building Invoking the promotion plugin> Convert to next version> Tag, branch, etc.> Promote (copy/move)73 74. DEMO TIME!Release by Snapshot Promotion 75. 4 Commandments of DevOps Automateeverything Versioneverything Trace everything Report/Log/Feedback everything 75 76. 4 Commandments of DevOps Automateeverything Versioneverything Trace everything Report/Log/Feedback everythingDesigned by Jessica Allen on Dribbble.com 76