confux

Confux is a new approach to generate configuration files. It constructs these files from multiple 'particles' where each can add it's own features to the file.

Why confux?

There is a lot of software on the web whos only interface is a configuration file. Apache, xorg and mysql are some examples. It should be easier to configure these programs with this software rather than learning the syntax of the configuration files.

Why not Yast or so?

Yast is hard coded. I mean: It's limited in its options. New options can only be added through a new binary version. Confux works on 'particles' which generate the configuration.
Confux doesn't need to be recompiled to make new configuration possibilities avaible. In fact it uses a dynamic web repository like packaging systems (apt, portage, ...) do.
So even a medium advanced admin should be able to write his own particles.

What if I change those files later?

Confux will be able to create user-particles from the current version of a file (in later revisions). So all local changes are particles, too.

Okay and how is the UI going to be like?

It's all organized in a big repository tree. The user can select and unselect different particles. For example he could select 'apache2/customuser' and 'apache2/customport'. Then confux will load these patches and its dependency 'apache2'. Then the GUI asks the user several questions like 'Which Port do you want to use?' and the configuration file is created afterwards.
Every question has support for a longer explaination.

Can you show me the UI?

Not really. I can show you my commandline-interface (which is german localized):

-> python SimpleGUI.py /www/apache2/port/2.0 /www/apache2/user/2.0
## Configuring /www/apache2/port/2.0.met, /www/apache2/user/2.0.met...
## Config 1 of 3: /www/apache2/2.0.met
Welchen Hostname möchten sie verwenden? (default: MeinServer
Antwort: -> MyHostname
## Config 2 of 3: /www/apache2/port/2.0.met
Welchen Port möchten sie verwenden? (default: 80)
Antwort: -> 88
## Config 3 of 3: /www/apache2/user/2.0.met
Unter welchem Benutzernamen soll ihr Server gestartet werden? (default: apache)
Antwort: -> sourceforgeuser


######## finished configuration ########
##### file /etc/httpd.conf:
ServerRoot "/usr/lib/apache2"
ServerName "MyHostname"
DocumentRoot /var/www/localhost/htdocs
Listen 88
User sourceforgeuser
Group apache


Can you explain how to write Particles?

Yes. In many ways. A particle consists of metadata in a .met file. The metadata defines dependencies, blockers, language and information about the configuration scripts.
Every configuration script has a file that it modifies (p.e. '/etc/httpd.conf') and a mode.
The mode is the runtime environment. For example the mode 'plain' executes the script as a python script. 'text' could just print a text file. Batchscripts, etc... would be possible, too.
So the format of the script depends on the used mode!

Here an example for a simple apache-configuration:

2.0.met:
DEP =
DLANG = de

MODE = /modes/plain
CFILE = /etc/httpd.conf
PART = 2.0.py


2.0.py:
ask('HOSTNAME', 'hostname')

print 'ServerRoot "/usr/lib/apache2"'
print 'ServerName "%s"' % answer('hostname')
print 'DocumentRoot /var/www/localhost/htdocs'
print '''Listen 80
User apache
Group apache'''


de-2.0.lang:
HOSTNAME
name = Hostname
question = Welchen Hostname möchten sie verwenden?
default = MeinServer
help = Der Hostname ist der Name unter dem sich ihr Server präseniert
regex = ^[a-zA-Z ]*$


I want to support this Project! I know what to do better!

Perfect! When you post here we can work together =o).

Your english is damn bad!

Feel free to correct me...