Salting things up in the sysadmin's world Juan Manuel Santos Who? - - PowerPoint PPT Presentation

salting things up in the sysadmin s world
SMART_READER_LITE
LIVE PREVIEW

Salting things up in the sysadmin's world Juan Manuel Santos Who? - - PowerPoint PPT Presentation

Salting things up in the sysadmin's world Juan Manuel Santos Who? (boring part) Juan Manuel Santos godlike64 on github / gmail / twitter godlike on freenode Information Systems Engineer / RHCA TL - STSE @ Red Hat Need beer


slide-1
SLIDE 1

Salting things up in the sysadmin's world

Juan Manuel Santos

slide-2
SLIDE 2

2015-07-21

Who? (boring part)

  • Juan Manuel Santos
  • godlike64 on github / gmail / twitter
  • godlike on freenode
  • Information Systems Engineer / RHCA
  • TL - STSE @ Red Hat
  • Need beer to survive, HALP!
slide-3
SLIDE 3

2015-07-21

WHY?

slide-4
SLIDE 4

2015-07-21

slide-5
SLIDE 5

2015-07-21

slide-6
SLIDE 6

2015-07-21

slide-7
SLIDE 7

2015-07-21

slide-8
SLIDE 8

2015-07-21

WHY?

1)Quantity

slide-9
SLIDE 9

2015-07-21

slide-10
SLIDE 10

2015-07-21

12712414

  • SLOC count for Linux kernel 3.19
slide-11
SLIDE 11

2015-07-21

WHY?

1)Quantity 2)Complexity

slide-12
SLIDE 12

2015-07-21

Sysadmins are lazy

slide-13
SLIDE 13

2015-07-21

How it all began

slide-14
SLIDE 14

2015-07-21

slide-15
SLIDE 15

2015-07-21

#plzhelp

slide-16
SLIDE 16

2015-07-21

slide-17
SLIDE 17

2015-07-21

slide-18
SLIDE 18

2015-07-21

slide-19
SLIDE 19

2015-07-21

slide-20
SLIDE 20

2015-07-21

slide-21
SLIDE 21

2015-07-21

slide-22
SLIDE 22

2015-07-21

? :)

slide-23
SLIDE 23

2015-07-21

slide-24
SLIDE 24

2015-07-21

slide-25
SLIDE 25

2015-07-21

Basics

slide-26
SLIDE 26

2015-07-21

Basics

slide-27
SLIDE 27

2015-07-21

Terminology

  • Master - Minion
  • State file --> State
  • Highstate
  • Grains / Pillar
  • Matching (targeting)
  • ... and stuff
slide-28
SLIDE 28

2015-07-21

Terminology

  • Master: the one who rules them all
  • Minions:

– ID – [Nodegroup] – Grains

slide-29
SLIDE 29

2015-07-21

Example setup

  • Master: gantrithor
  • Minions:

– everybody else

slide-30
SLIDE 30

2015-07-21

States & Highstates

slide-31
SLIDE 31

2015-07-21

States

  • Defined by SLS (SaLt State) files
  • Reside in the filesystem
  • In /etc/salt/master:

file_roots:

<environment>:

  • <path>
slide-32
SLIDE 32

2015-07-21

Top file (top.sls)

  • Entry point for environment
  • Host matching

<environment>:

<match>:

  • match: <match type>
  • [state trees]
slide-33
SLIDE 33

2015-07-21

slide-34
SLIDE 34

2015-07-21

States

  • Where the magic happens
  • Similar syntax to top.sls

<identifier>:

<type>:

  • parameters
slide-35
SLIDE 35

2015-07-21

States

slide-36
SLIDE 36

2015-07-21

States

slide-37
SLIDE 37

2015-07-21

States

slide-38
SLIDE 38

2015-07-21

States

slide-39
SLIDE 39

2015-07-21

Highstate

  • salt '*' state.highstate

1) Minions download top.sls 2) Minions attempt to match 3) If a match is found, modules are downloaded, compiled & executed

slide-40
SLIDE 40

2015-07-21

Highstate

slide-41
SLIDE 41

2015-07-21

Matching & Nodegroups

slide-42
SLIDE 42

2015-07-21

Matching

  • ID
  • Nodegroup
  • Subnet/IP
  • Grains
  • Compound
slide-43
SLIDE 43

2015-07-21

Matching

slide-44
SLIDE 44

2015-07-21

Nodegroups

slide-45
SLIDE 45

2015-07-21

Nodegroups

slide-46
SLIDE 46

2015-07-21

Nodegroups

  • Flexibility!

nodegroups:

group1: 'L@foo.domain.com,bar.domain.com' group2: 'G@os:Debian and foo.domain.com' group3: 'G@os:Debian and N@group1'

slide-47
SLIDE 47

2015-07-21

Grains & Pillars

slide-48
SLIDE 48

2015-07-21

Grains

  • Bits & pieces of information
  • Generated/loaded on minion startup
  • salt [...] grains.ls
  • salt [...] grains.items
  • 50+ grains shipped
  • Moar flexibility: write your own!
slide-49
SLIDE 49

2015-07-21

Grains

slide-50
SLIDE 50

2015-07-21

Grains

slide-51
SLIDE 51

2015-07-21

Pillar

  • Also data
  • Defined on the master
  • In /etc/salt/master:

pillar_roots:

<environment>:

  • <path>
slide-52
SLIDE 52

2015-07-21

Pillar

  • Grains --> data retrieved from minions
  • Pillar --> data sent to minions
slide-53
SLIDE 53

2015-07-21

Pillar

iic

slide-54
SLIDE 54

2015-07-21

Pillar

slide-55
SLIDE 55

2015-07-21

Pillar

slide-56
SLIDE 56

2015-07-21

Pillar

slide-57
SLIDE 57

2015-07-21

Docs!

  • http://docs.saltstack.com/
slide-58
SLIDE 58

2015-07-21

Thank you!

  • Questions anyone?