SlideShare a Scribd company logo
1 of 11
Download to read offline
Code Management for Puppet:
Understanding the connection
between Puppet and Git.
Phil Watts
Principle Enterprise Director of Self Aggrandizement
Why use git?
• Distributed (work offline)
• Creating branches is trivial
• Enforces Trackable
Consistency
• Change History
• It’s awesome.
Integration with
Puppet:
r10k and dynamic
environments
web hooks
are magic
Options for Repository
Hosting
GitHub Stash
GitHub
Enterprise
GitLab*
Location Public Web Self-Hosted
Self-Hosted or
Virtual
Appliance
Self-Hosted
Data
Protection
Managed
Bad Export
Tool included
Very nice
backup tools
and Puppet
modules
Good Luck
How to RBAC
Fork/Pull,
Organizations,
Collaborators
Branch Level
Permissions
Control
Fork/Pull,
Organizations,
Collaborators
Protected
Branches
Visual Appeal OMG Octocat
Looks like Jira
(blegh)
So much
Octocat
Ugly
Cost
Free/Monthly
per private repo
Pay per seat
(cheap)
Pay per seat
(not cheap)
FREE?!?!
Hooks
Webhooks only
(post receive)
pre commit &
post receive
Web hooks
Officially*
pre commit &
post receive
acceptance
stable
servo
feature_branch
acquiesce
stable
feature_branch
stable
acceptance
stable
production production production production production
Sandbox Deployment Non-Prod Deployment Production Deployment
stable
control-fiefs
control-vassals
control-lords
Pull from upstream
Merge Pull Request
Pull Request
1
2 3
4
65
7
1. Developer creates and completes to their satisfaction, a "feature" branch. Then a pull request is created
to merge the "feature" branch.
2. Peer review results in the "feature" branch being merged up to "acquiesce".
3. A commit to the "acquiesce" branch results in automated testing in the "servo" branch. If tests succeed,
code is merged up to the "acceptance" branch, and a pull request is created.
4. "Team Leader" review to confirm the code change, testing, and process requirements. If acceptable, the
code is merged to the "stable" branch.
6. The "stable" branch is submitted to required change control, and is merged into the "production" branch
in accordance to production change requirements.
5 & 7. The "stable" and "production" environments are cascaded downstream to serve as baselines for
systems in lower environments when not actively being tested against.
feature_branch
acquiesce
servo_branch
acceptance
stable
production
CI Robot
Change
Control
Team
Review
** Any Other
Developer **
Developer
"One Repo to rule them all, One Repo to find
them,
One Repo to bring them all and in the darkness
bind them" ~
1. Developers create feature branches for new
code. Upon completion, a pull request is
submitted to the "acquiesce" branch.
2. Any approved developer other than the
submitter can review and approve the pull
request to "acquiesce". **Low Scrutiny || Code
Sanity Check**
3. A webhook or watch based automated action
will trigger when a merge is detected against
the "acquiesce" branch. This will create a
"servo_" branch to perform automated tests.
4. Upon the successful passing state of all
required automated tests, the "servo_" branch
will be merged into the acceptance branch by
the CI tool. At this time, the CI tool, or a web
hook action can create a pull request from
"acceptance" to "stable".
5. Evaluation of pull requests to stable
evaluated for releasable state. ** High Scrutiny
Review || Could be Team Lead / Team Review
**
How do I pick a review
structure?
• Pick your favorite dysfunctional government structure:
Autocracy Democracy
Plutocracy
Logocracy
Kakistocracy
github.com/marsupermammal
@pwattstbd
pwatts217@gmail.com
http://www.slideshare.net/PhilipWatts1/codemgmt-48871071
Chose your own
adventure!
Comics Code Samples
Git Hooks
Pre-commit:
Good Bad
Validate Code
before it leaves
your local git
No way to force
compliance with
their use
Prevents all your
syntax fail commits
from entering the
history
Lots of duplication
of code, as every
repo requires its
own config per
developer
Enforces syntax
checking, style,
and other unit test
like functions
Pulling code from
others can break
your commit hooks,
if you’re the only one
using them.
Low Cost, High
Rewards
When cleaning up
your own git repos,
local hooks are easy
to forget about, and
hilarity can ensue.
Pre-receive:
Good Bad
Can be enforced
for all committers
without setup per
developer.
Bane of your
existence when
trying to push
“one last change”.
Prevents everyone
else’s syntax fail
commits from
enterting the history.
Can be slow. As all
commits trigger
hooks run by the
same server.
Enforces syntax
checking, style,
and other unit test
like functions
Different hooks for
different repo types.
Makes for more
administrative
overhead (unless you
automate it)
Great for workflow
orchestration.
Web hooks
Good Bad
Made by
Wizards. Can
do anything.
Require
externally
hosted service
to listen/act.
Seriously,
anything.
Post receive
means git
changes get
dangerous.
Enforce
whatever you
want, you’re
the boss.
Makes the bad
API of other
tools feel like
your problem.
Great always.
Made of Beer
and Bonuses.
Not trivial to
write in most
cases.
Glossary
• Fief - Heritable property or rights granted by an overlord to a vassal who held it in fealty (or "in fee") in return for a form of
feudal allegiance and service. (Yes, it was deliberate to identify developers as the property, instead of as peasants or peons).
• Vassal - A subordinate who placed himself in service to a lord in return for the lord's protection.
• Lord - A person or deity who has authority, control, or power over others.
• Acquiesce - Reluctant agreement without protest.
• Servo - An automatic device that uses error-sensing negative feedback to correct a process. Failed tests yell at you.
• Autocracy - A system of government wherein absolute power resides with a single person. In code review, this is often
viewed as a Benevolent Dictator for Life (BDFL). Obviously, this leaves you prone to a single person’s thoughts.
• Plutocracy - A system of government wherein power resides with the wealthy. In code review, decisions governed by team
members based off of “organizational currency” such as tenure, political clout or membership in social cliches. This can be
prone to creating an “echo chamber”.
• Democracy - A system of government wherein power resides with the populace. In code review, decisions governed by
popular vote. Often very time consuming for the team, very slow, and resistant to innovation.
• Logocracy - Rule by word. In code review, decisions governed by written, often antiquated process.
• Kakistocracy - Rule by the worst. In code review, this is the result when code review is considered scut work, and is
delegated to the least talented, experienced or skilled developers.
• Continuous Delivery - Moving developed code to releasable branches as quickly as possible while adhering to all desired
governance.
• Continuous Integration - Moving releasable code into the primary branch frequently. This is often done through automation.
• Continuous Deployment - Pushing released code in the primary branch directly out to live servers. In Puppet, this is also
known as <= 30minutes after Continuous Integration.

