Bacula-users

Re: [Bacula-users] scripts for holding configuration in database

2012-07-30 09:30:34
Subject: Re: [Bacula-users] scripts for holding configuration in database
From: Domen Kožar <domen AT dev DOT si>
To: Silver Salonen <silver AT serverock DOT ee>
Date: Mon, 30 Jul 2012 15:03:27 +0200
Good job!

I plan to do something very similar for Almir (readthedocs.org/docs/almir/). Approach would be a little different; parsing current configuration files, generating AST from which html forms are rendered and configuration is then written back to .cong files. I'm still searching for a company to sponsor the development, but it will happen in version 0.3 or 0.4 :)

On Mon, Jul 30, 2012 at 2:40 PM, Silver Salonen <silver AT serverock DOT ee> wrote:
On 28.05.2011 15:35, Silver Salonen wrote:
Hello Bacula users :)

For a long time I've been thinking about and trying to create a web-based tool for configuring Bacula. For keeping things simple and flexible, I'd thought on keeping all the configuration in a database. So I've created a database layout and a few Ruby scripts (60KB) that use this database for quering and manipulating configuration.

The point for writing about it is to ask whether anyone would be interested in these scripts. If so, I could create a software project (eg. in Sourceforge) for that and share the scripts with everybody. If the scripts would turn out to be of use, we could then make them better together etc :)


So a bit more about the scripts..

I have named the Ruby classes beginning with 'BaculaConf' and they are:
  - BaculaConf - configuration consisting of multiple sections
  - BaculaConfSection - configuration section having all the parameters and sub-sections
  - BaculaConfMysql - MySQL backend for querying and manipulating configuration in MySQL
  - BaculaConfFileParser - backend for parsing configuration from files (eg. for importing configuration into MySQL)

So far I've used the classes for importing my quite complex Bacula configuration into the database and I've also created a Ruby on Rails application for managing the configuration.

Using the configuration in bacula-dir.conf would be just like this: @"|baculaConf_dir.rb", and baculaConf_dir.rb would have something like:

=====
#!/usr/bin/env ruby
dirConfig = BaculaConf.new(BaculaConfMysql.new({"host" => "localhost", "user" => "baculauser", "password" => "baculapassword", "database" => "bacula-conf"}, false), nil, true, true, false)
dirConfig.printSections
=====


All the comments and questions are very welcome :)

Hello.

This thing has been on hold for another year, but I've now decided to move on with it and put it into production.

I have put this project into Sourceforge under the name of Rubycula. I have also uploaded my SVN in there and made available the rdoc documentation of the code.

https://sourceforge.net/projects/rubycula
http://rubycula.sourceforge.net/rdoc/
https://sourceforge.net/p/rubycula/wiki/Examples/

Should anyone be interested in more, just ask :)

--
Silver

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>