Tags:
create new tag
, view all tags

Have Multiple TWiki installations share a common codebase

When maintaining several TWiki installations on the same server, it's an advantage from the maintenance point of view to have them "share" the same codebase. This doesn't mean just having the same version running in all installs, but having each install actually share the lib (and other important) directories.

This can be easily done on Linux using symbolic links. Attached to this topic is my first stab at creating a script to automate the process of creating a new TWiki installation based on an existing one.

-- Contributors: RafaelAlvarez - 09 Oct 2006

Discussion

I propose this script to be included in SVN and in the distro, once it has been refined based on the community feedback.

-- RafaelAlvarez - 09 Oct 2006

There a a couple of things you don't need sym-links but can be set using LocalSite.cfg: data/mime.types, templates, locale. If you are running multiple sites from a svn workarea, then you need to sym-link twikiplugins too in case you pseudo-install plugins. Otherwise you end up with broken links. And then there's a couple of edits needed i.e. setting the target dir in bin/LocalLib.cfg. Could be done in the script too.

-- MichaelDaum - 09 Oct 2006

I would so much appreciate a cleanworking script and a clear set of instructions that don't require the usual sort through comments, hack & slash to make work correctly and securely.

I'm right at that point where I have multiple brainstorms for various different TWikiSites that I'd like to fire up on my server. But the thought of maintaining more than one codebase is what prevents me from doing so.

-- KeithHelfrich - 10 Oct 2006

Michael, I prefer to symlink mime.types and locale because I want to have as little work configuring the new instance as possible, and it's common to have them shared.

As for the template directory, notice that I symlink the content, not the directory.

I created this script to be able to have several sites running the code from a centralized SVN workarea, so with a single svn up everything is up to date. So, for plugins is a matter of pseudo-install them in the central place, and all the installation will "see" it (notice that the lib/TWiki directory is symlinked too). Of course, they would need to be activated from configure.

-- RafaelAlvarez - 10 Oct 2006

Keith, as soon as I have all my sites up an running using the script, I'll post the final script with the proper instructions.

-- RafaelAlvarez - 10 Oct 2006

> As for the template directory, notice that I symlink the content, not the directory.

Why?

-- MartinCleaver - 11 Oct 2006

Because custom skins MAY be particular to each site. That was the rationale, anyway. I'm finding it not to be a good idea (I needed to copy PatternSkin on all the sites).

-- RafaelAlvarez - 11 Oct 2006

I thought so.

The patch in TemplatePathIsCounterintuitive allievates this: just keep your per-site template, css and jpg files in pub.

-- MartinCleaver - 11 Oct 2006

We're already getting into the usual sort through comments, hack & slash to make work correctly and securely. smile

A cleanworking script and a clear set of instructions would be fantastic !

-- KeithHelfrich - 10 Nov 2006

I'm still refining it for our internal use. As soon as I have something cleaner and documented, I'll release it.

Anyway, we should be thinking in a solution that is integrated into the Core, as this script is basically a "hack" using linux/unix symbolic links.

-- RafaelAlvarez - 10 Nov 2006

Hi Rafael, thanks for keeping the skins separate. It's true that different sites could each want a different skin.

And I agree: a solution integrated into the core would certainly be best. In fact, if the core were to support both MultipleSitesSameCodebase and ShorterURLs, then we'd really have something to work with!

-- KeithHelfrich - 25 Nov 2006

An alternative approach for sharing files could be to use something like http://en.wikipedia.org/wiki/UnionFS (copy-on-write). I.e. keeping a clean dist in the "middle" and only keep updated files (files with site-specific changes) in each site-dir.

This would make upgrading rather elegant I think, as you would have the files changed for each site readily available, with no risk of overwriting any customizations when updating the central distribution.

Just a stray thought.

-- SteffenPoulsen - 26 Nov 2006

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2006-11-26 - SteffenPoulsen
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.