Using Elektra in Puppet (config parsing)

12 views
Skip to first unread message

David Schmitt

unread,
Mar 26, 2008, 4:03:16 AM3/26/08
to Puppet Development
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi *!

Even before starting with puppet, I was pointed at libelektra to
programmatically change config files. Then the library was in a sorry state
and didn't do much. Things seem to have taken a turn to the better:

http://www.libelektra.org/GetStartedMounting


Lately I've been in contact with Markus Raab, who just re-wrote parts of the
elektra library with improved functionality about using the library in other
projects, like puppet. There seems to be old and dysfunctional ruby bindings
for the library and of course there is still a severe lack of parsers for
configs.


Since the project also targets integration as native configuration storage
backend for applications, it might be interesting to watch and participate for
some of you. I envision[1] a world without ParsedFile providers, where all
config values on a system can be set via libelektra.

Regards, DavidS


[1] others might say i just got a bad batch of crack ;)
- --
The primary freedom of open source is not the freedom from cost, but the free-
dom to shape software to do what you want. This freedom is /never/ exercised
without cost, but is available /at all/ only by accepting the very different
costs associated with open source, costs not in money, but in time and effort.
- -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH6gNF/Pp1N6Uzh0URAja9AJ0aWiaOoy145HbYiARzrXdmlkgkNQCgkI0U
9UeAdJzdVBDhqMW9D1ApMls=
=J9Ey
-----END PGP SIGNATURE-----

Luke Kanies

unread,
Mar 26, 2008, 9:43:59 AM3/26/08
to puppe...@googlegroups.com
On Mar 26, 2008, at 3:03 AM, David Schmitt wrote:

> Since the project also targets integration as native configuration
> storage
> backend for applications, it might be interesting to watch and
> participate for
> some of you. I envision[1] a world without ParsedFile providers,
> where all
> config values on a system can be set via libelektra.


Yeah, I'd like to have a much more stable and featureful replacement
for ParsedFile. It's the best I've been able to get in three tries,
but it could still be a lot better.

David Lutterkort is working on something related to this, but I'm not
sure if he's ready to announce it.

--
Hegel was right when he said that we learn from history that man can
never learn anything from history. -- George Bernard Shaw
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

David Lutterkort

unread,
Mar 26, 2008, 12:25:59 PM3/26/08
to puppe...@googlegroups.com

On Wed, 2008-03-26 at 08:43 -0500, Luke Kanies wrote:
> David Lutterkort is working on something related to this, but I'm not
> sure if he's ready to announce it.

It's not quite ready for primetime, but if anybody is interested, it's
called Augeas[1] and has Ruby bindings[2]. If anybody wants to give the
current code a spin, I'd be very interested in any feedback; the public
API, which is what most people will care about, is in a usable state.
There are RPM's in my yum repo.

The main idea behind Augeas is to parse 'native' config files into a
tree, expose that tree through a simple API for modifications, and then
save the tree back into those files, preserving all those pesky details
like comments, whitespace etc. The 'Quick Tour' [3] on the site explains
what that looks like.

Most of the work is going into the file <-> tree transformation, and the
language in which you describe those. I want to make it as easy (and
safe) as possible to describe new file formats; in particular, you don't
have to write any C code. Describing a file format only requires that
you write down regular expressions to parse that file, together with
some information on how to map things that match those regexps into the
tree. The language is designed in such a way that when you write down
the file -> tree transformation, the tree -> file direction is already
implied and comes for free.

The last big thing before I feel Augeas is in a generally consumable
state is a revamp of the description language[4]; should be done by the
end of next week.

David

[1] http://augeas.net
[2] http://augeas.net/download.html
[3] http://augeas.net/setup.html
[4]
https://www.redhat.com/archives/augeas-devel/2008-March/msg00018.html


Reply all
Reply to author
Forward
Message has been deleted
0 new messages