BOXEN

 BOXEN

At GitHub, we've been growing pretty quickly and that sort of growth presents a lot of challenges. We were feeling the pain of trying to teach everyone (developers and designers alike) how to get GitHub and all our other projects running on their laptops. The process was failure-prone, complex, and time-consuming. So, last summer, we created the first iteration of The Setup — GitHub's method of managing laptops without getting all authoritarian about it. We quickly realized that other organizations needed and wanted this environment, so we started back with the basics and re-architected The Setup into Boxen. The same tool, the same method, but written for modularity and general consumption.

We’ve since released Boxen (as of February 2013). This talk covers what Boxen is, some of the design choices involved, how to get running with Boxen, and more.

Cd839cc361ffa996be0cc8259f3d7555?s=128

Will Farrington

February 21, 2013
Tweet

Transcript

  1. 1.
  2. 3.
  3. 8.

    when two developers get really angry at how awful a

    bunch of things are, they write code
  4. 12.
  5. 16.

    Ohai new laptop! I'm gonna spend the next like three

    days configuring you in the best way I can and hopefully I can write some code soon
  6. 17.

    Ohai new laptop! I'm gonna spend the next like three

    days configuring you in the best way I can and hopefully I can write some code soon lame
  7. 21.

    "Only run this once and if anything breaks just reformat

    and do it again from scratch." lame
  8. 24.

    And then I sent an email and said "Hey, this

    is changing, here's why, and it'll happen the next time you run Boxen. That's it. Easy."
  9. 25.

    The next time they ran Boxen, it installed our custom

    Ruby 1.9.3 build, configured their local github.com to use it, and everything from there just worked
  10. 29.
  11. 31.

    so let's send an email and maybe people will read

    it and maybe they will disable java in safari and maybe life will go on
  12. 32.

    so let's send an email and maybe people will read

    it and maybe they will disable java in safari and maybe life will go on lame
  13. 33.
  14. 36.

    Huh. $NEWEMPLOYEE, I'm not sure why $TOOL is acting this

    way for you. I think I set it up this way and I've never seen this before.
  15. 37.

    Huh. $NEWEMPLOYEE, I'm not sure why $TOOLtool is acting this

    way for you. I think I set it up this way and I've never seen this before. lame
  16. 41.
  17. 50.
  18. 53.

    but imagine now you've got 10 gems trying to be

    bundler that ship the `bundle` command all fighting with one another about who's the best
  19. 56.

    oh and random other libraries depend on specific implementations of

    that bundler- wannabe lame la m e lame lam la lame lame
  20. 59.

    p.s. chef has a lot of the same problems with

    3rd party tooling too. it's not just a puppet thing.
  21. 61.
  22. 68.
  23. 69.

    package { 'git': } service { 'mysqld': } user {

    'wfarr': } exec { 'rm -rf /': }
  24. 70.
  25. 72.
  26. 76.
  27. 81.
  28. 83.
  29. 84.
  30. 86.

    class git::package { case $::operatingsystem { Debian: { package {

    'git-core': } } default: { package { 'git': } } } }
  31. 89.

    class mysql { package { 'mysql': } file { '/etc/my.cnf':

    mode => '0400', owner => 'mysql', } service { 'mysql': } }
  32. 90.

    class mysql { package { 'mysql': } file { '/etc/my.cnf':

    mode => '0400', owner => 'mysql', } service { 'mysql': } } wrong
  33. 91.

    class mysql { package { 'mysql': notify => Service['mysql'], }

    file { '/etc/my.cnf': mode => '0400', owner => 'mysql', notify => Service['mysql'], require => Package['mysql'], } service { 'mysql': } }
  34. 97.
  35. 101.

    . !"" files # $"" static_file !"" lib # !""

    facter # # $"" a_custom_fact.rb # $"" puppet # !"" parser # # $"" functions # # $"" a_custom_puppet_function.rb # !"" provider # # !"" repository # # # $"" git.rb # $"" type # $"" repository.rb !"" manifests # !"" config.pp # !"" init.pp $"" templates $"" some_template.erb
  36. 102.
  37. 108.
  38. 116.

    # modules/projects/manifests/boxen- web.pp class projects::boxen-web { boxen::project { 'boxen-web': nginx

    => true, postgresql => true, ruby => '1.9.3', source => 'boxen/boxen-web' } }
  39. 124.

    # modules/people/manifests/wfarr.pp class people::wfarr { case $::hostname { 'bender': {

    include projects::all } 'scruffy': { include projects::octostatus } default: {} } }
  40. 125.

    # modules/people/manifests/wfarr.pp class people::wfarr { git::config::global { 'alias.st': value =>

    'status'; 'alias.ci': value => 'commit'; 'alias.co': value => 'checkout'; 'alias.di': value => 'diff'; 'alias.dc': value => 'diff --cached'; 'alias.lp': value => 'log -p'; 'color.ui': value => 'true'; 'user.name': value => 'Will Farrington'; 'user.email': value => 'wfarr@github.com'; } }
  41. 126.

    # modules/people/manifests/wfarr.pp class people::wfarr { boxen::osx_defaults { 'fast key repeat':

    ensure => present, domain => 'NSGlobalDomain', key => 'KeyRepeat', value => 0, user => $::boxen_user; 'stop showing stupid popover': ensure => present, domain => 'NSGlobalDomain', key => 'ApplePressAndHoldEnabled', value => false, user => $::boxen_user; } }
  42. 127.
  43. 129.
  44. 135.
  45. 141.
  46. 149.
  47. 150.
  48. 155.
  49. 160.