+ All Categories
Home > Software > Composer at Scale, Release and Dependency Management

Composer at Scale, Release and Dependency Management

Date post: 28-Jan-2018
Category:
Upload: joe-ferguson
View: 236 times
Download: 3 times
Share this document with a friend
60
Composer at Scale, Release and Dependency Management Joe Ferguson
Transcript
Page 1: Composer at Scale, Release and Dependency Management

Composer at Scale, Release and Dependency

ManagementJoe Ferguson

Page 2: Composer at Scale, Release and Dependency Management

Who Am I?Joe Ferguson

PHP Developer

Engineer @ Aol.

Twitter: @JoePFerguson

Organizer of @MemphisPHP

OSMI Board Member

@NomadPHP Lightning Talks

Passionate about Community

Page 3: Composer at Scale, Release and Dependency Management

This is not a Composer Talk

Page 4: Composer at Scale, Release and Dependency Management

What’s “Scale”?

Page 5: Composer at Scale, Release and Dependency Management

“At Scale”

http://www.pcmag.com/encyclopedia/term/68176/at-scale

“…at the required size to solve the problem…”

Page 6: Composer at Scale, Release and Dependency Management

What’s “Enterprise”?

http://www.pcmag.com/encyclopedia/term/42637/enterprise

Any undertaking or project, with the implication that it is of reasonable size

and complexity.

Page 7: Composer at Scale, Release and Dependency Management

Everyone is at “Enterprise” “Scale”

Page 8: Composer at Scale, Release and Dependency Management

Brands

Page 9: Composer at Scale, Release and Dependency Management

http://corp.aol.com/mission

Page 10: Composer at Scale, Release and Dependency Management

Enterprise === A lot

http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html

Page 11: Composer at Scale, Release and Dependency Management

We’re a small(ish) team

2 Front End Devs

6 Back end Devs

1 Architect / Product Manager

1 Manager

Page 12: Composer at Scale, Release and Dependency Management

Foundation of our Applications

Modern*

Well Tested

Semantic Versioning

Peer Approval

Continuous Integration

Client Focused Solutions

Page 13: Composer at Scale, Release and Dependency Management

Our CMS Application

Page 14: Composer at Scale, Release and Dependency Management

Start with a strong version control process/strategy

Page 15: Composer at Scale, Release and Dependency Management

New Feature Git Workflow

Pull master branch

Page 16: Composer at Scale, Release and Dependency Management

New Feature Git Workflow

Pull master branch

checkout new branch named feature/new-feature-description

Page 17: Composer at Scale, Release and Dependency Management

New Feature Git Workflow

Pull master branch

checkout new branch named feature/new-feature-description

change code <where the magic happens>

Page 18: Composer at Scale, Release and Dependency Management

New Feature Git Workflow

Pull master branch

checkout new branch named feature/new-feature-description

change code <where the magic happens>

Commit changes and open pull request against the develop branch

Page 19: Composer at Scale, Release and Dependency Management

New Feature Git Workflow

Pull master branch

checkout new branch named feature/new-feature-description

change code <where the magic happens>

Commit changes and open pull request against the develop branch

Wait for two peers to approve changes <jeopardy theme plays>

Page 20: Composer at Scale, Release and Dependency Management

New Feature Git Workflow

Pull master branch

checkout new branch named feature/new-feature-description

change code <where the magic happens>

Commit changes and open pull request against the develop branch

Wait for two peers to approve changes <jeopardy theme plays>

Merge pull request into the develop branch

Page 21: Composer at Scale, Release and Dependency Management

Commit & Versioning Tools

Page 22: Composer at Scale, Release and Dependency Management

Emoji in your commits!

https://github.com/slashsBin/styleguide-git-commit-message

Page 23: Composer at Scale, Release and Dependency Management

Commit tool to automate messages

https://github.com/jakeasmith/commit

Page 24: Composer at Scale, Release and Dependency Management

export GIT_EDITOR=~/PhpstormProjects/commit/bin/commit

Page 25: Composer at Scale, Release and Dependency Management

Commit tool to automate messages

https://github.com/jakeasmith/commit

Page 26: Composer at Scale, Release and Dependency Management

Identify What Changed

Page 27: Composer at Scale, Release and Dependency Management

Bump!

https://github.com/jakeasmith/bump

Page 28: Composer at Scale, Release and Dependency Management

$ bump major|minor|patch

Page 29: Composer at Scale, Release and Dependency Management

Wait for package repo to index new version

Page 30: Composer at Scale, Release and Dependency Management

Deployment Cycles, Waterfalls, Sprints, Kanban, and bears oh my!

Page 31: Composer at Scale, Release and Dependency Management

Find what works for you

Page 32: Composer at Scale, Release and Dependency Management

Kanban

Two Week Release Cycle

