puppet camp amsterdam 2015: improving in production puppet code without breaking too much

30
Improving in production Puppet code Without breaking too much 1

Upload: puppet-labs

Post on 14-Jul-2015

269 views

Category:

Software


0 download

TRANSCRIPT

Improving in production Puppet code

Without breaking too much

1

About the guy on stageMade by trial and error

2

Quick overview● Basics● Code Strength● Deployment Strength● Documentation

3

Introduction

Source - Abstruse Goose - http://abstrusegoose.com/432

4

Basics

5

Be there

6

This might require a bit of handholding

No starting from scratchIt’s a road to beautiful failure

7

Create a plan

8

Knowing the path and walking the path

Create a planGTD Plan1. Why?2. When?3. What?4. Plan5. Do!6. …7. Profit!

9

AgileHow to trap management

10

Code Strength

11

Peer Review

12

Show me yours and I’ll show you mine

Spec TestsShiny armor has never seen war

13

Example Spec Test

14

Roles / ProfilesAdd stuff while staying sane

15

Roles / Profiles

16

roles::wordpress_standalone profile::base

profile::mysql

profile::wordpress

profile::nginx

Roles / Profiles

17

profile::nginx

hiera

puppetlabs/nginx

enc

Small blocksDo one thing, do it well

18

Separate Shared ModulesCan’t clean a room when your friends are

still in it

19

Deployment Strength

20

Auto BuildingThese pieces, they should fit, I think...

21

Auto TestingDon’t worry, i’m just doing a few tests.

22

Auto DeploymentGo fast, die young!

23

Documentation

24

404

Do I need documentation?

Just enough

25

Any other reasons?

26

Where to put documentation?

27

Close to the source

Important LinksFor review, not on presentation screen

Building a Functional Puppet Workflow Part 2: Roles and Profiles - http://s.basg.nl/1A6heKZ

Peer review - Gerrit - https://code.google.com/p/gerrit/Spec Testing - http://rspec-puppet.com/tutorial/Spec Helper - https://github.com/puppetlabs/puppetlabs_spec_helper Dashboards - Foreman - http://theforeman.org/

28

Presentation is onlinehttp://s.basg.nl/puppetcode

You can find me on Google+http://google.com/+basgrolleman

Questions

29

Questions?

30