Slide 1

Slide 1 text

® Friday 5 October 12

Slide 2

Slide 2 text

T C f Friday 5 October 12

Slide 3

Slide 3 text

I r • me • devops • chef • clients Friday 5 October 12

Slide 4

Slide 4 text

M • Bernard Grymonpon - @wonko_be • 80% ops, 20% dev • hosting company • managed setups for clients Friday 5 October 12

Slide 5

Slide 5 text

D vOp • buzzword (its a mindset, not a job title) • infra as code • sysadmins using git (hooray) Friday 5 October 12

Slide 6

Slide 6 text

Op C f • recipes / cookbooks • attributes • resources / providers / ... • Solo vs hosted Friday 5 October 12

Slide 7

Slide 7 text

package "apache2" service "apache2" do supports :status => true action [ :enable, :start ] end template "/etc/apache2/ports.conf" do source "ports.erb" owner "root" group "root" mode "0644" end Friday 5 October 12

Slide 8

Slide 8 text

W T R p ? • ease of mind • avoid regression Friday 5 October 12

Slide 9

Slide 9 text

T r p • does a recipe work as intended • is the end-result correct • does the “install me an apache webserver”, actually install apache Friday 5 October 12

Slide 10

Slide 10 text

W w v What google found... Friday 5 October 12

Slide 11

Slide 11 text

F r Friday 5 October 12

Slide 12

Slide 12 text

RSp - f • https://github.com/calavera/rspec-chef • 9 months ago commited • had to patch it to work with latest chef • doesn’t work Friday 5 October 12

Slide 13

Slide 13 text

R p - f Friday 5 October 12

Slide 14

Slide 14 text

RSp - f Friday 5 October 12

Slide 15

Slide 15 text

C f p • https://github.com/acrmp/chefspec • no real runs • no providers/resources/lwrp’s • mocks & all supported • feels like testing chef, not the recipe Friday 5 October 12

Slide 16

Slide 16 text

C f p Friday 5 October 12

Slide 17

Slide 17 text

C f p Friday 5 October 12

Slide 18

Slide 18 text

C f p • hard to work with nested attributes • not all system attributes available (you can add them in) Friday 5 October 12

Slide 19

Slide 19 text

S p! (hammertime) Friday 5 October 12

Slide 20

Slide 20 text

W w v • if I ask chef to install a package • ...will it call the package resource • not ...is the package installed in the end Friday 5 October 12

Slide 21

Slide 21 text

W I • Given a setup for a client • When I run chef-client • Then I want the webapp/site/service to work Friday 5 October 12

Slide 22

Slide 22 text

S p 1: v I v • spinning up machine • apply recipe(s)/role(s) • assertions • destroy machine Friday 5 October 12

Slide 23

Slide 23 text

V r • ruby wrapper around virtualbox • works with “base boxes” • pretty solid integration • solo and server Friday 5 October 12

Slide 24

Slide 24 text

f- -W • whyrun feature • will mock a run • not 100% correct Friday 5 October 12

Slide 25

Slide 25 text

- f- r • https://github.com/calavera/minitest-chef- handler • feedback after converge • only test end result after a run, in chef- running-window Friday 5 October 12

Slide 26

Slide 26 text

Friday 5 October 12

Slide 27

Slide 27 text

C b r- f In its current incarnation, cucumber-chef makes two important assumptions. Firstly, we assume you’re using the Opscode platform rather than your own Chef server. Secondly, we assume that you are comfortable with using Amazon’s EC2 service for providing the ‘bare metal’ on which we set up the test lab. Future releases may well allow you to use your own Chef server, and will definitely look at offering alternative cloud providers. In the meantime, we welcome patches and pull requests! Friday 5 October 12

Slide 28

Slide 28 text

F r • cucumber • vagrant • sahara for snapshotting • aruba (cucumber steps) Friday 5 October 12

Slide 29

Slide 29 text

Friday 5 October 12

Slide 30

Slide 30 text

F r • 50% of time reading/fiddling Vagrant • 20% waiting for virtualbox • 20% wrapping vagrant in a helper class (BoxCollections, Box, etc...) • 5% tying it together Friday 5 October 12

Slide 31

Slide 31 text

T • lxc linux • low-resource virtual machines • actually, close to what I want • https://github.com/exceedhl/toft Friday 5 October 12

Slide 32

Slide 32 text

T - • assembles everything • metadata contains the platforms • test/kitchen contains recipes for tests Friday 5 October 12

Slide 33

Slide 33 text

f • unused • unexplored • unknown • basis for what we can do (supports, parameters, recipes, ...) Friday 5 October 12

Slide 34

Slide 34 text

rr • I have a chef server • It has recipes • It has nodes with roles applied • Test it all Friday 5 October 12

Slide 35

Slide 35 text

I r • git commit • • “all green, carry on” Friday 5 October 12

Slide 36

Slide 36 text

I r • cucumber / rspec language • vagrant / fog / libvirt / lxc / EC2 / ... • chef server (clone) • librarian • CI server Friday 5 October 12

Slide 37

Slide 37 text

I fr r r - w I high-level, fully-automated, magic Friday 5 October 12