Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Bad camp2016 Release Management On Live Websites

332 views

Published on

What could go wrong when you push code on a live site? This presentation covers the topic from a technical and non technical perspective.

Published in: Technology
  • Be the first to comment

Bad camp2016 Release Management On Live Websites

  1. 1. RELEASE MANAGEMENT Release Management For Live Websites BADCamp 2016
  2. 2. RELEASE MANAGEMENT JESSE HOFMANN-SMITH jhofmann-smith@phase2technology.com Drupal.org: jessehs Twitter: @jessetweet 2 Senior Developer, Growth & Support
  3. 3. RELEASE MANAGEMENT Project Teams Project Managers Developers Who is this presentation for? 3 Basic technical concepts Example workflows Set reasonable expectations Stakeholders
  4. 4. RELEASE MANAGEMENT FIRE What’s the big deal? 4
  5. 5. RELEASE MANAGEMENT ● Predictability ● Accountability ● Reliability WORKFLOWS for TESTING and RELEASE 5
  6. 6. RELEASE MANAGEMENT USE GIT Distributed Version Control System -- allows multiple collaborators History -- go back in time Code snapshots (tags) for deployments Open Source workflows 6
  7. 7. RELEASE MANAGEMENT Tools for Collaboration 7 JIRA Customizable Swimlanes show status Each request tracked by a ticket Ex: PSUM-1001
  8. 8. RELEASE MANAGEMENT Tools for Collaboration Pull Request Workflow Easily comment on code Emojis 8 Bitbucket
  9. 9. RELEASE MANAGEMENT JIRA and Git for “Archaeology” 9 Add ticket number to commit message Branch name includes ticket number
  10. 10. RELEASE MANAGEMENT Each Project Is Different 10
  11. 11. RELEASE MANAGEMENT ● Workflow expectations ● Modify JIRA ● Git conventions to suit the needs Customize Your Tools 11 11
  12. 12. RELEASE MANAGEMENT Workflow Expectations Define them Who can create new tickets? Who assigns priority? Who delegates tasks? 12
  13. 13. RELEASE MANAGEMENT Modify JIRA ● Add new swimlanes ● Restrict ability to create new tickets ● Tags for filtering tickets 13
  14. 14. RELEASE MANAGEMENT Git Workflow Matches Needs Larger teams benefit from tighter, more restricted workflows Small teams are more efficient with a limited workflow 14
  15. 15. RELEASE MANAGEMENT Branching 15
  16. 16. RELEASE MANAGEMENT Git Flow 16 http://nvie.com/posts/a-successful-git-branching-model/ New features are branched off of develop, and merged into develop Great for pre-production sites New features inherit all previous code on the develop branch
  17. 17. RELEASE MANAGEMENT Wunderflow 17 http://wunderflow.wunder.io/ New features are branched off of master, and merged into develop Each feature remains independent Features are tested on the develop branch, but merged back into master
  18. 18. RELEASE MANAGEMENT ● Checkout master, branch off as a ticket branch ● Commit a code fix ● Submit a Pull Request to the develop branch, add a reviewer ● Reviewer approves, merges ● See how JIRA ticket is updated with Pull Request, commit based on ticket number in the commit message and the name of the branch. Developer Approach -- step by step 18 18
  19. 19. RELEASE MANAGEMENT 19
  20. 20. RELEASE MANAGEMENT Hosting Environments 20 LOCAL DEV STAGE PROD
  21. 21. RELEASE MANAGEMENT Your LOCAL Mock Deployment 1. Checkout the production branch. 2. Reload the database and clear cache. 3. Checkout ticket branch. 4. Run the database update script. 5. Confirm code works 6. *ONLY NOW* can you submit your Pull Request. 21 ● MAMP/WAMP ● Homebrew ● Vagrant VM ● Acquia Dev Desktop ● Docker containsers like Devtools, Kalabox
  22. 22. RELEASE MANAGEMENT Dev / Integration • Runs the “develop” branch • Often set up for auto-deployment after PR is merged • Developer confirms fix here • CI tests run here 22
  23. 23. RELEASE MANAGEMENT Test / Staging • Runs the release candidate branch • Mock production deployment is run here • Comprehensive testing suite can be run here 23
  24. 24. RELEASE MANAGEMENT Production • Runs the production branch • Testing suite can also be run here 24
  25. 25. RELEASE MANAGEMENT Production 25
  26. 26. RELEASE MANAGEMENT 26
  27. 27. RELEASE MANAGEMENT PREDICTABILITY • Guidelines to follow • Routine is good • Failure indicates need for improvements in procedure 27 Established Procedure
  28. 28. RELEASE MANAGEMENT ACCOUNTABILITY • Release manager • Checks and balances • Look at tickets and test related functionality 28 Boots on the Ground
  29. 29. RELEASE MANAGEMENT RELIABILITY ...of Staging • Prod vs. Release Candidate • Ex: Visual Regression Tests ...of Dev • Continuous Integration • Ex: Behat 29 Automated Testing ...of Staging
  30. 30. RELEASE MANAGEMENT ● Code is deployed to the dev environment. Developer reviews, merges fix. * ● Ticket is assigned to the reporter for review. ● Reviewer approves fix, marks ticket as ready to deploy. ● Developer submits PR into RC branch. ● Release manager approves, merges. ● Ticket’s “Fix Version” updated to RC name Preparing for Release 30 30
  31. 31. RELEASE MANAGEMENT ● The release candidate is merged into the master and production branches* ● Production release tagged ● Test deployment performed on Staging (review steps from slide 21) ● More testing... ● Ready to schedule the Production Deployment! Ready for Production 31 31
  32. 32. RELEASE MANAGEMENT 32
  33. 33. RELEASE MANAGEMENT ● Release manager merges ● Document merge steps in commit message ● Use a good merge tool Merge Conflicts 33 Manual Merge ...of Staging
  34. 34. RELEASE MANAGEMENT ● Re-branch from master ● git cherry-pick commits in order Improper Branching 34 The Cherry Pick ...of Staging
  35. 35. RELEASE MANAGEMENT ● Local History ● git add -p Lets you stage each hunk individually Merging 35 Use your IDE ...of Staging
  36. 36. RELEASE MANAGEMENT ● Branch from master ● Merge directly into master ● Tag and deploy a release ● Be sure to deploy to Staging first ● Merge master back into develop, release candidate Hotfix 36
  37. 37. RELEASE MANAGEMENT DOCUMENTATION 37 Keep it up to date! ...of Staging
  38. 38. RELEASE MANAGEMENT Thanks! 38

×