Mgmt is a next gen config management tool that takes a fresh look at existing automation problems. Three of the main design features of the tool include:
* Parallel execution
* Event driven mechanism
* Distributed architecture
This presentation will briefly introduce the tool and spend most of the time presenting and demoing some of the newer features in the project. We'll present some of the new resources (virt, password, etc) new features (libified mgmt, send/recv, DSL) and how these can be used to build autonomous systems. Finally we'll talk about some of the future designs we're planning and make it easy for new users to get involved and help shape the project.
OSDC 2017 | Mgmt Config: Autonomous systems by James Shubin
1. 1 JAMES SHUBIN
Next generation
configuration mgmt
James Shubin, a.k.a. @purpleidea
Principal Software Engineer
Storage Engineering Group, Red Hat
OSDC/Netways, Berlin, Germany, 17/May/2017
3. 3 JAMES SHUBIN
Who am I ?
● Hacker
● Config Mgmt. Architect @ Red Hat
● Technical Blogger: The Technical Blog of James
https://ttboj.wordpress.com/
● Physiologist (Cardiology Specialization)
● DevOps believer
7. 7 JAMES SHUBIN
Background
I started hacking with puppet around ~0.24
I think I got pretty good at it
I wanted to push further, but I ended up needing
to write some outrageous hacks to get there…
I gave a “pushing puppet” talk at LISA 2013, and
DevConf.cz 2015
9. 9 JAMES SHUBIN
Hack: Exec['again']
# notify me to get puppet to run again
exec { 'again':
command => "${vardir}/again/again.py",
logoutput => on_failure,
refreshonly => true,
require => File["${vardir}/again/again.py"],
}
https://github.com/purpleidea/puppet-common/blob/master/manifests/again.pp
36. 36 JAMES SHUBIN
Distributed topology: demo
● Three+ nodes: A, B, C
● Each creates one file which it will export
● A (exports): /tmp/mgmtA/fA
● A (collects): all (exported) files into: /tmp/mgmtA/
● Similarly with B and C, except with the letters B
and C substituted in to the emphasized locations
above.
● Note how fast this converges...
43. 43 JAMES SHUBIN
● Add h4, remove h2…
● Needs etcd API improvements for edge cases
● Now ported to etcd V3 beta API
● Help and patch review wanted...
Automatic elastic clustering: demo
45. 45 JAMES SHUBIN
● Executes over SSH
● Exchanges resources through etcd initiator
● Converges together as a cluster
● Responds instantly to configuration changes
Remote execution: demo
47. 47 JAMES SHUBIN
● Pkg + File + Svc resources: autoedges3.yaml
● Many other resources will be able to use this…
● Other ideas?
Automatic edges: demo
48. 48 JAMES SHUBIN
1) Svc resource could list its config files, eg:
[Config]
File=/etc/foo/thing.conf
Dir=/etc/bar/
Match=/etc/baz/*.conf
2) Svc could determine if running state of service
matches configuration files mentioned via
lastModified time of start/reload checks: eg:
“service needs reload, config file changed”
Automatic edges: enhancements
53. 53 JAMES SHUBIN
● Pkg resource: autogroup2.yaml
● File resources could be grouped to save watches
● Higher level, API-bound resources will love this
● Other ideas?
Automatic grouping: demo
55. 55 JAMES SHUBIN
● Yeah this exists, and the code is beautiful.
● Not complete, but the core is looking great!
● ./mgmt run --puppet 'notify { “hello world”: }'
● All thanks to Felix Frank (@felis_rex)
Automatic puppet → mgmt compiler
56. 56 JAMES SHUBIN
● Augeas
● Exec
● File
● Hostname
● KV
● Msg
● Noop
Current resources (in some form)
● Nspawn
● Password
● Pkg
● Svc
● Timer
● Virt
57. 57 JAMES SHUBIN
● We have a resource guide. Please help write
new resources, and improve existing ones!
● https://github.com/purpleidea/mgmt/blob/master/
docs/resource-guide.md
Resource guide (internal, upstream)
58. 58 JAMES SHUBIN
● AutoEdge
● AutoGroup
● Noop
● Retry & Delay
● Poll
● Limit & Burst
● Sema
Current metaparams
● Got ideas for more?
73. 73 JAMES SHUBIN
Red Hat funds good hackers so that we can...
● Work on open source / free software things...
● Speak at events like this...
● Hack on good products and solutions...
● For access to products, solutions, and support, visit:
https://redhat.com/
80. 80 JAMES SHUBIN
Learn more
● The Technical Blog of James:
https://ttboj.wordpress.com/
● Mgmt:
https://github.com/purpleidea/mgmt/
● Technical articles and screencasts about this:
https://ttboj.wordpress.com/?s=mgmtconfig
● Contact me if you have any other questions:
purpleidea @ { irc, twitter, github, gmail, redhat.com }