when two developers get really
angry at how awful a bunch of
things are, they write code
Slide 9
Slide 9 text
Boxen is a
framework
Slide 10
Slide 10 text
Boxen is a
standard library
Slide 11
Slide 11 text
Boxen is a
philosophy on how your
machine should be
configured
Slide 12
Slide 12 text
Boxen tries to make
installing system
dependencies,
configuring your machine,
and generally everything
easier and automated
Slide 13
Slide 13 text
why should i use
boxen?
Slide 14
Slide 14 text
shipping day one
Slide 15
Slide 15 text
It's my first day at company X.
So excited to work on $THING!
Slide 16
Slide 16 text
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
Slide 17
Slide 17 text
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
Slide 18
Slide 18 text
1. open boxen-web
2. run the command
3. ship code
Slide 19
Slide 19 text
constant updates
Slide 20
Slide 20 text
"Only run this once and if anything
breaks just reformat and do it
again from scratch."
Slide 21
Slide 21 text
"Only run this once and if anything
breaks just reformat and do it
again from scratch."
lame
Slide 22
Slide 22 text
Want to know how GitHub tested
ruby 1.9.3 in development?
Slide 23
Slide 23 text
I pushed an update to Boxen.
Slide 24
Slide 24 text
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."
Slide 25
Slide 25 text
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
Slide 26
Slide 26 text
If you make updating hard,
people won't update.
Slide 27
Slide 27 text
If people don't update,
you lack consistency between
development and production.
Slide 28
Slide 28 text
If you lack consistency in
development and production,
you're going to have a bad time.
Slide 29
Slide 29 text
security
Slide 30
Slide 30 text
zomg java is hella unsafe in safari
because <%= reason %>
Slide 31
Slide 31 text
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
Slide 32
Slide 32 text
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
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
Now everyone is secure by default.
Slide 35
Slide 35 text
repeatable process
Slide 36
Slide 36 text
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.
Slide 37
Slide 37 text
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
Slide 38
Slide 38 text
manual processes
are error prone
Slide 39
Slide 39 text
human beings
are error prone
Slide 40
Slide 40 text
computers
are error prone as we make them
Slide 41
Slide 41 text
community
Slide 42
Slide 42 text
we open-sourced Boxen on friday
(pst)
(5 days ago today)
Slide 43
Slide 43 text
107 closed pull requests +
17 open pull requests
Slide 44
Slide 44 text
198 closed issues +
43 open issues
Slide 45
Slide 45 text
the community
is interested in seeing Boxen
improve
Slide 46
Slide 46 text
GitHub
is interested in seeing Boxen
improve
Slide 47
Slide 47 text
It's not abandon-ware
Slide 48
Slide 48 text
We use the same modules
Slide 49
Slide 49 text
boxen/our-boxen
is extracted from GitHub's boxen
and kept closely in sync
Slide 50
Slide 50 text
stdlib
Slide 51
Slide 51 text
Puppet has this thing called the
Puppet Forge
Slide 52
Slide 52 text
It's kinda like rubygems.org
Slide 53
Slide 53 text
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
Slide 54
Slide 54 text
oh and random other libraries
depend on specific
implementations of that bundler-
wannabe
Slide 55
Slide 55 text
oh and random other libraries
depend on specific
implementations of that bundler-
wannabe
lame
Slide 56
Slide 56 text
oh and random other libraries
depend on specific
implementations of that bundler-
wannabe
lame
la
m
e
lame
lam
la
lame
lame
Slide 57
Slide 57 text
Boxen shipped with about 90
modules all designed to not get in
the way
Slide 58
Slide 58 text
you can roll your own, but we've
already made it easy for you
Slide 59
Slide 59 text
p.s. chef has a lot of the same
problems with 3rd party tooling
too. it's not just a puppet thing.
Slide 60
Slide 60 text
how does boxen
work?
Slide 61
Slide 61 text
puppet
Slide 62
Slide 62 text
Puppet is a configuration
management tool
Slide 63
Slide 63 text
Puppet code says
"I want my system to look like so"
Slide 64
Slide 64 text
Running Puppet
makes sure the system looks like so
Slide 65
Slide 65 text
Every single time
Slide 66
Slide 66 text
Idempotent
Slide 67
Slide 67 text
puppet codez
Slide 68
Slide 68 text
Resources
Slide 69
Slide 69 text
package { 'git': }
service { 'mysqld': }
user { 'wfarr': }
exec { 'rm -rf /': }
Slide 70
Slide 70 text
Types
Slide 71
Slide 71 text
cron, exec, file, host, mount,
package, service, ssh_authorized_key,
user, vlan, zfs, and way more
Facter.add("root_encrypted") do
def root_encrypted?
system "/usr/sbin/diskutil",
"coreStorage",
"info",
"/",
"> /dev/null 2>&1"
end
setcode do
root_encrypted? ? 'yes' : 'no'
end
end
cloned repo
nginx vhost
ruby version
postgres databases
.env file
Slide 119
Slide 119 text
$ cd ~/src/boxen-web
$ script/server
$ open http://boxen-web.dev/
Slide 120
Slide 120 text
personal manifests
Slide 121
Slide 121 text
I want to install $X but only for me
Slide 122
Slide 122 text
# modules/people/manifests/wfarr.pp
class people::wfarr {
include minecraft
}
Slide 123
Slide 123 text
# modules/people/manifests/wfarr.pp
class people::wfarr {
include zsh
}
Slide 124
Slide 124 text
# modules/people/manifests/wfarr.pp
class people::wfarr {
case $::hostname {
'bender': {
include projects::all
}
'scruffy': {
include projects::octostatus
}
default: {}
}
}
Slide 125
Slide 125 text
# 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]';
}
}
Slide 126
Slide 126 text
# 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;
}
}
Slide 127
Slide 127 text
issues
Slide 128
Slide 128 text
$ 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.