To store server configurations in a database, there are several common situations.

Configuration file formats:

  • Properties file: key value pairs, very easy, though some have "=" in between the pairs (mysql, mydns, postfix), which others do not (squid)
  • XML configurations (djabberd, nexista)
  • Exceptions

Configuration Key Sets:

We'll also want to have a database of configuration keys, called key sets. Each key set will have a package id, a version number attached to it, as well as a status flag indicating whether it is complete or not.

For example, MyDNS has the following configuration keys (not a complete list, just an example):

  • zone-cache-size
  • zone-cache-expires

Configuration Value Sets:

These are the actual configuration. Each configuration set will have a package id, the version number, a server or host id, and the key and value pair. The key should optionally be allowed to be encrypted for privacy, whereupon it will be decrypted during the configuration file export.

System Configuration vs Service Configuration

In considering the modularization of system configuration, it might make sense to differentiate between system configuration (like the hostname, network configuration, etc.) and service configurations (like what port httpd should run on, and the user db for djabberd). The system configuration would include what services are installed and should run on boot. These two sections could be combined into one file for storage, but for flexibility, they could be stored separately. At runtime, would the be merged into a single xml file for access via simpleXML?

NODOWS SQLite Service Configuration Data Model

m0n0wall Configuration Format

Very Long Boot Times

A very long boot time is not such a bad thing. Boot and operate using an initramfs, connect to a network using DHCP, access a configuration database, download requirements, start and manage processes. A lingering question is security. One possibility would be similar to the way m0n0wall has a single small writable partition for storing the configuration. In addition to a basic configuration, it could include a key for accessing the configuration database. Once identified, the configuration server would provide additional resources and configurations.

The rootfs would include the ttylinux basesystem, busybox, dropbear, glibc, and bash.