On Fri, May 25, 2012 at 11:32 AM, Thomas Mortagne <thomas.mortagne(a)xwiki.com
wrote:
> On Fri, May 25, 2012 at 8:16 AM, Vincent Massol <vincent(a)massol.net>
wrote:
> > Hi devs,
> >
> > Since I'm working on making XE work in Windows7 I've thought more about
> XWiki's install and configuration. Actually this is not a new topic, I
> remember starting a discussion about it a few years ago on the devs list
> but we didn't act on it so here it comes again ;)
> >
> > Rationale
> > ========
> >
> > The idea is to separate XWiki's binaries from its data. There are
> several reasons for wanting this:
> >
> > * Some OSes require this and don't allow writing in the binary
> directory. Windows 7 for example won't allow writing data in \Program Files.
> > * It makes upgrading simpler since you don't need to fish for
> configuration data and copy them somewhere before unpacking a new
> distribution over. Or if you unpack in a new directory you don't need to
> copy the data from the old directory to the new one.
> > * As a consequence of the previous point It allows easier auto upgrades
> of XE
> > * It makes it simpler to know what to backup: all you need to back is
> the data directory.
> >
> > Proposal
> > =======
> >
> > This is the simplest I've found (I've imagine a lot of more complex
> options which offer other small possibilities but in the end I went for the
> simpler one for now). So here goes the process when starting up XE:
> >
> > * XE looks for a XWIKI_DATA environment variable and if found it uses it
> as its environment.permanentDirectory value
>
> Why not XWIKI_PERMANENTDIRECTORY since that's how we call it in XWiki ?
>
> > * If not found, XE looks in the user home directory for an XWiki
> directory. Now the name of this directory is environment-dependent. On non
> windows systems it looks for ".xwiki" directory and on Windows systems it
> looks for a "XWiki" directory.
> > * If not found, then XE stops and prints a message in the console
> explaining that it couldn't find the location of the XWiki Data dir with
> explanations on how to set it.
> >
> > The recommendation is thus that users set the XWIKI_DATA environment
> property.
>
I do not like this so much.
If you use filesystem attachement, properly locating this directory is
crucial, and leaving it to an environment variable is risky, IMO.
Notes:
* At startup XE prints as an INFO log the location of the permanent dir
it is
using.
* For the standalone distribution we would set
the XWIKI_DATA env
variable in the xwiki start file (start_xwiki.sh and
start_xwiki.bat) to
point to the data/ dir in the distribution.
* One aspect that is not covered here yet (the
topic for another email):
the installer. I'll prepare another mail for that
since it's independent
for me.
Note that for Debian installed I simply set the right directory in
xwiki.cfg/xwiki.properties.
Why not doing the same for the Windows installation ?
If you means, because the configuration file are on the read-only part of
your installation, then your need is to have local configuration files for
users. This is absolutely not the same issue.
Use cases
=========
This allows the following use cases:
* Make it easy to upgrade XE
* Make it easy to backup XE
* MAke it easy to use an existing XE install but point it to a different
configuration, for testing purposes for ex
* Allow installing XE for all users on a system
* Allow installing XE for my user only
WDYT?
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Denis Gervalle
SOFTEC sa - CEO
eGuilde sarl - CTO