Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Configuration Management Camp 2015

someara
February 03, 2015

Configuration Management Camp 2015

Ghent Belgium

someara

February 03, 2015
Tweet

More Decks by someara

Other Decks in Technology

Transcript

  1. Chef Reusability!
    Config Management Camp!
    Ghent, Belgium!
    February 2015

    View full-size slide

  2. Things that are true

    View full-size slide

  3. New Chef users
    expect community
    cookbooks to
    just work

    View full-size slide

  4. Especially the Chef
    maintained cookbooks

    View full-size slide

  5. This is not the current
    state of things

    View full-size slide

  6. This leads to sadness

    View full-size slide

  7. We must repair it

    View full-size slide

  8. People copy patterns

    View full-size slide

  9. The status quo cannot
    be allowed to continue

    View full-size slide

  10. Common pain points
    https://www.flickr.com/photos/kwl/4595324641

    View full-size slide

  11. Platform and version
    support

    View full-size slide

  12. Weak scoping

    View full-size slide

  13. No standard interface

    View full-size slide

  14. Compilation phase work

    View full-size slide

  15. Needing chef-rewind

    View full-size slide

  16. Attributes and precedence

    View full-size slide

  17. Pattern proliferation

    View full-size slide

  18. The path out of the darkness
    https://www.flickr.com/photos/71267357@N06/15864687537

    View full-size slide

  19. Change how cookbooks
    are written

    View full-size slide

  20. systems
    beliefs! behaviors

    View full-size slide

  21. Standardize interfaces

    View full-size slide

  22. Eliminate the pain points

    View full-size slide

  23. Focus on resources

    View full-size slide

  24. Make it super easy!
    to write resources

    View full-size slide

  25. Ship resources for ALL
    THE THINGS

    View full-size slide

  26. Copy better patterns

    View full-size slide

  27. Make it fucking
    delightful

    View full-size slide

  28. Simple design patterns
    https://www.flickr.com/photos/pollock/4172865252

    View full-size slide

  29. You just separated data
    from code

    View full-size slide

  30. You also just built an
    interface

    View full-size slide

  31. Complex design patterns
    https://www.flickr.com/photos/alanosaur/6417040565

    View full-size slide

  32. This is where things
    get weird

    View full-size slide

  33. amazon
    debian-6
    debian-7
    ubuntu-10.04
    ubuntu-12.04
    ubuntu-14.04
    centos-5
    centos-6
    centos-7
    freebsd-9
    freebsd-10

    View full-size slide

  34. Debconf!
    Docker!
    LaunchD!
    Runit!
    SMF!
    Simple!
    SystemD!
    Sysvinit!
    Upstart!
    Windows Services

    View full-size slide

  35. There is a large amount
    of variation between
    software versions

    View full-size slide

  36. There is an insane amount
    variation across platforms

    View full-size slide

  37. These differences need
    to be handled
    somewhere

    View full-size slide

  38. Early techniques did
    everything in the recipe

    View full-size slide

  39. data
    resource
    pattern

    View full-size slide

  40. Later techniques
    focused on isolation

    View full-size slide

  41. Resource pattern
    isolation

    View full-size slide

  42. private
    recipes by
    convention

    View full-size slide

  43. Resource data isolation

    View full-size slide

  44. We now have decision
    logic in our interface

    View full-size slide

  45. Default values often
    need to be computed

    View full-size slide

  46. Doing this in the
    interface leads to
    sorrow

    View full-size slide

  47. We need a better way

    View full-size slide

  48. Consumption Patterns
    https://www.flickr.com/photos/ektogamat/2578779839

    View full-size slide

  49. Why resources are best
    https://www.flickr.com/photos/cross_stitch_ninja/4932950637

    View full-size slide

  50. node attributes
    roles
    environments
    databags
    are nice to haves

    View full-size slide

  51. They drive data about
    resources

    View full-size slide

  52. Resources are
    fundamental

    View full-size slide

  53. Resources are strongly
    scoped

    View full-size slide

  54. Resources have a
    standardized interface

    View full-size slide

  55. Resources have types,
    names, and parameters

    View full-size slide

  56. Resources have
    identities

    View full-size slide

  57. Resource can see each
    other

    View full-size slide

  58. Promise to
    talk

    View full-size slide

  59. Promise to listen

    View full-size slide

  60. Resource behave the
    same across platforms

    View full-size slide

  61. Resource can have
    multiple providers

    View full-size slide

  62. Writing simple resources

    View full-size slide

  63. Writing complex resources

    View full-size slide