38
RELEASE MANAGEMENT Release Management For Live Websites BADCamp 2016

Bad camp2016 Release Management On Live Websites

  • Upload
    phase2

  • View
    197

  • Download
    1

Embed Size (px)

Citation preview

RELEASE MANAGEMENT

Release ManagementFor Live Websites

BADCamp 2016

RELEASE MANAGEMENT

JESSE [email protected]

Drupal.org: jessehs Twitter: @jessetweet

2

Senior Developer, Growth & Support

RELEASE MANAGEMENT

Project Teams

Project Managers Developers

Who is this presentation

for?

3

Basic technical concepts

Example workflows

Set reasonable expectations

Stakeholders

RELEASE MANAGEMENT

FIRE

What’s the big deal?

4

RELEASE MANAGEMENT

● Predictability

● Accountability

● Reliability

WORKFLOWS forTESTING and RELEASE

5

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

RELEASE MANAGEMENT

Tools for Collaboration

7

JIRA

Customizable Swimlanes show status

Each request tracked by a ticketEx: PSUM-1001

RELEASE MANAGEMENT

Tools for Collaboration

Pull Request Workflow

Easily comment on code

Emojis

8

Bitbucket

RELEASE MANAGEMENT

JIRA and Git for “Archaeology”

9

Add ticket number to commit message

Branch name includes ticket number

RELEASE MANAGEMENT

Each Project Is Different

10

RELEASE MANAGEMENT

● Workflow expectations

● Modify JIRA

● Git conventions to suit the needs

Customize Your Tools

11 11

RELEASE MANAGEMENT

Workflow Expectations

Define them

Who can create new tickets?Who assigns priority?Who delegates tasks?

12

RELEASE MANAGEMENT

Modify JIRA● Add new swimlanes

● Restrict ability to create new

tickets

● Tags for filtering tickets

13

RELEASE MANAGEMENT

Git Workflow Matches Needs

Larger teams benefit from tighter, more restricted workflowsSmall teams are more efficient with a

limited workflow

14

RELEASE MANAGEMENT

Branching

15

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

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

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

RELEASE MANAGEMENT 19

RELEASE MANAGEMENT

Hosting Environments

20

LOCAL

DEV

STAGE

PROD

RELEASE MANAGEMENT

Your LOCALMock 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 works6. *ONLY NOW* can you

submit your Pull Request.21

● MAMP/WAMP● Homebrew● Vagrant VM● Acquia Dev Desktop● Docker containsers like

Devtools, Kalabox

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

RELEASE MANAGEMENT

Test / Staging• Runs the release candidate

branch• Mock production

deployment is run here• Comprehensive testing

suite can be run here

23

RELEASE MANAGEMENT

Production • Runs the production branch

• Testing suite can also be run here

24

RELEASE MANAGEMENT

Production

25

RELEASE MANAGEMENT 26

RELEASE MANAGEMENT

PREDICTABILITY • Guidelines to follow

• Routine is good �

• Failure indicates need for

improvements in

procedure

27

Established Procedure

RELEASE MANAGEMENT

ACCOUNTABILITY• Release manager

• Checks and balances

• Look at tickets and test

related functionality

28

Boots on the Ground

RELEASE MANAGEMENT

RELIABILITY...of Staging

• Prod vs. Release Candidate

• Ex: Visual Regression Tests

...of Dev

• Continuous Integration

• Ex: Behat

29

Automated Testing...of Staging

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

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

RELEASE MANAGEMENT 32

RELEASE MANAGEMENT

● Release manager merges● Document merge steps in commit

message● Use a good merge tool

Merge Conflicts

33

Manual Merge...of Staging

RELEASE MANAGEMENT

● Re-branch from master● git cherry-pick commits in order

Improper Branching

34

The Cherry Pick...of Staging

RELEASE MANAGEMENT

● Local History● git add -p

Lets you stage each hunk individually

Merging

35

Use your IDE...of Staging

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

RELEASE MANAGEMENT

DOCUMENTATION

37

Keep it up to date!...of Staging

RELEASE MANAGEMENT

Thanks!

38