Slide 1

Slide 1 text

boxen

Slide 2

Slide 2 text

 wfarr

Slide 3

Slide 3 text

 ops

Slide 4

Slide 4 text

 friction

Slide 5

Slide 5 text

what is boxen?

Slide 6

Slide 6 text

STORY TIME

Slide 7

Slide 7 text

@jbarnette + @wfarr

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

developing software is harder than it used to be

Slide 11

Slide 11 text

our toolchains have gotten more robust

Slide 12

Slide 12 text

our toolchains have gotten more complicated

Slide 13

Slide 13 text

want to work on $anything?

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

s/ruby/literally everything but bash/g

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

let's make it better

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

THINGS BOXEN IS

Slide 22

Slide 22 text

 a framework

Slide 23

Slide 23 text

 stdlib

Slide 24

Slide 24 text

wat

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

THINGS BOXEN IS NOT

Slide 28

Slide 28 text

nope

Slide 29

Slide 29 text

nope

Slide 30

Slide 30 text

newp

Slide 31

Slide 31 text

sadly, no

Slide 32

Slide 32 text

why should i use boxen?

Slide 33

Slide 33 text

FRICTION SUCKS

Slide 34

Slide 34 text

friction is anything that gets in the way of doing stuff

Slide 35

Slide 35 text

friction is the greatest source of frustration in every organization

Slide 36

Slide 36 text

configuring development environments is a week-long marathon in friction

Slide 37

Slide 37 text

"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."

Slide 38

Slide 38 text

"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

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

getting any part of the stack running locally should never block someone from shipping

Slide 44

Slide 44 text

USS COOL STUFF

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

INCONSISTENCY SUCKS

Slide 47

Slide 47 text

when was the last time you knew every human was running the same services in dev and prod?

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

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

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

manual audits are tedious

Slide 52

Slide 52 text

manual audits are error-prone

Slide 53

Slide 53 text

ask software instead of humans

Slide 54

Slide 54 text

lock every core component to the same version as in prod

Slide 55

Slide 55 text

UPDATING SUCKS

Slide 56

Slide 56 text

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

Slide 57

Slide 57 text

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

Slide 58

Slide 58 text

maybe you use CM in dev already, but when was the last time you updated and ran it?

Slide 59

Slide 59 text

SECURITY SUCKS

Slide 60

Slide 60 text

security is a war of attrition

Slide 61

Slide 61 text

bug people enough about security and they stop caring about it

Slide 62

Slide 62 text

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

Slide 63

Slide 63 text

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

Slide 64

Slide 64 text

let code handle security, then inform people so they know why the code's making changes

Slide 65

Slide 65 text

no surprises

Slide 66

Slide 66 text

BOXEN ENABLES YOU TO MAKE THESE THINGS BETTER FOR YOUR ORG

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

what do i get?

Slide 69

Slide 69 text

RUNNER

Slide 70

Slide 70 text

boxen is run via some ruby

Slide 71

Slide 71 text

it collects info for facter

Slide 72

Slide 72 text

it checks for prerequisites and conflicts before each run

Slide 73

Slide 73 text

it detects certain changes post-run

Slide 74

Slide 74 text

it has hooks too

Slide 75

Slide 75 text

PUPPET

Slide 76

Slide 76 text

"the core"

Slide 77

Slide 77 text

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

Slide 78

Slide 78 text

rbenv_gem, repository, osx_chsh, osx_login_item, boxen::project, ruby::local, mysql::database, etc.

Slide 79

Slide 79 text

package: homebrew, compressed_app

Slide 80

Slide 80 text

repository: git

Slide 81

Slide 81 text

service: ghlaunchd

Slide 82

Slide 82 text

"the library"

Slide 83

Slide 83 text

130+ modules on GitHub

Slide 84

Slide 84 text

GitHub uses ~81 of those

Slide 85

Slide 85 text

travis-ci

Slide 86

Slide 86 text

CARDBOARD

Slide 87

Slide 87 text

gem that simplifies creating new puppet modules, optimized for the boxen-recommended stack

Slide 88

Slide 88 text

librarian-puppet, rspec-puppet, puppet-lint, etc.

Slide 89

