[Dbconfig-common-devel] "multisite" setups

sean finney seanius at debian.org
Fri Mar 12 08:49:28 UTC 2010


On Wed, Mar 10, 2010 at 12:41:58AM +0100, jm+dbconfig-common-devel at roth.lu wrote:
> I was wondering if or how dbconfig can be used for a 'multisite' setup
> of applications like phpbb or drupal.

there's some support for it in the code, but it's not exactly documented
and you'd be the first person to use it. lucky you!

it also hasn't been tested in a number of releases so it's possible that
regressions have snuck in....

> By multisite I mean: many sites can use the package, because each site
> uses an alias to the same codebase but different databases to "fuel" the
> application.

back when i was working on webapps-common, i included features to support
just this use case.  webapps-common never got off the ground, unfortunately,
but the required support in dbconfig-common should in fact remain.
however, it wasn't designed with direct usage by packages in mind, so you
might find using it a bit hackish.  basically, what you need to do is:

* generate a unique "instance id" for each "site" (something like
  pkg_checksum is good)
* in config, have a for loop over each instance id, where you set dbc_package to
  the id and call dbc_go.  you can also set the variable dbc_packagetitle
  so that the id doesn't find its way into debconf prompts.
* store this list of instances somewhere (a ucf managed file or something
  in /var/lib), and use it to do the same thing in postinst/postrm/etc.

this creates a series of files /etc/dbconfig-common/package_checksum.conf
with independant configs for each site, and provides a way to run all the
other dbc code independantly for each site.

so if you want to try it out, by all means feel free to do so, and i'd like
to hear back from you if you have suggestions for making it more easily usable
by packagers.


	sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/dbconfig-common-devel/attachments/20100312/0278f4c9/attachment.pgp>


More information about the Dbconfig-common-devel mailing list