More Related Content

What's hot

AgileLINC Continous Slides by Daniel Harp
AgileLINC Continous Slides by Daniel HarpAgileLINC Continous Slides by Daniel Harp
AgileLINC Continous Slides by Daniel HarpBarry Gavril
 
OSDC 2015: James Fryman | DevOps Next Steps: Event Driven Operation
OSDC 2015: James Fryman | DevOps Next Steps: Event Driven OperationOSDC 2015: James Fryman | DevOps Next Steps: Event Driven Operation
OSDC 2015: James Fryman | DevOps Next Steps: Event Driven OperationNETWAYS
 
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDays Riga
 
Understanding the CloudStack Release Process
Understanding the CloudStack Release ProcessUnderstanding the CloudStack Release Process
Understanding the CloudStack Release Processke4qqq
 
Autopilot, but never let go of the wheel
Autopilot, but never let go of the wheelAutopilot, but never let go of the wheel
Autopilot, but never let go of the wheelSimon McCartney
 
Git hub for designers
Git hub for designersGit hub for designers
Git hub for designersFITC
 
Atlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps SessionAtlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps SessionSourcesense
 
Powerful Automation Made Simple
Powerful Automation Made SimplePowerful Automation Made Simple
Powerful Automation Made SimpleGaetano Giunta
 
7 Apache Process Cloudstack Developer Day
7 Apache Process Cloudstack Developer Day7 Apache Process Cloudstack Developer Day
7 Apache Process Cloudstack Developer DayKimihiko Kitase
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable productJulian Simpson
 
