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

Boxen-puppetconf

 Boxen-puppetconf

As a rapidly growing company, GitHub's faced some challenges in how to make sure that everyone can get up and running on projects or continue to work on one of the dozens of existing projects if they've never set it up before. What a nightmare! That's what prompted @jbarnette and @wfarr to develop Boxen. Boxen aims to solve all the problems that used to plague on-boarding GitHubbers onto projects with a lot of automation and a case of the "It Just Works". This presentation talks about the history of Boxen, how it works, and some of the lessons learned along the way.

Will Farrington

September 28, 2012
Tweet

More Decks by Will Farrington

Other Decks in Technology

Transcript

  1. Setup
    the

    View Slide

  2. managing an
    army of laptops
    ...with puppet

    View Slide

  3. hi, my name is will farrington

    View Slide

  4. but you might know me as @wfarr
     

    View Slide

  5. i work at a “little-known startup” called
    github

    View Slide

  6. i have “the best job in the world” at
    github

    View Slide

  7. I work on System operations
    System operations
    internal apps
    the setup

    View Slide

  8. love ops? come work with us
    puppet, erlang, ruby, shell, c
    and all the graphs you can shake a stick at

    View Slide

  9. why

    View Slide

  10. View Slide

  11. oh man, this new macbook pro is
    sweet! let me run a bunch of stuff by
    hand so I can get some work done in
    about 6 to 8 hours, maybe.
    - some folks

    View Slide

  12. View Slide

  13. oh man, this new macbook pro is
    sweet! let me run a bunch of stuff by
    hand so I can get some work done in
    about 6 to 8 hours, maybe.
    - a bunch of crazy folks

    View Slide

  14. i thought we cared about stuff

    View Slide

  15. View Slide

  16. testing

    View Slide

  17. repeatability

    View Slide

  18. Automation

    View Slide

  19. they matter for our software

    View Slide

  20. they matter for our servers

    View Slide

  21. but not for our laptops

    View Slide

  22. ಠ_ಠ

    View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. what

    View Slide

  27. Setup
    the

    View Slide

  28. Setup
    the

    View Slide

  29. boxen

    View Slide

  30. a living, breathing software project
    that tests and automates every little
    bit of your machine with love

    View Slide

  31. @jbarnette

    View Slide

  32. chrome, colloquy, dropbox, elasticsearch, emacs,
    erlang, git, homebrew, hub, iterm2, java, macvim,
    memcache, mongodb, mysql, nginx, nodejs, nvm,
    1passwd, personalization, postgresql, projects,
    python, qt, rbenv, rdio, redis, ruby, solr, sparrow,
    textmate, virtualbox, viscosity, wget, xcode, xquartz,
    zeromq, zsh, and more daily.

    View Slide

  33. View Slide

  34. in

    View Slide

  35. View Slide

  36. hours of frustration getting
    github.com and other projects
    even working locally

    View Slide

  37. View Slide

  38. reality

    View Slide

  39. View Slide

  40. View Slide

  41. View Slide

  42. Text

    View Slide

  43. View Slide

  44. View Slide

  45. The Command Line Interface

    View Slide

  46. » boxen --projects
    * github (as in .com)

    View Slide

  47. github » script/bootstrap
    github » script/server
    github » open github.dev
    # SHIPPING!

    View Slide

  48. » boxen slumlord
    # welcome to boomtown

    View Slide

  49. » boxen --stealth
    # YOLO mode

    View Slide

  50. » boxen --profile
    # Spock mode

    View Slide

  51. View Slide

  52. boxen is a stdlib for puppet

    View Slide


  53. boxen is a stdlib for puppet

    View Slide

  54. class github::projects::octostatus {
    require redis
    ...
    }

    View Slide

  55. class github::projects::octostatus {
    ...
    $dir = "${github::config::srcdir}/
    octostatus"
    ...
    }

    View Slide

  56. class github::projects::octostatus {
    ...
    git::repo { $dir:
    source => 'github/octostatus'
    }
    ...
    }

    View Slide

  57. class github::projects::octostatus {
    ...
    ruby::local { $dir:
    version => '1.9.3-p194',
    require => Git::Repo[$dir]
    }
    }

    View Slide

  58. View Slide

  59. I like doing
    things my
    way

    View Slide

  60. I like doing
    things my
    way

    View Slide

  61. class github::people::hubot {
    include github::projects::all
    }

    View Slide

  62. class github::people::keavy {
    include gitx
    include onepassword
    include sizeup
    include sparrow
    include textmate
    }

    View Slide

  63. class github::people::yossef {
    package { 'Alfred':
    provider => 'appdmg',
    source => $alfred_dmg_url;
    }
    }

    View Slide

  64. class github::people::yossef {
    package { 'Mailplane':
    provider => 'compressed_app',
    source => 'http://somewhere/app.zip'
    }
    }

    View Slide

  65. class github::people::wfarr {
    git::config::global {
    'alias.st':
    value => 'status';
    'alias.ci':
    value => 'commit';
    }
    }

    View Slide

  66. class github::people::wfarr {
    file { '/Users/wfarr/.gitignore':
    ensure => present,
    content => '.DS_STORE'
    }
    }

    View Slide

  67. class github::people::wfarr {
    package { 'emacs': }
    git::repo { '/Users/wfarr/.emacs.d':
    source => 'wfarr/.emacs.d',
    submodules => true
    }
    }

    View Slide

  68. class github::people::wfarr {
    package { 'emacs': }
    git::repo { '/Users/wfarr/.emacs.d':
    source => 'wfarr/.emacs.d',
    submodules => true
    }
    }

    View Slide

  69. class github::people::wfarr {
    osx_defaults { 'troll protection':
    ensure => present,
    domain => 'com.apple.screensaver',
    key => 'askForPassword',
    value => 1,
    user => 'wfarr'
    }
    }

    View Slide

  70. lessons

    View Slide

  71. puppeteer
    supportocat

    View Slide

  72. people will do crazy things

    View Slide

  73. it is your job to fix it if it breaks

    View Slide

  74. no matter what
    it is your job to fix it if it breaks

    View Slide

  75. developers and designers are
    really good at breaking things

    View Slide

  76. people will not report
    “minor” problems

    View Slide

  77. people will barely report
    “major” problems

    View Slide

  78. View Slide

  79. not having to report bugs
    makes people happy

    View Slide

  80. getting regular bug reports
    makes us happy

    View Slide

  81. users getting github
    notifications that the bug
    they hit and never even
    reported is already fixed

    View Slide

  82. View Slide

  83. reduce potential for bugs by
    vendoring everything

    View Slide

  84. View Slide

  85. View Slide

  86. » du -sh /opt/boxen
    4.1G /opt/boxen

    View Slide

  87. there’s

    View Slide

  88. View Slide

  89. =(

    View Slide

  90. » env | grep BOXEN_ \
    | wc -l
    24

    View Slide

  91. » env | grep \
    BOXEN_REDIS_PORT
    BOXEN_REDIS_PORT=16379

    View Slide

  92. » env | grep \
    BOXEN_MYSQL_PORT
    BOXEN_MYSQL_PORT=13306

    View Slide

  93. View Slide

  94. people will never
    remember to update
    regularly

    View Slide

  95. tell people when they should update

    View Slide

  96. View Slide

  97. => Installing qt...

    View Slide

  98. View Slide

  99. View Slide

  100. => Fetching snapshot...
    => Installing qt...

    View Slide

  101. => Fetching snapshot...
    => Installing
    ruby-1.9.3...

    View Slide

  102. => Fetching snapshot...
    => Installing
    node-0.6.8...

    View Slide

  103. puppet defined types are slow

    View Slide

  104. start with puppet-defined types

    View Slide

  105. then rewrite in ruby

    View Slide

  106. we don't have the
    ability to mandate
    environments

    View Slide

  107. we don't want to
    mandate
    environments

    View Slide

  108. we have to provide
    something
    dramatically
    better than just
    doing it yourself

    View Slide

  109. we have to provide
    something
    dramatically
    EASIER than just
    doing it yourself

    View Slide

  110. View Slide

  111. prim
    donn

    View Slide

  112. boxen is not a tool for
    administration

    View Slide

  113. boxen does not want to be
    a tool for administration

    View Slide

  114. boxen is a tool
    for people who
    want to get stuff
    done, sanely

    View Slide

  115. boxen has goals

    View Slide

  116. user-extensible

    View Slide

  117. framework

    View Slide

  118. stable

    View Slide

  119. easy to use

    View Slide

  120. documented to kingdom come

    View Slide

  121. not a maintenance nightmare

    View Slide

  122. zomg GIMME

    View Slide

  123. you don’t get it just yet =(

    View Slide

  124. we are working hard to
    open source it

    View Slide

  125. the goal was to OSS
    today

    View Slide

  126. but some mes things
    come up

    View Slide

  127. View Slide

  128. View Slide

  129. View Slide

  130. View Slide

  131. View Slide

  132. View Slide

  133. really

    View Slide

  134. private “early access”
    for “friends and
    family” next next week

    View Slide

  135. more testers
    ==
    more fixes
    ==
    everyone gets it sooner

    View Slide

  136. how much is ge ng
    opened up exactly?

    View Slide

  137. boxen-core
    boxen-web
    boxen-mac

    View Slide

  138. TONS of providers,
    types, and more to
    contribute BACK to
    puppet proper

    View Slide

  139. oh, and it runs on
    Puppet 3.0

    View Slide

  140. boxen

    View Slide

  141. questions

    View Slide

  142. View Slide

  143. thanks

    View Slide

  144. speakerdeck.com/u/
    wfarr/p/boxen

    View Slide

  145. drinkup @ Zekes
    8:30pm

    View Slide