SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
scripts for holding configuration in database
Author Message
Post scripts for holding configuration in database 
On 28.05.2011 15:35, Silver Salonen wrote:

Hello Bacula users Smile

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 Smile


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: < at > "|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 Smile

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 Smile

--
Silver

Post scripts for holding configuration in database 
On 30.07.2012 16:03, Domen Kožar wrote:

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 Smile



Well, my initial goal was to create a portal for my backup customers, so that they could easily create new jobs for their servers etc. It would be a true multi-user portal, so I thought editing files would not be an option. That may of course depend on how one could work around the limitations etc.

--
Silver

On Mon, Jul 30, 2012 at 2:40 PM, Silver Salonen <silver < at > serverock.ee ([email]silver < at > serverock.ee[/email])> wrote:
On 28.05.2011 15:35, Silver Salonen wrote:

Hello Bacula users Smile

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 Smile


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: < at > "|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 Smile

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 Smile

--
Silver





Post scripts for holding configuration in database 
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 Smile

On Mon, Jul 30, 2012 at 2:40 PM, Silver Salonen <silver < at > serverock.ee ([email]silver < at > serverock.ee[/email])> wrote:
On 28.05.2011 15:35, Silver Salonen wrote:

Hello Bacula users Smile

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 Smile


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: < at > "|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 Smile

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 Smile

--
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.net ([email]Bacula-users < at > lists.sourceforge.net[/email])
https://lists.sourceforge.net/lists/listinfo/bacula-users



Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB