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

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.

Will Farrington

February 21, 2013
Tweet

More Decks by Will Farrington

Other Decks in Technology

Transcript

  1. when two developers get really angry at how awful a

    bunch of things are, they write code
  2. 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
  3. 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
  4. "Only run this once and if anything breaks just reformat

    and do it again from scratch." lame
  5. 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."
  6. 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
  7. 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
  8. 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
  9. 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.
  10. 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
  11. 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
  12. oh and random other libraries depend on specific implementations of

    that bundler- wannabe lame la m e lame lam la lame lame
  13. p.s. chef has a lot of the same problems with

    3rd party tooling too. it's not just a puppet thing.
  14. package { 'git': } service { 'mysqld': } user {

    'wfarr': } exec { 'rm -rf /': }
  15. class git::package { case $::operatingsystem { Debian: { package {

    'git-core': } } default: { package { 'git': } } } }
  16. class mysql { package { 'mysql': } file { '/etc/my.cnf':

    mode => '0400', owner => 'mysql', } service { 'mysql': } }
  17. class mysql { package { 'mysql': } file { '/etc/my.cnf':

    mode => '0400', owner => 'mysql', } service { 'mysql': } } wrong
  18. class mysql { package { 'mysql': notify => Service['mysql'], }

    file { '/etc/my.cnf': mode => '0400', owner => 'mysql', notify => Service['mysql'], require => Package['mysql'], } service { 'mysql': } }
  19. . !"" 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
  20. # 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' } }
  21. # modules/people/manifests/wfarr.pp class people::wfarr { case $::hostname { 'bender': {

    include projects::all } 'scruffy': { include projects::octostatus } default: {} } }
  22. # 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 => '[email protected]'; } }
  23. # 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; } }