QA Fest 2018. Сергей Король. REACTive automation: how to avoid shooting yours...
QA Fest 2018. Сергей Король. REACTive automation: how to avoid shooting yours...QA Fest 2018. Сергей Король. REACTive automation: how to avoid shooting yours...
QA Fest 2018. Сергей Король. REACTive automation: how to avoid shooting yours...QAFest
 
Outsmarting Merge Edge Cases in Component Based Design
Outsmarting Merge Edge Cases in Component Based DesignOutsmarting Merge Edge Cases in Component Based Design
Outsmarting Merge Edge Cases in Component Based DesignPerforce
 
Austin Elixir: Slack Bots With Hedwig
Austin Elixir: Slack Bots With HedwigAustin Elixir: Slack Bots With Hedwig
Austin Elixir: Slack Bots With Hedwigedebill
 
Jenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeJenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeLuca Milanesio
 
200808 AIM Walking Skeleton
200808 AIM Walking Skeleton200808 AIM Walking Skeleton
200808 AIM Walking SkeletonTroy Young
 
Avoiding integration hell
Avoiding integration hellAvoiding integration hell
Avoiding integration hellaaronbassett
 
Trunk based development
Trunk based developmentTrunk based development
Trunk based developmentgo_oh
 
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...Clinton Wolfe
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for BeginnersNebulaworks
 

What's hot (19)

AgileLINC Continous Slides by Daniel Harp
AgileLINC Continous Slides by Daniel HarpAgileLINC Continous Slides by Daniel Harp
AgileLINC Continous Slides by Daniel Harp
 
OSDC 2015: James Fryman | DevOps Next Steps: Event Driven Operation
OSDC 2015: James Fryman | DevOps Next Steps: Event Driven OperationOSDC 2015: James Fryman | DevOps Next Steps: Event Driven Operation
OSDC 2015: James Fryman | DevOps Next Steps: Event Driven Operation
 
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
 
Understanding the CloudStack Release Process
Understanding the CloudStack Release ProcessUnderstanding the CloudStack Release Process
Understanding the CloudStack Release Process
 
Autopilot, but never let go of the wheel
Autopilot, but never let go of the wheelAutopilot, but never let go of the wheel
Autopilot, but never let go of the wheel
 
Git hub for designers
Git hub for designersGit hub for designers
Git hub for designers
 
Atlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps SessionAtlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps Session
 
Powerful Automation Made Simple
Powerful Automation Made SimplePowerful Automation Made Simple
Powerful Automation Made Simple
 
7 Apache Process Cloudstack Developer Day
7 Apache Process Cloudstack Developer Day7 Apache Process Cloudstack Developer Day
7 Apache Process Cloudstack Developer Day
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
QA Fest 2018. Сергей Король. REACTive automation: how to avoid shooting yours...
QA Fest 2018. Сергей Король. REACTive automation: how to avoid shooting yours...QA Fest 2018. Сергей Король. REACTive automation: how to avoid shooting yours...
QA Fest 2018. Сергей Король. REACTive automation: how to avoid shooting yours...
 
Outsmarting Merge Edge Cases in Component Based Design
Outsmarting Merge Edge Cases in Component Based DesignOutsmarting Merge Edge Cases in Component Based Design
Outsmarting Merge Edge Cases in Component Based Design
 
Austin Elixir: Slack Bots With Hedwig
Austin Elixir: Slack Bots With HedwigAustin Elixir: Slack Bots With Hedwig
Austin Elixir: Slack Bots With Hedwig
 
Jenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeJenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle Time
 
200808 AIM Walking Skeleton
200808 AIM Walking Skeleton200808 AIM Walking Skeleton
200808 AIM Walking Skeleton
 
Avoiding integration hell
Avoiding integration hellAvoiding integration hell
Avoiding integration hell
 
Trunk based development
Trunk based developmentTrunk based development
Trunk based development
 
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for Beginners
 

Similar to Codemgmt

Infrastructure as Code for Network
Infrastructure as Code for NetworkInfrastructure as Code for Network
Infrastructure as Code for NetworkDamien Garros
 
