Boxen: PuppetCamp ATL

Boxen: PuppetCamp ATL

A Boxen talk focused at folks who might attend a PuppetCamp.

Cd839cc361ffa996be0cc8259f3d7555?s=128

Will Farrington

March 19, 2013
Tweet

Transcript

  1. boxen

  2.  wfarr

  3.  ops

  4.  friction

  5. what is boxen?

  6. STORY TIME

  7. @jbarnette + @wfarr

  8. None
  9. None
  10. developing software is harder than it used to be

  11. our toolchains have gotten more robust

  12. our toolchains have gotten more complicated

  13. want to work on $anything?

  14. better install a ruby version manager, like 8 versions of

    ruby, a handful of gems to try and make the behavior remotely sane, and then pray it doesn't break
  15. None
  16. s/ruby/literally everything but bash/g

  17. None
  18. let's make it better

  19. None
  20. None
  21. THINGS BOXEN IS

  22.  a framework

  23.  stdlib

  24. wat

  25. None
  26. None
  27. THINGS BOXEN IS NOT

  28. nope

  29. nope

  30. newp

  31. sadly, no

  32. why should i use boxen?

  33. FRICTION SUCKS

  34. friction is anything that gets in the way of doing

    stuff
  35. friction is the greatest source of frustration in every organization

  36. configuring development environments is a week-long marathon in friction

  37. "all right, new work laptop! i wonder where that blog

    post i used last time to set up ruby, python, go, and git is. hopefully it still works and by the end of the week i can start shipping."
  38. "all right, new work laptop! i wonder where that blog

    post i used last time to set up ruby, python, go, and git is. hopefully it still works and by the end of the week i can start shipping." lame
  39. None
  40. None
  41. None
  42. None
  43. getting any part of the stack running locally should never

    block someone from shipping
  44. USS COOL STUFF

  45. None
  46. INCONSISTENCY SUCKS

  47. when was the last time you knew every human was

    running the same services in dev and prod?
  48. None
  49. "hey so my postgresql isn't working. is yours working? it

    is? huh. i have no idea what's wrong."
  50. "hey so my postgresql isn't working. is yours working? it

    is? huh. i have no idea what's wrong." lame
  51. manual audits are tedious

  52. manual audits are error-prone

  53. ask software instead of humans

  54. lock every core component to the same version as in

    prod
  55. UPDATING SUCKS

  56. "jeeeeeez the mac app store has been bugging me for

    like forever! i have a billion updates... meh"
  57. "jeeeeeez the mac app store has been bugging me for

    like forever! i have a billion updates... meh" lame
  58. maybe you use CM in dev already, but when was

    the last time you updated and ran it?
  59. SECURITY SUCKS

  60. security is a war of attrition

  61. bug people enough about security and they stop caring about

    it
  62. "ugh, another security thing? whatever, i have way more important

    things to do"
  63. "ugh, another security thing? whatever, i have way more important

    things to do" lame
  64. let code handle security, then inform people so they know

    why the code's making changes
  65. no surprises

  66. BOXEN ENABLES YOU TO MAKE THESE THINGS BETTER FOR YOUR

    ORG
  67. None
  68. what do i get?

  69. RUNNER

  70. boxen is run via some ruby

  71. it collects info for facter

  72. it checks for prerequisites and conflicts before each run

  73. it detects certain changes post-run

  74. it has hooks too

  75. PUPPET

  76. "the core"

  77. homebrew, git, hub, gcc, rbenv, ruby 1.8.7, ruby 1.9.3, ruby

    2.0.0, nvm, nodejs 0.4.x, nodejs 0.6.x, nodejs 0.8.x, nginx, .dev dns, FDE, and puppetlabs-stdlib
  78. rbenv_gem, repository, osx_chsh, osx_login_item, boxen::project, ruby::local, mysql::database, etc.

  79. package: homebrew, compressed_app

  80. repository: git

  81. service: ghlaunchd

  82. "the library"

  83. 130+ modules on GitHub

  84. GitHub uses ~81 of those

  85. travis-ci

  86. CARDBOARD

  87. gem that simplifies creating new puppet modules, optimized for the

    boxen-recommended stack
  88. librarian-puppet, rspec-puppet, puppet-lint, etc.

  89. PUPPET-TEMPLATE

  90. example module using cardboard

  91. OUR-BOXEN

  92. template boxen project

  93. BOXEN-WEB

  94. small rails app to allow distributing your boxen easily, with

    auth
  95. how do i get it?

  96. Automate Everything

  97. boxen/boxen-web

  98. None
  99. how do i use it?

  100. CLI

  101. $ boxen # run it

  102. $ boxen --projects # list projects Boxen knows about

  103. $ boxen <project> # run it but include <project> in

    the catalog automatically
  104. PROJECT MANIFESTS

  105. i want to hack on my project

  106. # modules/projects/manifests/team.pp class projects::team { boxen::project { 'team': dotenv =>

    true, mysql => true, nginx => true, ruby => '1.9.3', source => 'github/team', } }
  107. $ boxen team warning: Setting up 'team'. This can be

    made permanent by having 'include projects::team' in your personal manifest.
  108. cloned repo nginx vhost ruby version mysql databases .env file

  109. $ cd ~/src/team $ script/server $ open http://team.dev/

  110. PERSONAL MANIFESTS

  111. i want to install $x but only for me

  112. # modules/people/manifests/wfarr.pp class people::wfarr { include minecraft }

  113. # modules/people/manifests/wfarr.pp class people::wfarr { include zsh }

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

    include projects::all } 'scruffy': { include projects::team } default: {} } }
  115. # modules/people/manifests/wfarr.pp class people::wfarr { git::config::global { 'alias.st': value =>

    'status'; 'alias.ci': value => 'commit'; 'alias.di': value => 'diff'; 'alias.lp': value => 'log -p'; 'color.ui': value => 'true'; 'user.name': value => 'Will Farrington'; 'user.email': value => 'wfarr@github.com'; } }
  116. # modules/people/manifests/wfarr.pp class people::wfarr { include osx::example_things }

  117. ISSUES

  118. $ boxen Error: ZOMG at /opt/boxen/repo/ modules/people/manifests/wfarr.pp:8 on node scruffy.gateway.github.lan

    Sorry! Creating an issue on github/ totally-a-madeup-repo-name.
  119. CODEZ

  120. CODEZ who failed

  121. CODEZ how long ago

  122. CODEZ machine

  123. CODEZ os version

  124. CODEZ shell

  125. CODEZ ref

  126. CODEZ compare view

  127. CODEZ git status

  128. CODEZ full command

  129. CODEZ full log

  130. i fix the error and run `boxen`

  131. CODEZ

  132. via issues api

  133. # config/boxen.rb ENV['BOXEN_REPO_NAME'] = \ 'github/boxen' ENV['BOXEN_ISSUES_ENABLED'] = 'yes'

  134. UPDATES

  135. $ boxen Boxen is up-to-date.

  136. $ boxen Boxen has a dirty tree, won't auto- update!

  137. $ boxen Boxen has unpushed commits on master, won't auto-update!

  138. $ boxen Boxen on a non-master branch 'new- project', won't

    auto-update!
  139. i'm sold.

  140. None
  141. what if i have problems?

  142. file issues

  143. irc.freenode.net

  144. be chuck yeager

  145. None
  146. "So, we're uh in the air. We made it. That's

    uh good news, obviously."
  147. "Flight attendants, if you could just hang on to uh...

    whatever..."
  148. detail text

  149.  wfarr come work with me on things like boxen

  150. CODEZ

  151. thanks

  152. speakerdeck.com/wfarr/ boxen-puppetcamp-atl