+ All Categories
Home > Technology > Testing puppet

Testing puppet

Date post: 14-Apr-2017
Category:
Upload: eslam-el-husseiny
View: 386 times
Download: 1 times
Share this document with a friend
14
Testing Puppet @EslamElHusseiny
Transcript
Page 1: Testing puppet

Testing Puppet

@EslamElHusseiny

Page 2: Testing puppet

Agenda

• Motivation • Why to test ? • Different types of tests • Tools • Demo

Page 3: Testing puppet

Motivation

Page 4: Testing puppet

Why to test ?

Page 5: Testing puppet

Different types of tests

Page 6: Testing puppet

Puppet tests

•Puppet Lint “Validate Puppet style guidelines” •Validate Syntax

•puppet parser validate •r10k puppetfile check •erb -x -T '-' template/example.erb| ruby -c

•Unit tests “rspec-puppet” •Integration tests!

Page 7: Testing puppet

Tools

Page 8: Testing puppet

KitchenCI

•http://kitchen.ci •Your infrastructure deserves tests too •multiple drivers •multiple platforms •many testing frameworks

Page 9: Testing puppet

KitchenCI

•Install gem install test-kitchen

•Initialisation kitchen init

•Destroy, Create, Converge, Setup, Verify, and Destroy kitchen test

Page 10: Testing puppet

ServerSpec

•http://serverspec.org •RSpec tests for your servers configured by

CFEngine, Puppet, Ansible, or anything else. •Tests your servers’ actual state by executing

command locally, via SSH, Docker API, etc…

Page 11: Testing puppet

ServerSpec snippet

Page 13: Testing puppet
Page 14: Testing puppet

Thanks!

Twitter: @cakesolutionsTel: 0845 617 1200

Email: [email protected] Jobs: http://www.cakesolutions.net/

careers

We are Hiring!


Recommended