SlideShare a Scribd company logo
1 of 29
Download to read offline
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 1/29
Automating Community Contributions
Jeff McCune
Twitter: @0xEFF
Email: jeff@puppetlabs.com
http://puppetlabs.com
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 2/29
We'll Cover:
Process
Challenging 2012 process
Improved 2013 process
Automation & Tooling
Github (patches)
Travis (tests)
Trello (work items)
Puppet Webhooks (automation)
Questions
Please ask questions during or after the talk, there will be time.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 3/29
Merge more patches with automation
Dedicated people work well
Context switching is a challenge
Automation
Reduce context switching
Single pane of glass
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 4/29
2012 Process
Platform Team
Bug Fixes
New Features
Security Incidents
Community Pull Requests
Two types of work
Planned - Bugs and Features
Unplanned - Pull Requests and Security
Pull requests often came last in the priority list
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 5/29
2012 Process Outcome
Large and growing backlog
No response for months
Sprints to "catch up"
Public complaints from key community members
Stressed out team
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 6/29
2012 Results
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 7/29
2013 Process
Community Team
Community Pull Requests
Goal: 2 PM next business day response
One type of work, not two
Reduced context switching
Platform Team
Bug Fixes
New Features
Security Incidents
Reduced context switching
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 8/29
2013 Process
Community Team responsibilities:
Community Pull Requests
Platform Team responsibilities:
Bug Fixes
New Features
Security Incidents
One type of work:
Unplanned - Pull Requests and Security
Pull requests are consistently prioritized.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 9/29
2013 Results
We're merging ~ 15 community patches per week
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 10/29
Process Conclusion
Dedicated People
Minimize context switching
Decreased backlog, faster response time.
Backlog down to 25 from 80
New pull requests responded to within two days instead of months.
Automating the process
With a solid process in place, we focused on automating the tedious aspects.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 11/29
Work in Flight
Trello
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 12/29
Automation and Tooling
Github (patches)
Travis (tests)
Trello (work items)
Three separate tools, lots of switching back and forth.
Puppet Webhooks puts it all in once place.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 13/29
Why more Tooling?
Too many sources of information are tedious and error prone to review.
Issue Tracker (Should I work on this now?)
Jenkins and Travis (Does this patch break stuff?)
Github (What are people saying about this patch?)
CLA (Has the contributor signed the license agreement?)
Trello (What should we be working on?)
All of this information is important. It's also spread out on four or more different sites. It
was often overlooked.
A solution is to move all of the information into one place.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 14/29
All information in Trello
Our goal is to get all of the information we need to review a pull request into Trello.
New pull request creates a card.
Code comments
Contributor bio
CLA Information
select(contributor)
Completed this week
Puppet, Facter, Hiera, stdlib on one board
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 15/29
Gepetto Bot
Gepetto Bot is a service account with a profile on Github, Trello, and Heroku. The
puppet-webhooks Heroku app logs into these services as Gepetto Bot.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 16/29
Consolidated Information
Gepetto Bot gathers contributor bio using the Github API:
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 17/29
Board Columns
Cards move left to right. Gepetto Bot creates them in the Response Needed column.
Response Needed
Accepted
Doing
Waiting on Contributor
Waiting > 1 week
Going through CI
Finished this Iteration
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 18/29
How it works
Webhooks
Github executes a callback when events happen. The callback is a very simple HTTP
POST with a JSON body containing data about the event.
Think push notifications for the web.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 19/29
How it works
The Puppet Webhooks code running in Heroku receives the HTTP POST and:
1. Github posts JSON to our Heroku app
2. Persist the JSON to a Delayed Job queue
3. Start a Delayed Job worker process using workless gem
4. Data is posted to Trello in a matter of seconds
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 20/29
Why use Delayed Job?
Heroku provides:
Small PostgreSQL databases for free
750 hours of process time for free
31 x 24 = 744 hours for the web process
6 "extra" hours for free
Automatic retries with back-off
The workless gem allows us to only run DJ worker processes when there's actually
work to be done.
Note: While this is all free of charge, a credit card is required to use the Heroku API
with workless.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 21/29
Automatic Process Management
The web process runs persistently.
bundle exec thin start ­p $PORT ­e $RACK_ENV
The worker process runs only when there's work to be done.
bundle exec rake jobs:worksilent
Workless automatically adjusts the worker dyno:
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 22/29
What is automated?
New Pull Request => New Trello Card
Code Comment => Trello Comment
Collect Contributor Bio
Card due Date
Weekly Summary of completed cards
Unimplemented event handlers
Pull Request is closed
New code is pushed
Travis CI tests complete
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 23/29
Weekly summary email
Sent to puppet-dev mailing list weekly
Automated summary of completed Trello cards
Scans card comments and extracts summary:matches
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 24/29
How the weekly summary works
Github Gist as a persistent data store!
1. App reads a Liquid template from a raw github URL
2. Collect all completed Trello cards
3. Fill in the template with the card data
4. Post the resulting Markdown back to the Gist
No persistent state in the app or the database. Liquid template is easily updated.
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 25/29
Summary Template
Header:
## Puppet Dev Community Summary
 * Finished Card Total: **{{ cards.size }}**
{% for section in sections %} * {{ section[0] }}: {{ section[1].size }}
{% endfor %}
Sections:
{% for section in sections %}## {{ section[0] }}
Cards:
{% for card in section[1] %}#### [{{card.title}}]({{card.url}})
{{card.message }}
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 26/29
Post back to Github
heroku run bundle exec rake jobs:summary
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 27/29
Tooling Wrap Up
Automate the Tedious Stuff
Try the Puppet Webhooks App
github.com/puppetlabs/puppet-webhooks
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 28/29
What we covered
Process
Context Switches = (ಥ_ಥ)
Dedicated People = (◕‿◕)
Automation & Tooling
Github, Travis, Trello
Puppet Webhooks automates all three
Key Message
Merge more patches with automation
8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis
localhost:9090/onepage 29/29
Thank You! Questions?
Jeff McCune
0xEFF
jeff@puppetlabs.com

