Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Unsucking Your Team's Development Environment

Zach Holman
September 14, 2012

Unsucking Your Team's Development Environment

Success can bring many glamorous changes to your company: hiring more employees, getting free coffee, and giving everyone a private jet filled with cash and endangered African predatory cats.

Success can lead to less-glamorous problems, though. As you grow, your team's development environment becomes really important. How long does it take to clone, set up, and boot your apps? Can your employees still be productive on an aging codebase? How can you automate CI, hooks, and other setup for new projects? Is any of this fun anymore?

GitHub ran into these problems as we expanded our team tremendously over the last two years. Let's look at some of the ways we've improved our employees' development environments.

Zach Holman

September 14, 2012
Tweet

More Decks by Zach Holman

Other Decks in Programming

Transcript

  1. unsucking
    YOUR TEAM’S
    ENVIRONMENT
    DEVELOPMENT

    View full-size slide

  2. NO
    FORKING
    HOLMAN
    @
    LOST
    YO QUIT READING THIS SHIT

    View full-size slide

  3. WE STARTED WITH
    one QUEUE

    View full-size slide

  4. THIS QUEUE WORKED SORTA
    OBJECTS IN,
    TASK OCCURS

    View full-size slide

  5. OH SHIT
    BLOCKING
    OPERATIONS

    View full-size slide

  6. THEN SPLIT INTO 2 QUEUES
    SEGREGATE BY
    CATEGORY

    View full-size slide

  7. 2 QUEUES, 3x THROUGHPUT
    EXPONENTIAL
    GROWTH

    View full-size slide

  8. SATURATED AVAILABILITY
    EXPERIENCING
    BOTTLENECKS

    View full-size slide

  9. THIS IS GITHUB’S GODDAMN
    TOILET SITUATION

    View full-size slide

  10. TWO GENDERED BATHROOMS
    ZOMG WHY
    AM I WAITING

    View full-size slide

  11. It’s because of this:

    View full-size slide

  12. GITHUB EMPLOYEES
    5 8
    2009
    2008

    View full-size slide

  13. GITHUB EMPLOYEES
    2009 2010
    5 8 14
    2008

    View full-size slide

  14. GITHUB EMPLOYEES
    2009 2010 2011
    5 8
    14 54
    2008

    View full-size slide

  15. GITHUB EMPLOYEES
    2008 2009 2010 2011 2012
    5 8
    14 54
    114

    View full-size slide

  16. WE’VE THOUGHT A LOT
    ABOUT ONBOARDING

    View full-size slide

  17. IT’S NOT JUST
    TOILET LATENCY
    ABOUT

    View full-size slide

  18. 2.5 YEARS AGO:
    1 WEEK
    TODAY:
    20 MINUTES
    DURATION FROM HIRE TO BOOT
    (a )
    (every a )

    View full-size slide

  19. THINK THROUGH MAKING
    YOUR ENVIRONMENT
    SUCK LESS

    View full-size slide

  20. PAIN IS MULTIPLIED
    ACROSS YOUR
    WHOLE COMPANY

    View full-size slide

  21. THE APP
    THE STACK
    THE DEPLOY
    T H E C O M P A N Y

    View full-size slide

  22. THE APP
    THE STACK
    THE DEPLOY
    T H E C O M P A N Y

    View full-size slide

  23. I S
    Y O U R
    F O U N D A T I O N
    THE APP

    View full-size slide

  24. remembe :
    EVERY APP SHOULD HAVE A
    ONE-LINER INSTALL
    REALLY.

    View full-size slide

  25. EVEN LARGE PROJECTS CAN HAVE A
    TUTORIAL-STYLE SCRIPT
    remembe :

    View full-size slide

  26. THINGS
    SUCK
    LESS HOMEBREW
    FOREMAN
    RBENV
    BUNDLER

    View full-size slide

  27. AUTOMATE
    AUTOMATE
    AUTOMATE
    AUTOMATE
    AUTOMATE
    AUTOMATE

    View full-size slide

  28. APP BOOTSTRAP

    View full-size slide

  29. BOOTSTRAP
    REPLICATE-REPO
    CIBUILD
    SCRIPT/

    View full-size slide

  30. BOOTSTRAP
    SCRIPT/
    ALL-IN-ONE SCRIPT
    THAT SETS UP
    EVERYTHING

    View full-size slide

  31. BOOTSTRAP
    SCRIPT/
    DEPENDENCY CHECKS + MIGRATIONS
    +
    BUNDLER ASSET COMPILATION

    View full-size slide

  32. BOOTSTRAP
    SCRIPT/
    S P E E D
    MD5 CHECKSUM:
    GEMFILE + ASSETS

    View full-size slide

  33. BOOTSTRAP
    SCRIPT/
    everywhere SCRIPT/SERVER
    SCRIPT/CONSOLE
    CI

    View full-size slide

  34. BOOTSTRAP
    SCRIPT/
    DESIGNERS ❤ THIS

    View full-size slide

  35. BOOTSTRAP
    SCRIPT/
    NON-TECHNICALS ❤ THIS

    View full-size slide

  36. BOOTSTRAP
    SCRIPT/
    DEVELOPERS ❤ THIS

    View full-size slide

  37. REPLICATE-REPO
    SCRIPT/
    A SUPPORT SCRIPT
    THAT LOADS
    PRODUCTION DATA
    LOCALLY

    View full-size slide

  38. REPLICATE-REPO
    SCRIPT/
    FLY YOUR
    PRODUCTION AR
    ASSOCIATIONS TO
    YOU IN DEVELOPMENT
    an rail
    dhh

    View full-size slide

  39. REPLICATE-REPO
    SCRIPT/
    an rail

    View full-size slide

  40. REPLICATE-REPO
    SCRIPT/
    FOR US, IT’S REPLICATE-REPO
    REPLICATE-#{OBJECT}
    BUT IT COULD BE YOUR

    View full-size slide

  41. REPLICATE-REPO
    SCRIPT/
    /RTOMAYKO/REPLICATE
    HTTP://

    View full-size slide

  42. REPLICATE-REPO
    SCRIPT/
    DUMPS BELONGS_TO &
    HAS_ONE ASSOCIATIONS

    View full-size slide

  43. REPLICATE-REPO
    SCRIPT/
    $ script/replicate-repo holman/spark
    CLONES ISSUES, PULL REQUESTS,
    USERS, GIT DATA, ETC.

    View full-size slide

  44. REPLICATE-REPO
    SCRIPT/
    AUTOMATE
    AUTOMATE
    AUTOMATE
    AUTOMATE
    AUTOMATE
    AUTOMATE
    BORING
    SUPPORT TASKS

    View full-size slide

  45. CIBUILD
    SCRIPT/
    OUR
    CONTINUOUS INTEGRATION
    ENVIRONMENT
    PREPARATION SCRIPT

    View full-size slide

  46. CIBUILD
    SCRIPT/
    SET ENV VARS + LOAD GC CONFIG
    +
    CLEAN WORK DIR BOOTSTRAP

    View full-size slide

  47. CIBUILD
    SCRIPT/
    VERSION CONTROL
    you TEST ENVIRONMENT

    View full-size slide

  48. USE
    COMPUTERS
    TO DO
    THINGS

    View full-size slide

  49. USE
    HUMANS
    TO DRINK
    WITH

    View full-size slide

  50. USE
    COMPUTERS
    TO DO
    THINGS

    View full-size slide

  51. THE STACK
    THE APP
    THE DEPLOY
    T H E C O M P A N Y

    View full-size slide

  52. { GROUP PARTICIPATION TIME }

    View full-size slide

  53. EVERYONE LIFT YOUR

    View full-size slide

  54. OKAY NOW
    SMASH THEM

    View full-size slide

  55. OKAY, MAYBE THEY’RE
    EXPENSIVE, BUT THEY’RE
    ALSO A PAIN TO SET UP

    View full-size slide

  56. MACHINES SHOULD BE
    expendable

    View full-size slide

  57. WE’VE DONE THAT

    View full-size slide

  58. I COULD
    SMASH
    THIS
    LAPTOP

    View full-size slide

  59. JUST KIDDING
    OMG I’D GET MURDERED

    View full-size slide

  60. AUTOMATED
    MACHINE
    SETUP

    20 min

    View full-size slide

  61. FIRST DAY
    GET A LAPTOP
    RUN A ONE-LINER
    HAVE A BEER
    HACK

    View full-size slide

  62. $ gh-setup project
    < >

    View full-size slide

  63. DEPENDENCIES PROCESSES
    +
    fo 50 SERVICES
    & APPS

    View full-size slide

  64. APPS
    DROPBOX HOMEBREW
    + +
    CHROME + 1PASSWORD + ETC.

    View full-size slide

  65. DEPENDENCIES
    MYSQL NODE
    + + REDIS +
    POSTGRES
    RIAK
    + + RBENV + ETC.

    View full-size slide

  66. +
    CONFIG
    FULL-DISK ENCRYPTION
    SCREEN LOCKS
    VPN
    + ETC.

    View full-size slide

  67. AUTO-REPORTING
    OF ANY FAILURE TO GITHUB ISSUES

    View full-size slide

  68. USE
    COMPUTERS
    TO DO
    THINGS

    View full-size slide

  69. THE DEPLOY
    THE APP
    THE STACK
    T H E C O M P A N Y

    View full-size slide

  70. remembe :
    DON’T HANDLE
    YOUR OWN DEPLOYS

    View full-size slide

  71. HUBOT
    HEAVEN
    +

    View full-size slide

  72. HUBOT
    NODE.JS CHAT BOT
    HUNDREDS OF PLUGINS

    View full-size slide

  73. HUBOT DEPLOY X TO Y

    View full-size slide

  74. HUBOT DEPLOY X TO Y
    DEPLOY GITHUB TO PRODUCTION
    DEPLOY GITHUB TO PRODUCTION/FE
    DEPLOY SMOKE TO FS12,FE1

    View full-size slide

  75. HUBOT DEPLOY X TO Y
    DEPLOY GITHUB TO PRODUCTION
    DEPLOY GITHUB TO PRODUCTION/FE
    DEPLOY SMOKE/HOTFIX TO FS12,FE1

    View full-size slide

  76. HUBOT
    HEAVEN
    +

    View full-size slide

  77. HEAVEN
    CAPISTRANO OR HEROKU
    SINATRA APP
    API TO HUBOT
    RUNS DEPLOYS ON OUR BOXES

    View full-size slide

  78. HEAVEN
    DEPLOY LOCKING
    1. YOU PUSH A BRANCH
    2. CI STARTS A BUILD
    3. BUILD PASSES
    4. YOU DEPLOY BRANCH
    5. HEAVEN PREVENTS DEPLOY CONFLICTS
    6.YOU MERGE BRANCH
    7. HEAVEN UNLOCKS DEPLOYS

    View full-size slide

  79. HUBOT
    HEAVEN
    +
    FLEXIBLE
    SAFE
    EASY

    View full-size slide

  80. USE
    COMPUTERS
    TO DO
    THINGS

    View full-size slide

  81. T H E C O M P A N Y
    THE APP
    THE STACK
    THE DEPLOY

    View full-size slide

  82. remembe :
    TAKE AWAY
    THE BULLSHIT

    View full-size slide

  83. JUST BEING AN EMPLOYEE
    ADDS A LOT OF OVERHEAD
    LOGINS
    SITES
    TERMS
    REPORTS PAYROLL
    NAMES COMMUNICATION

    View full-size slide

  84. REDUCE IT
    OAUTH EVERYTHING
    50+ INTERNAL APPS UNDER OAUTH

    View full-size slide

  85. REDUCE IT
    BUILD HELPERS
    TEAM APP HELPS US COMMUNICATE

    View full-size slide

  86. CLARIFY IT
    WRITE A GUIDE
    FIRST-DAY GUIDE TO THE COMPANY

    View full-size slide

  87. CLARIFY IT
    MAKE IT ACCESSIBLE
    MONITORS APP AND OFFICE TVS

    View full-size slide

  88. USE
    COMPUTERS
    TO BUILD
    THINGS THAT CAN HELP YOUR
    ORGANIZATION SCALE TO THE EXTENT
    THAT NEW HIRES ACCLIMATE
    WITHOUT A LOT OF STRESS

    View full-size slide

  89. THE APP
    THE STACK
    THE DEPLOY
    T H E C O M P A N Y

    View full-size slide

  90. AUTOMATE EVERYTHING

    View full-size slide

  91. WE HAVE ZERO MANAGERS
    BECAUSE WE AUTOMATE

    View full-size slide

  92. LONG-TERM BENEFIT
    WILL ALWAYS OUTWEIGH
    SHORT-TERM COST

    View full-size slide

  93. NO
    FORKING
    HOLMAN
    @
    LOST
    YO QUIT READING THIS SHIT
    ZACHHOLMAN.COM/TALKS

    View full-size slide