Slide 89 text

PUPPET-TEMPLATE

Slide 90

Slide 90 text

example module using cardboard

Slide 91

Slide 91 text

OUR-BOXEN

Slide 92

Slide 92 text

template boxen project

Slide 93

Slide 93 text

BOXEN-WEB

Slide 94

Slide 94 text

small rails app to allow distributing your boxen easily, with auth

Slide 95

Slide 95 text

how do i get it?

Slide 96

Slide 96 text

Automate Everything

Slide 97

Slide 97 text

boxen/boxen-web

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

how do i use it?

Slide 100

Slide 100 text

CLI

Slide 101

Slide 101 text

$ boxen # run it

Slide 102

Slide 102 text

$ boxen --projects # list projects Boxen knows about

Slide 103

Slide 103 text

$ boxen # run it but include in the catalog automatically

Slide 104

Slide 104 text

PROJECT MANIFESTS

Slide 105

Slide 105 text

i want to hack on my project

Slide 106

Slide 106 text

# modules/projects/manifests/team.pp class projects::team { boxen::project { 'team': dotenv => true, mysql => true, nginx => true, ruby => '1.9.3', source => 'github/team', } }

Slide 107

Slide 107 text

$ boxen team warning: Setting up 'team'. This can be made permanent by having 'include projects::team' in your personal manifest.

Slide 108

Slide 108 text

cloned repo nginx vhost ruby version mysql databases .env file

Slide 109

Slide 109 text

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

Slide 110

Slide 110 text

PERSONAL MANIFESTS

Slide 111

Slide 111 text

i want to install $x but only for me

Slide 112

Slide 112 text

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

Slide 113

Slide 113 text

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

Slide 114

Slide 114 text

# modules/people/manifests/wfarr.pp class people::wfarr { case $::hostname { 'bender': { include projects::all } 'scruffy': { include projects::team } default: {} } }

Slide 115

Slide 115 text

# 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 => '[email protected]'; } }

Slide 116

Slide 116 text

# modules/people/manifests/wfarr.pp class people::wfarr { include osx::example_things }

Slide 117

Slide 117 text

ISSUES

Slide 118

Slide 118 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.

Slide 119

Slide 119 text

CODEZ

Slide 120

Slide 120 text

CODEZ who failed

Slide 121

Slide 121 text

CODEZ how long ago

Slide 122

Slide 122 text

CODEZ machine

Slide 123

Slide 123 text

CODEZ os version

Slide 124

Slide 124 text

CODEZ shell

Slide 125

Slide 125 text

CODEZ ref

Slide 126

Slide 126 text

CODEZ compare view

Slide 127

Slide 127 text

CODEZ git status

Slide 128

Slide 128 text

CODEZ full command

Slide 129

Slide 129 text

CODEZ full log

Slide 130

Slide 130 text

i fix the error and run `boxen`

Slide 131

Slide 131 text

CODEZ

Slide 132

Slide 132 text

via issues api

Slide 133

Slide 133 text

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

Slide 134

Slide 134 text

UPDATES

Slide 135

Slide 135 text

$ boxen Boxen is up-to-date.

Slide 136

Slide 136 text

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

Slide 137

Slide 137 text

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

Slide 138

Slide 138 text

$ boxen Boxen on a non-master branch 'new- project', won't auto-update!

Slide 139

Slide 139 text

i'm sold.

Slide 140

Slide 140 text

No content

Slide 141

Slide 141 text

what if i have problems?

Slide 142

Slide 142 text

file issues

Slide 143

Slide 143 text

irc.freenode.net

Slide 144

Slide 144 text

be chuck yeager

Slide 145

Slide 145 text

No content

Slide 146

Slide 146 text

"So, we're uh in the air. We made it. That's uh good news, obviously."

Slide 147

Slide 147 text

"Flight attendants, if you could just hang on to uh... whatever..."

Slide 148

Slide 148 text

detail text

Slide 149

Slide 149 text

 wfarr come work with me on things like boxen

Slide 150

Slide 150 text

CODEZ

Slide 151

Slide 151 text

thanks

Slide 152

Slide 152 text

speakerdeck.com/wfarr/ boxen-puppetcamp-atl