[phpBB] Fwd: Re: [Dbconfig-common-devel] "multisite" setups

J.M.Roth jmroth at iip.lu
Tue Mar 16 02:22:00 CET 2010


I am currently evaluating this.
Currently I'm struggling with what to do with the old config in case of
an upgrade.


-------- Original Message --------
Subject: Re: [Dbconfig-common-devel] "multisite" setups
Date: Fri, 12 Mar 2010 09:49:28 +0100
From: sean finney <seanius at debian.org>
To: jm+dbconfig-common-devel at roth.lu
CC: dbconfig-common-devel at lists.alioth.debian.org

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
by packagers.


More information about the phpBB-l mailing list