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

The Field Guide to Understanding Declarative Systems

The Field Guide to Understanding Declarative Systems

by Povilas Daukintis
DevOps Pro Vilnius 2016

DevOps Pro

June 01, 2016
Tweet

More Decks by DevOps Pro

Other Decks in Technology

Transcript

  1. $:~whoami (Mostly) operational stuff Configuration management evangelist Tackling infrastructural problems

    in Adform Current environment: 3000+ servers, 30+ product teams, heterogeneous stacks
  2. EXAMPLES OF DECLARATIVE SYSTEMS make ANSI SQL (Structured Query Language)

    Prolog (declarative logic programming language) XML (extensible markup language)
  3. CONFIGURATION MANAGEMENT (CM) “CM is the practice of handling changes

    systematically so that a system maintains its integrity over time. CM implements the policies, procedures, techniques, and tools that are required to manage, evaluate proposed changes, track the status of changes, and to maintain an inventory of system and support documents as the system changes” - IEEE-SA 828-2012
  4. DSLs DSL is a domain specific language Many CM tools

    have their own on the purpose It is a way to create appropriate layers of abstraction
  5. DIFFERENT ABSTRACTION LAYERS Currently existing CM tools manage configuration of

    a single node pretty well Still not the case if we speak about multi-node interdependencies What about dependencies of infrastructure dependencies?
  6. LEARNED LESSONS Rollout your CM/IaC code in small steps When

    you see deviations from the existing model, adapt quickly “Do it once” approach does not work at scale Choose appropriate tools
  7. PROMISE THEORY Formally proposed by Mark Burgess in 2004 Some

    of the ideas are 20+ years old CFEngine 3 is based on it
  8. PROMISE THEORY Promise theory is a model of voluntary cooperation

    between autonomous actors Who publish their intentions to one another in the form of promises It can be viewed as a mathematical graph
  9. IMPORTANT ASPECTS OF PROMISE THEORY Obligations vs. Intentions Handling failures:

    it must work vs. it will fail Automation: it must be this vs. it should look like this Deterministic vs. Indeterministic view of the system
  10. KEY PRINCIPLES OF PT Convergency - The promise is the

    desired state Embracing failures - Promises might be kept occasionally Autonomy - Not relying on other agents
  11. PUPPET IN CONTEXT OF PT Every Puppet declaration is a

    sort of promise Everything is converging on the promised configuration state as much as possible at each Puppet run It will keep trying to move closer to the ideal state where all promises are kept
  12. MGMT “mgmt” feels like a very modern approach in CM

    systems space Most interesting properties: Parallel execution to run all the resources concurrently (where possible) Event driven to monitor and react dynamically only to changes (when needed) Distributed topology so that scale and centralisation problems are replaced with a robust distributed system Declarative DSL (reusing Puppet DSL for now)
  13. Any