Page 33: Composer at Scale, Release and Dependency Management

Code Freeze and Release Branches

Two Week Release Cycle

Wednesday before release is a Release Candidate Code Freeze

Release branches are created from develop branch

Release branches deployed to staging servers

Page 34: Composer at Scale, Release and Dependency Management

Testing on Staging Servers

Two Week Release Cycle

Wednesday before release is a Release Candidate Code Freeze

Release branches are created from develop branch

Release branches deployed to staging servers

Developers & Clients test changes on staging servers & sign off

From Wednesday to Tuesday is testing time

Page 35: Composer at Scale, Release and Dependency Management

Production DeploymentTwo Week Release Cycle

Wednesday before release is a Release Candidate Code Freeze

Release branches are created from develop branch

Release branches deployed to staging servers

Developers & Clients test changes on staging servers & sign off

From Wednesday to Tuesday is testing time

Tuesday following the RC freeze is production deploy

Release branches are Merged into master via same 2 peer approval pull request process

Page 36: Composer at Scale, Release and Dependency Management

Production DeploymentTwo Week Release Cycle

Wednesday before release is a Release Candidate Code Freeze

Release branches are created from develop branch

Release branches deployed to staging servers

Developers & Clients test changes on staging servers & sign off

From Wednesday to Tuesday is testing time

Tuesday following the RC freeze is production deploy

Release branches are Merged into master via same 2 peer approval pull request process

Code is deployed to production

Page 37: Composer at Scale, Release and Dependency Management

When something breaks…

Page 38: Composer at Scale, Release and Dependency Management

Hotfixes and Bugfixes

Hotfixes are branches named hotfix/description that are opened against master

Hotfixes are how we patch production

Page 39: Composer at Scale, Release and Dependency Management

Hotfixes and Bugfixes

Hotfixes are branches named hotfix/description that are opened against master

Hotfixes are how we patch production

Bug fixes are when we find issues after the RC freeze but before RC branch merging to master

Bug fix branches are named bugfix/description that are opened against the release branch

Page 40: Composer at Scale, Release and Dependency Management

That’s how we deploy features to our CMS

Page 41: Composer at Scale, Release and Dependency Management

Our CI/CD Hero

Page 42: Composer at Scale, Release and Dependency Management

Jenkins Automation

Build & Run Tests

Build Docker Images & Test

Build & Deploy Applications

Sound the alarms when something breaks

Slack Notifications in a CI/CD Channel

Page 43: Composer at Scale, Release and Dependency Management

That’s how we deploy features to our CMS, API,

Page 44: Composer at Scale, Release and Dependency Management

That’s how we deploy features to our CMS, API, Design Tool,

Page 45: Composer at Scale, Release and Dependency Management

That’s how we deploy features to our CMS, API, Design Tool, and other standalone applications

Page 46: Composer at Scale, Release and Dependency Management

Architecture

CMS

API

Design Tool

A lot of shared logic

Page 47: Composer at Scale, Release and Dependency Management

Enter: “Core”

Page 48: Composer at Scale, Release and Dependency Management

Architecture

CMS

API

Design Tool

Core

Page 49: Composer at Scale, Release and Dependency Management

composer require aol/core

*not the actual package name

Page 50: Composer at Scale, Release and Dependency Management

Control Version Constraints

{ "require": { "aol/core": "^17", }}

Page 51: Composer at Scale, Release and Dependency Management

Lock To A Minor Version

{ "require": { "aol/core": “^17.10", }}

Page 52: Composer at Scale, Release and Dependency Management

We now have access to all of the logic in Core in all of our applications

Page 53: Composer at Scale, Release and Dependency Management

Core Git Workflow

No develop branch

No Hotfixes, or Bugfix branches

All changes are via pull request against master

After PRs are approved and merged version tags are bumped

Semantic versioning is your friend

Individual applications update their own core versions at their own pace (During normal deployment cycles)

Page 54: Composer at Scale, Release and Dependency Management

Architecture

CMS

API

Design Tool

Core

Version 15.1.3

Version 17.6.13

Version 17.0.0

Page 55: Composer at Scale, Release and Dependency Management

Remember Scale?

Page 56: Composer at Scale, Release and Dependency Management

Core is just another application…

Page 57: Composer at Scale, Release and Dependency Management

“Compromise is essential because there are no ideal solutions, only

trade-offs”

Thomas Sowell - “A Conflict of Vision”

Page 58: Composer at Scale, Release and Dependency Management

“Medium” Services

Page 59: Composer at Scale, Release and Dependency Management

Follow your process

Page 60: Composer at Scale, Release and Dependency Management

Feedback!

https://joind.in/talk/024d5

Joe FergusonTwitter: @JoePFergusonEmail: [email protected]: joepferguson

Contact Info:


Recommended