London Atlassian User Group - February 2014
London Atlassian User Group - February 2014London Atlassian User Group - February 2014
London Atlassian User Group - February 2014Steve Smith
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...hamidsamadi
 
A Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor CommunityA Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor CommunityBob Killen
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyMike Brittain
 
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014Matthew Cobby
 
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation Probo.ci Drupal 4 Gov Devops 1/2 day Presentation
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation Zivtech, LLC
 
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Peter Leschev
 
I Don't Test Often ...
I Don't Test Often ...I Don't Test Often ...
I Don't Test Often ...Gareth Bowles
 
I don't always test...but when I do I test in production - Gareth Bowles
I don't always test...but when I do I test in production - Gareth BowlesI don't always test...but when I do I test in production - Gareth Bowles
I don't always test...but when I do I test in production - Gareth BowlesQA or the Highway
 
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesSalesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesAbhinav Gupta
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous DeploymentRon Heft
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Revelation Technologies
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to realityDaniel Gallego Vico
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version ControlNowell Strite
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...garrett honeycutt
 

Similar to Codemgmt (20)

Infrastructure as Code for Network
Infrastructure as Code for NetworkInfrastructure as Code for Network
Infrastructure as Code for Network
 
London Atlassian User Group - February 2014
London Atlassian User Group - February 2014London Atlassian User Group - February 2014
London Atlassian User Group - February 2014
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
 
A Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor CommunityA Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor Community
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at Etsy
 
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
 
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation Probo.ci Drupal 4 Gov Devops 1/2 day Presentation
Probo.ci Drupal 4 Gov Devops 1/2 day Presentation
 
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
 
I Don't Test Often ...
I Don't Test Often ...I Don't Test Often ...
I Don't Test Often ...
 
I don't always test...but when I do I test in production - Gareth Bowles
I don't always test...but when I do I test in production - Gareth BowlesI don't always test...but when I do I test in production - Gareth Bowles
I don't always test...but when I do I test in production - Gareth Bowles
 
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesSalesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous Deployment
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
 
Introduction to Git (part 3)
Introduction to Git (part 3)Introduction to Git (part 3)
Introduction to Git (part 3)
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
 
Git
GitGit
Git
 
Working with Git
Working with GitWorking with Git
Working with Git
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
 

