"Infrastructure as Data" by Nick Lewis, Software Developer, Puppet Labs.
Presentation Overview: We all know the benefits of infrastructure as code - version control, reusability, shareability, documentation, and so on. Another popular notion is that of code as data, by which code can be introspected, modified, and used for decision making. Combining the two ideas, the natural implication is that infrastructure is also data, and can be similarly introspected, modified, and used for decision making. In other words, we can do math on infrastructure. We'll look at some interesting ways this data can be filtered, combined, and applied to achieve results which would be difficult to describe directly in code.
Speaker Bio: Nick Lewis is a software developer at Puppet Labs and one of the co-authors of PuppetDB.
2. puppetconf.com #puppetconf
Infrastructure as Data
• Specified data
• Manifests
• Hiera
• Node classification
• Observed data
• Facts
• Generated/derived data
• Catalogs
• Reports
Friday, August 23, 13
3. puppetconf.com #puppetconf
as a
minecraft addict
I would like
time to be correct on my computer
so that
I can stop playing minecraft and go to sleep
Friday, August 23, 13
8. puppetconf.com #puppetconf
if install_package ntp; then
restart_ntp='y'
fi
if add_file_line 'server 0.pool.ntp.org'; then
/etc/ntp.conf && restart_ntp='y'
fi
if [ 'y' = "$restart_ntp" ]; then
restart_service ntp
else
start_service ntp
fi
Friday, August 23, 13
38. puppetconf.com #puppetconf
time sync
ntpd service
ntp package ntp.conf
filesystem
yum
rpmpython
electricity
network
ntp server...
...
... ...
the very concept of time itself
Friday, August 23, 13
41. puppetconf.com #puppetconf
Package installs Service
File is the source of Package
User owns File
File configures Service
User is a member of Group
File is the directory of File
File is executed by Exec
Friday, August 23, 13
42. puppetconf.com #puppetconf
File / File
File / User
File / Group
User / Group
Cron / User
Exec / File
Exec / User
?
Friday, August 23, 13