More Related Content

Similar to Automating Community Code Contributions to Puppet with Ruby, GitHub, Heroku, Trello and Travis

Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
LearnWeb Taiwan
 

Similar to Automating Community Code Contributions to Puppet with Ruby, GitHub, Heroku, Trello and Travis (20)

ChainerUI v0.2, v0.3
ChainerUI v0.2, v0.3ChainerUI v0.2, v0.3
ChainerUI v0.2, v0.3
 
Building Event-Based Systems for the Real-Time Web
Building Event-Based Systems for the Real-Time WebBuilding Event-Based Systems for the Real-Time Web
Building Event-Based Systems for the Real-Time Web
 
The new Odoo community organization and platform
The new Odoo community organization and platformThe new Odoo community organization and platform
The new Odoo community organization and platform
 
Fun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-byFun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-by
 
BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話
 
Freenet: The technical part of the solution for Freedom of the Press in the I...
Freenet: The technical part of the solution for Freedom of the Press in the I...Freenet: The technical part of the solution for Freedom of the Press in the I...
Freenet: The technical part of the solution for Freedom of the Press in the I...
 
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and DockerOSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
 
Continuous integration in github
Continuous integration in githubContinuous integration in github
Continuous integration in github
 
Jupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at ScaleJupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at Scale
 
Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best practices - September 2019Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best practices - September 2019
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
Flume office-hours-110228
Flume office-hours-110228Flume office-hours-110228
Flume office-hours-110228
 
From Generator to Fiber the Road to Coroutine in PHP
From Generator to Fiber the Road to Coroutine in PHPFrom Generator to Fiber the Road to Coroutine in PHP
From Generator to Fiber the Road to Coroutine in PHP
 
Own the build
Own the buildOwn the build
Own the build
 
Mastering Docker on a Raspberry Pi
Mastering Docker on a Raspberry PiMastering Docker on a Raspberry Pi
Mastering Docker on a Raspberry Pi
 
Dev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyDev8d 2011-pipe2 py
Dev8d 2011-pipe2 py
 
Mockito - How a mocking library built a real community
Mockito - How a mocking library built a real communityMockito - How a mocking library built a real community
Mockito - How a mocking library built a real community
 
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
 
Iteratively introducing Puppet technologies in the brownfield; Jeffrey Miller
Iteratively introducing Puppet technologies in the brownfield; Jeffrey MillerIteratively introducing Puppet technologies in the brownfield; Jeffrey Miller
Iteratively introducing Puppet technologies in the brownfield; Jeffrey Miller
 
Xdebug
XdebugXdebug
Xdebug
 

More from Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
Puppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
Puppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
Puppet
 

More from Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