Codemgmt

  • 1. Code Management for Puppet: Understanding the connection between Puppet and Git. Phil Watts Principle Enterprise Director of Self Aggrandizement
  • 2. Why use git? • Distributed (work offline) • Creating branches is trivial • Enforces Trackable Consistency • Change History • It’s awesome.
  • 3. Integration with Puppet: r10k and dynamic environments web hooks are magic
  • 4. Options for Repository Hosting GitHub Stash GitHub Enterprise GitLab* Location Public Web Self-Hosted Self-Hosted or Virtual Appliance Self-Hosted Data Protection Managed Bad Export Tool included Very nice backup tools and Puppet modules Good Luck How to RBAC Fork/Pull, Organizations, Collaborators Branch Level Permissions Control Fork/Pull, Organizations, Collaborators Protected Branches Visual Appeal OMG Octocat Looks like Jira (blegh) So much Octocat Ugly Cost Free/Monthly per private repo Pay per seat (cheap) Pay per seat (not cheap) FREE?!?! Hooks Webhooks only (post receive) pre commit & post receive Web hooks Officially* pre commit & post receive
  • 5. acceptance stable servo feature_branch acquiesce stable feature_branch stable acceptance stable production production production production production Sandbox Deployment Non-Prod Deployment Production Deployment stable control-fiefs control-vassals control-lords Pull from upstream Merge Pull Request Pull Request 1 2 3 4 65 7 1. Developer creates and completes to their satisfaction, a "feature" branch. Then a pull request is created to merge the "feature" branch. 2. Peer review results in the "feature" branch being merged up to "acquiesce". 3. A commit to the "acquiesce" branch results in automated testing in the "servo" branch. If tests succeed, code is merged up to the "acceptance" branch, and a pull request is created. 4. "Team Leader" review to confirm the code change, testing, and process requirements. If acceptable, the code is merged to the "stable" branch. 6. The "stable" branch is submitted to required change control, and is merged into the "production" branch in accordance to production change requirements. 5 & 7. The "stable" and "production" environments are cascaded downstream to serve as baselines for systems in lower environments when not actively being tested against.
  • 6. feature_branch acquiesce servo_branch acceptance stable production CI Robot Change Control Team Review ** Any Other Developer ** Developer "One Repo to rule them all, One Repo to find them, One Repo to bring them all and in the darkness bind them" ~ 1. Developers create feature branches for new code. Upon completion, a pull request is submitted to the "acquiesce" branch. 2. Any approved developer other than the submitter can review and approve the pull request to "acquiesce". **Low Scrutiny || Code Sanity Check** 3. A webhook or watch based automated action will trigger when a merge is detected against the "acquiesce" branch. This will create a "servo_" branch to perform automated tests. 4. Upon the successful passing state of all required automated tests, the "servo_" branch will be merged into the acceptance branch by the CI tool. At this time, the CI tool, or a web hook action can create a pull request from "acceptance" to "stable". 5. Evaluation of pull requests to stable evaluated for releasable state. ** High Scrutiny Review || Could be Team Lead / Team Review **
  • 7. How do I pick a review structure? • Pick your favorite dysfunctional government structure: Autocracy Democracy Plutocracy Logocracy Kakistocracy
  • 9.
  • 10. Git Hooks Pre-commit: Good Bad Validate Code before it leaves your local git No way to force compliance with their use Prevents all your syntax fail commits from entering the history Lots of duplication of code, as every repo requires its own config per developer Enforces syntax checking, style, and other unit test like functions Pulling code from others can break your commit hooks, if you’re the only one using them. Low Cost, High Rewards When cleaning up your own git repos, local hooks are easy to forget about, and hilarity can ensue. Pre-receive: Good Bad Can be enforced for all committers without setup per developer. Bane of your existence when trying to push “one last change”. Prevents everyone else’s syntax fail commits from enterting the history. Can be slow. As all commits trigger hooks run by the same server. Enforces syntax checking, style, and other unit test like functions Different hooks for different repo types. Makes for more administrative overhead (unless you automate it) Great for workflow orchestration. Web hooks Good Bad Made by Wizards. Can do anything. Require externally hosted service to listen/act. Seriously, anything. Post receive means git changes get dangerous. Enforce whatever you want, you’re the boss. Makes the bad API of other tools feel like your problem. Great always. Made of Beer and Bonuses. Not trivial to write in most cases.
  • 11. Glossary • Fief - Heritable property or rights granted by an overlord to a vassal who held it in fealty (or "in fee") in return for a form of feudal allegiance and service. (Yes, it was deliberate to identify developers as the property, instead of as peasants or peons). • Vassal - A subordinate who placed himself in service to a lord in return for the lord's protection. • Lord - A person or deity who has authority, control, or power over others. • Acquiesce - Reluctant agreement without protest. • Servo - An automatic device that uses error-sensing negative feedback to correct a process. Failed tests yell at you. • Autocracy - A system of government wherein absolute power resides with a single person. In code review, this is often viewed as a Benevolent Dictator for Life (BDFL). Obviously, this leaves you prone to a single person’s thoughts. • Plutocracy - A system of government wherein power resides with the wealthy. In code review, decisions governed by team members based off of “organizational currency” such as tenure, political clout or membership in social cliches. This can be prone to creating an “echo chamber”. • Democracy - A system of government wherein power resides with the populace. In code review, decisions governed by popular vote. Often very time consuming for the team, very slow, and resistant to innovation. • Logocracy - Rule by word. In code review, decisions governed by written, often antiquated process. • Kakistocracy - Rule by the worst. In code review, this is the result when code review is considered scut work, and is delegated to the least talented, experienced or skilled developers. • Continuous Delivery - Moving developed code to releasable branches as quickly as possible while adhering to all desired governance. • Continuous Integration - Moving releasable code into the primary branch frequently. This is often done through automation. • Continuous Deployment - Pushing released code in the primary branch directly out to live servers. In Puppet, this is also known as <= 30minutes after Continuous Integration.