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

Boxen-puppetconf

Will Farrington
September 28, 2012

 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. managing an
    army of laptops
    ...with puppet

    View full-size slide

  2. hi, my name is will farrington

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  8. 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 full-size slide

  9. 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 full-size slide

  10. i thought we cared about stuff

    View full-size slide

  11. repeatability

    View full-size slide

  12. they matter for our software

    View full-size slide

  13. they matter for our servers

    View full-size slide

  14. but not for our laptops

    View full-size slide

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

    View full-size slide

  16. 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 full-size slide

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

    View full-size slide

  18. The Command Line Interface

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  21. » boxen slumlord
    # welcome to boomtown

    View full-size slide

  22. » boxen --stealth
    # YOLO mode

    View full-size slide

  23. » boxen --profile
    # Spock mode

    View full-size slide

  24. boxen is a stdlib for puppet

    View full-size slide


  25. boxen is a stdlib for puppet

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  30. I like doing
    things my
    way

    View full-size slide

  31. I like doing
    things my
    way

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  41. puppeteer
    supportocat

    View full-size slide

  42. people will do crazy things

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  45. developers and designers are
    really good at breaking things

    View full-size slide

  46. people will not report
    “minor” problems

    View full-size slide

  47. people will barely report
    “major” problems

    View full-size slide

  48. not having to report bugs
    makes people happy

    View full-size slide

  49. getting regular bug reports
    makes us happy

    View full-size slide

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

    View full-size slide

  51. reduce potential for bugs by
    vendoring everything

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  54. » env | grep \
    BOXEN_REDIS_PORT
    BOXEN_REDIS_PORT=16379

    View full-size slide

  55. » env | grep \
    BOXEN_MYSQL_PORT
    BOXEN_MYSQL_PORT=13306

    View full-size slide

  56. people will never
    remember to update
    regularly

    View full-size slide

  57. tell people when they should update

    View full-size slide

  58. => Installing qt...

    View full-size slide

  59. => Fetching snapshot...
    => Installing qt...

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  62. puppet defined types are slow

    View full-size slide

  63. start with puppet-defined types

    View full-size slide

  64. then rewrite in ruby

    View full-size slide

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

    View full-size slide

  66. we don't want to
    mandate
    environments

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  69. boxen is not a tool for
    administration

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  72. boxen has goals

    View full-size slide

  73. user-extensible

    View full-size slide

  74. documented to kingdom come

    View full-size slide

  75. not a maintenance nightmare

    View full-size slide

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

    View full-size slide

  77. we are working hard to
    open source it

    View full-size slide

  78. the goal was to OSS
    today

    View full-size slide

  79. but some mes things
    come up

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  82. how much is ge ng
    opened up exactly?

    View full-size slide

  83. boxen-core
    boxen-web
    boxen-mac

    View full-size slide

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

    View full-size slide

  85. oh, and it runs on
    Puppet 3.0

    View full-size slide

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

    View full-size slide

  87. drinkup @ Zekes
    8:30pm

    View full-size slide