Automating Community Code Contributions to Puppet with Ruby, GitHub, Heroku, Trello and Travis

  • 1. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 1/29 Automating Community Contributions Jeff McCune Twitter: @0xEFF Email: jeff@puppetlabs.com http://puppetlabs.com
  • 2. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 2/29 We'll Cover: Process Challenging 2012 process Improved 2013 process Automation & Tooling Github (patches) Travis (tests) Trello (work items) Puppet Webhooks (automation) Questions Please ask questions during or after the talk, there will be time.
  • 3. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 3/29 Merge more patches with automation Dedicated people work well Context switching is a challenge Automation Reduce context switching Single pane of glass
  • 4. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 4/29 2012 Process Platform Team Bug Fixes New Features Security Incidents Community Pull Requests Two types of work Planned - Bugs and Features Unplanned - Pull Requests and Security Pull requests often came last in the priority list
  • 5. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 5/29 2012 Process Outcome Large and growing backlog No response for months Sprints to "catch up" Public complaints from key community members Stressed out team
  • 6. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 6/29 2012 Results
  • 7. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 7/29 2013 Process Community Team Community Pull Requests Goal: 2 PM next business day response One type of work, not two Reduced context switching Platform Team Bug Fixes New Features Security Incidents Reduced context switching
  • 8. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 8/29 2013 Process Community Team responsibilities: Community Pull Requests Platform Team responsibilities: Bug Fixes New Features Security Incidents One type of work: Unplanned - Pull Requests and Security Pull requests are consistently prioritized.
  • 9. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 9/29 2013 Results We're merging ~ 15 community patches per week
  • 10. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 10/29 Process Conclusion Dedicated People Minimize context switching Decreased backlog, faster response time. Backlog down to 25 from 80 New pull requests responded to within two days instead of months. Automating the process With a solid process in place, we focused on automating the tedious aspects.
  • 11. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 11/29 Work in Flight Trello
  • 12. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 12/29 Automation and Tooling Github (patches) Travis (tests) Trello (work items) Three separate tools, lots of switching back and forth. Puppet Webhooks puts it all in once place.
  • 13. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 13/29 Why more Tooling? Too many sources of information are tedious and error prone to review. Issue Tracker (Should I work on this now?) Jenkins and Travis (Does this patch break stuff?) Github (What are people saying about this patch?) CLA (Has the contributor signed the license agreement?) Trello (What should we be working on?) All of this information is important. It's also spread out on four or more different sites. It was often overlooked. A solution is to move all of the information into one place.
  • 14. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 14/29 All information in Trello Our goal is to get all of the information we need to review a pull request into Trello. New pull request creates a card. Code comments Contributor bio CLA Information select(contributor) Completed this week Puppet, Facter, Hiera, stdlib on one board
  • 15. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 15/29 Gepetto Bot Gepetto Bot is a service account with a profile on Github, Trello, and Heroku. The puppet-webhooks Heroku app logs into these services as Gepetto Bot.
  • 16. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 16/29 Consolidated Information Gepetto Bot gathers contributor bio using the Github API:
  • 17. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 17/29 Board Columns Cards move left to right. Gepetto Bot creates them in the Response Needed column. Response Needed Accepted Doing Waiting on Contributor Waiting > 1 week Going through CI Finished this Iteration
  • 18. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 18/29 How it works Webhooks Github executes a callback when events happen. The callback is a very simple HTTP POST with a JSON body containing data about the event. Think push notifications for the web.
  • 19. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 19/29 How it works The Puppet Webhooks code running in Heroku receives the HTTP POST and: 1. Github posts JSON to our Heroku app 2. Persist the JSON to a Delayed Job queue 3. Start a Delayed Job worker process using workless gem 4. Data is posted to Trello in a matter of seconds
  • 20. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 20/29 Why use Delayed Job? Heroku provides: Small PostgreSQL databases for free 750 hours of process time for free 31 x 24 = 744 hours for the web process 6 "extra" hours for free Automatic retries with back-off The workless gem allows us to only run DJ worker processes when there's actually work to be done. Note: While this is all free of charge, a credit card is required to use the Heroku API with workless.
  • 21. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 21/29 Automatic Process Management The web process runs persistently. bundle exec thin start ­p $PORT ­e $RACK_ENV The worker process runs only when there's work to be done. bundle exec rake jobs:worksilent Workless automatically adjusts the worker dyno:
  • 22. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 22/29 What is automated? New Pull Request => New Trello Card Code Comment => Trello Comment Collect Contributor Bio Card due Date Weekly Summary of completed cards Unimplemented event handlers Pull Request is closed New code is pushed Travis CI tests complete
  • 23. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 23/29 Weekly summary email Sent to puppet-dev mailing list weekly Automated summary of completed Trello cards Scans card comments and extracts summary:matches
  • 24. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 24/29 How the weekly summary works Github Gist as a persistent data store! 1. App reads a Liquid template from a raw github URL 2. Collect all completed Trello cards 3. Fill in the template with the card data 4. Post the resulting Markdown back to the Gist No persistent state in the app or the database. Liquid template is easily updated.
  • 25. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 25/29 Summary Template Header: ## Puppet Dev Community Summary  * Finished Card Total: **{{ cards.size }}** {% for section in sections %} * {{ section[0] }}: {{ section[1].size }} {% endfor %} Sections: {% for section in sections %}## {{ section[0] }} Cards: {% for card in section[1] %}#### [{{card.title}}]({{card.url}}) {{card.message }}
  • 26. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 26/29 Post back to Github heroku run bundle exec rake jobs:summary
  • 27. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 27/29 Tooling Wrap Up Automate the Tedious Stuff Try the Puppet Webhooks App github.com/puppetlabs/puppet-webhooks
  • 28. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 28/29 What we covered Process Context Switches = (ಥ_ಥ) Dedicated People = (◕‿◕) Automation & Tooling Github, Travis, Trello Puppet Webhooks automates all three Key Message Merge more patches with automation
  • 29. 8/24/13 Automating Community Contributions to Puppet with Github, Heroku, Trello and Travis localhost:9090/onepage 29/29 Thank You! Questions? Jeff McCune 0xEFF jeff@puppetlabs.com