Howdy!
I came across this module this evening, while trying to evaluate / decide between the available [demo site, deploy, multisite managers, backups, etc] modules for a drupal-farm idea I'm working on.
I like what you've done, and see how it's certainly useful for some development sites. The code is tidy too :-)
But for what I have in mind, I don't want/need the database user to have user administration rights, and I don't want dozens of databases. Sometimes we do, and there are bigger advantages to that for you (like portability), but mine are totally subserviant and transient.
Broadly speaking, it's a public drupal-farm of a selection of drupal demo subsites created on the fly. I need to be able to trash them etc, and I wouldn't be expecting to export them or even maintain them - they are there for proof-of-concepts.
ANYWAY.
The way I'm modelling it right now is:
- I have a master Drupal site, that does this druplet-managing. It runs on its database as usual.
- I have a single subsidary database where all the subsites will go.
- This DB has a single, shared logon, different from the master.
- When I make a druplet, all goes pretty much as normal, but I make a prefixed set of tables in the target DB using average Drupal DB rights, not a brand new DB.
This is different from your goals, I know, but it's totally compatable.
And anyway, it's pretty good to support Drupal prefixing anyway, just for completeness. I haven't yet added configurable hosts though ! ;-}
And, the good news is : I've just done it anyway!
Here's a patch that's doing ALL of that for me tonight.
- I've added a 'prefix' column into the druplet db table, so it needs to run update if installed.
- A few more settings are on the druplet config page - defining if the prefix method is used, and if so where the target DB is
- The config page flags a warning if the site dir is not writable
- When submitting a node, if the site uses a prefix, no database info needs to be entered
- When creating a node, the credentials are mangled a bit to allow for the three options [new database, current database+prefix, existing separate database+prefix]
- Database creating is skipped, prefix is added for the prefix cases.
- settings.php generation allows for optional prefix string
Let me know how you feel about this.
Suggestion - How about we cut down all that boilerplate 'settings.txt' guff and remove the 6 pages of comments that don't really apply?
Or at least insert a message of your own at the top to the effect that "This file was autogenerated by druplet.module"
Suggestion 2 - How about a custom settings.php file, so we can define shared tables and more options? ... Ah, I see we can already put stuff into the $conf array ... that'll be fun!
I've got some bigger plans afoot, so I'll be looking at ways of utilizing this module with other multisite tools quite soon. :-B
.dan.
| Comment | File | Size | Author |
|---|---|---|---|
| druplet-prefix_support-2008-06-27.patch | 15.64 KB | dman |
Comments
Comment #1
matt@antinomia commentedHey Dan. Glad you've found utility in this module. I haven't had a chance to test the changes, but I can understand where you're going from a quick glance. I'll try to find the time to test this soon, but if it's okay I'll just add you to the CVS access list and you can commit the changes yourself. Also, regarding the @todos in the patch, thanks for the suggestions. Please feel free to take any of them on :D