FAI and yaml [Work in progress]
Thomas Neumann
blacky+fai at fluffbunny.de
Wed Jul 28 22:28:42 CEST 2010
hiya
Thomas asked me to talk to the devel list about this. On linux-fai we
talked a bit about yaml support, Thomas hinted at an implementation by
Ingo some time ago
<http://faiwiki.informatik.uni-koeln.de/index.php/FaiTemplates> and that
someone on this list is working on this too.
I've taken some liberty with the sample implementation (dropped some
stuff, rewritten the code to be more easily readable (to me) and
implemented an metainfo block. This is the feature I absolutely need to
make writing network configuration files for SuSE Linux Enterprise
Server 10 (and OpenSuSE 10 ?) possible. (Each interface has it's own
configuration file, the mac address of the interface is encoded in the
filename.)
It's currently in the "works for me" phase. I hope to receive some
feedback to make this stuff generic enough to be of general interest.
cool stuff (implemented)
- it doesn't matter what your backend is (as long as there's some
script assembling a yaml-file)
- it doesn't matter anymore where the template is located (filename
does not need to depend on file path)
instead of
templates/etc/network/interfaces/OS_DEBIAN.tt (->
/target/etc/network/interfaces)
one could create
templates/netconfig/OS_DEBIAN.tt (-> /target/etc/network/interfaces)
- the metainfo is in itself templateable
- it is +really+ +really+ easy to create config files
(actually easier then fcopy - because you only need to create the
file, no need for the fcopy command)
cool stuff (wishlist)
- request specific file access rights, ownership or even
(non-)existence of a file via metainfo
- make multiple conditions possible (SuSE and Version10 and Frontend)
- create multiple files from the same template (interface config and
routing for SuSE)
dropped stuff
- pod documentation (to lazy to write one while in design stage)
- parsing multiple yml-files based on classes
(nice feature, but I think it doesn't belong in the
"configuration-writer" part)
1) scripts in class/ collect info and write them into a file
2) template engine parses this file and acts accordingly
tschüß
thomas
More information about the linux-fai-devel
mailing list