Re: Keepalived configuration file parser / generator

Tom Limoncelli <[email protected]> Mon, 9 Jan 2017 21:45:16 -0500
Newsgroups gmane.linux.keepalived.devel
Message-ID <CAHVFxgmO6_Lt9cRKAQCVQydGaDfFaGnKF075d5Afzqm742joNQ@mail.gmail.com>
On Thu, Jan 5, 2017 at 12:22 PM, barak adam <[email protected]> wrote:
> Hey Tom,
>
> Thanks a lot for the reference to Augeas parser system.
> Did you use it? Assuming I am having a configuration structure, can you
> please provide a short example of how to use it?
> Our system and CLI are written in C.

I would look at the "quick tour": http://augeas.net/tour.html

Augeas has a command-line (interactive) version, but also a C library
interface.  I mostly use Puppet which uses the C library of Augeas to
do things. For example, https://forge.puppet.com/arioch/keepalived

> BTW - is the method of updating the configuration file and then reload the
> Keepalived daemon to get the changes, is it a good / popular practice?

Yes.  Update the file then reload keepalived.


Augeas is a bit complex.  You might want to simply use a text template
system to generate keepalived.conf files.  It depends on how much
complexity you desire.

Tom

-- 
Email: [email protected]    Work: [email protected]
Blog:  http://EverythingSysadmin.com

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi