[xwiki-devs] [Proposal] XWiki's Permanent Directory Strategy for Installations
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 * 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. 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. 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
On May 25, 2012, at 8:16 AM, Vincent Massol 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 * 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.
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.
s/standalone distribution/standalone zip distribution/ Thanks -Vincent
* 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.
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
On Fri, May 25, 2012 at 8:16 AM, Vincent Massol <[email protected]> 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.
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.
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Fri, May 25, 2012 at 11:32 AM, Thomas Mortagne <[email protected]
wrote:
On Fri, May 25, 2012 at 8:16 AM, Vincent Massol <[email protected]> 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
On May 25, 2012, at 12:31 PM, Denis Gervalle wrote:
On Fri, May 25, 2012 at 11:32 AM, Thomas Mortagne <[email protected]
wrote:
On Fri, May 25, 2012 at 8:16 AM, Vincent Massol <[email protected]> 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.
Funny :) Tomcat uses environment variables so if you don't set those rights you don't even get XWiki ;) So the solution is simple: you create a start script for your application (start_xwiki.sh for ex) and inside it you set the XWIKI_DATA directory).
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.
This proposal is independent of installers (I mentioned I'll send a separate email for installers). The idea here was for me to propose a solution that works without installers. Supporting installers is ok and installers would be able to set the XWIKI_DATA env variable by asking questions to you, whether you wish an install for all users, just for your users, check if there's already some xwiki installs at the specified dir, etc. Thanks -Vincent PS: Seen the various answers, I've probably not expressed myself very clearly. I apologize for that and I hope it's more clear from my various answers. If not, I'll resend a more general email with the goal so that at least we start by agreeing with the goal (i.e. separate data from binaries - I thought it was a give but maybe that's not the case).
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
On Fri, May 25, 2012 at 7:12 PM, Vincent Massol <[email protected]> wrote:
On May 25, 2012, at 12:31 PM, Denis Gervalle wrote:
On Fri, May 25, 2012 at 11:32 AM, Thomas Mortagne < [email protected]
wrote:
On Fri, May 25, 2012 at 8:16 AM, Vincent Massol <[email protected]> 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.
Funny :) Tomcat uses environment variables so if you don't set those rights you don't even get XWiki ;)
So the solution is simple: you create a start script for your application (start_xwiki.sh for ex) and inside it you set the XWIKI_DATA directory).
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.
This proposal is independent of installers (I mentioned I'll send a separate email for installers). The idea here was for me to propose a solution that works without installers. Supporting installers is ok and installers would be able to set the XWIKI_DATA env variable by asking questions to you, whether you wish an install for all users, just for your users, check if there's already some xwiki installs at the specified dir, etc.
Thanks -Vincent
PS: Seen the various answers, I've probably not expressed myself very clearly. I apologize for that and I hope it's more clear from my various answers. If not, I'll resend a more general email with the goal so that at least we start by agreeing with the goal (i.e. separate data from binaries - I thought it was a give but maybe that's not the case).
This was absolutely not clear from your initial proposal. And I am still puzzled now, since the permanent directory and the place where the configuration file are stored are two very different things. If you intend to put the configuration files in what we currently call the permanent directory, this is a big -1. Putting configuration in the same location we write file at run-time is simply opening a major security hole. I think, to the benefit of this proposal, that you start over, since most comments here are not related to your real goal, and please talk about a configuration directory and not permanent directory.
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
On 05/25/2012 06:25 PM, Denis Gervalle wrote:
On Fri, May 25, 2012 at 7:12 PM, Vincent Massol<[email protected]> wrote:
On May 25, 2012, at 12:31 PM, Denis Gervalle wrote:
On Fri, May 25, 2012 at 11:32 AM, Thomas Mortagne< [email protected]
wrote:
On Fri, May 25, 2012 at 8:16 AM, Vincent Massol<[email protected]> 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.
Funny :) Tomcat uses environment variables so if you don't set those rights you don't even get XWiki ;)
So the solution is simple: you create a start script for your application (start_xwiki.sh for ex) and inside it you set the XWIKI_DATA directory).
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.
This proposal is independent of installers (I mentioned I'll send a separate email for installers). The idea here was for me to propose a solution that works without installers. Supporting installers is ok and installers would be able to set the XWIKI_DATA env variable by asking questions to you, whether you wish an install for all users, just for your users, check if there's already some xwiki installs at the specified dir, etc.
Thanks -Vincent
PS: Seen the various answers, I've probably not expressed myself very clearly. I apologize for that and I hope it's more clear from my various answers. If not, I'll resend a more general email with the goal so that at least we start by agreeing with the goal (i.e. separate data from binaries - I thought it was a give but maybe that's not the case).
This was absolutely not clear from your initial proposal. And I am still puzzled now, since the permanent directory and the place where the configuration file are stored are two very different things. If you intend to put the configuration files in what we currently call the permanent directory, this is a big -1. Putting configuration in the same location we write file at run-time is simply opening a major security hole. I think, to the benefit of this proposal, that you start over, since most comments here are not related to your real goal, and please talk about a configuration directory and not permanent directory.
I second Denis, the xwiki.properties file shouldn't be in the same place as the other data. It's not something that should be writable by the wiki.
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
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On May 25, 2012, at 11:32 AM, Thomas Mortagne wrote:
On Fri, May 25, 2012 at 8:16 AM, Vincent Massol <[email protected]> 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 ?
Simply because it's very long for an environment variable but why not. Would need another underscore: XWIKI_PERMANENT_DIRECTORY. (please don't suggest XWIKI_ENVIRONMENT_PERMANENT_DIRECTORY ;))
* 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.
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.
And how do you tell XE where xwiki.cfg and xwiki.properties are located? (since the idea is to have all xwiki config files in the permanent directory). Thanks -Vincent
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
On 05/25/2012 02:16 AM, Vincent Massol 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 * 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 prefer the current way, defining it in xwiki.properties. Changing the way this configuration works is going to add some more headache for upgrades. AFAIR, it is possible in the izpack installer to filter a configuration file with values from the environment, or even asked from the user. I don't know how many people know how to define system variables, and even with a tutorial in front it is possible to mess it up. Plus, on a web-managed environment, are there ways of defining environment variables without needing restart rights on the servlet container?
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.
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
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On May 25, 2012, at 3:45 PM, Sergiu Dumitriu wrote:
On 05/25/2012 02:16 AM, Vincent Massol 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 * 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 prefer the current way, defining it in xwiki.properties. Changing the way this configuration works is going to add some more headache for upgrades.
err? That cannot work :) Maybe I wasn't clear: the goal is to move XWiki configuration files in a different directory from xwiki's binaries, that includes xwiki.properties of course :)
AFAIR, it is possible in the izpack installer to filter a configuration file with values from the environment, or even asked from the user.
I don't know how many people know how to define system variables, and even with a tutorial in front it is possible to mess it up.
I've mentioned that this proposal has nothing to with installers. They are different and of course users don't need to define any variable when using installers.
Plus, on a web-managed environment, are there ways of defining environment variables without needing restart rights on the servlet container?
You mean in case the servlet container is meant to host several webapps, xwiki being only one of them and it's not possible to stop it? Thanks -Vincent
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.
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
On 05/25/2012 01:02 PM, Vincent Massol wrote:
On May 25, 2012, at 3:45 PM, Sergiu Dumitriu wrote:
On 05/25/2012 02:16 AM, Vincent Massol 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 * 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 prefer the current way, defining it in xwiki.properties. Changing the way this configuration works is going to add some more headache for upgrades.
err? That cannot work :)
Maybe I wasn't clear: the goal is to move XWiki configuration files in a different directory from xwiki's binaries, that includes xwiki.properties of course :)
Indeed, I did not understand that at all. I remember now the old discussions though.
AFAIR, it is possible in the izpack installer to filter a configuration file with values from the environment, or even asked from the user.
I don't know how many people know how to define system variables, and even with a tutorial in front it is possible to mess it up.
I've mentioned that this proposal has nothing to with installers. They are different and of course users don't need to define any variable when using installers.
I mentioned installers because this way it would be easy to set the value for environment.permanentDirectory, thus solving the need for defining system variables, since this is what I thought you were talking about.
Plus, on a web-managed environment, are there ways of defining environment variables without needing restart rights on the servlet container?
You mean in case the servlet container is meant to host several webapps, xwiki being only one of them and it's not possible to stop it?
Yes. I'm talking about a shared hosting environment where the user can only deploy wars, without other access to the container or the server itself.
Thanks -Vincent
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.
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
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Fri, May 25, 2012 at 7:02 PM, Vincent Massol <[email protected]> wrote:
On May 25, 2012, at 3:45 PM, Sergiu Dumitriu wrote:
On 05/25/2012 02:16 AM, Vincent Massol 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 * 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 prefer the current way, defining it in xwiki.properties. Changing the way this configuration works is going to add some more headache for upgrades.
err? That cannot work :)
Maybe I wasn't clear: the goal is to move XWiki configuration files in a different directory from xwiki's binaries, that includes xwiki.properties of course :)
Yes you were definitely not clear since you only talked about environment.permanentDirectory.
AFAIR, it is possible in the izpack installer to filter a configuration file with values from the environment, or even asked from the user.
I don't know how many people know how to define system variables, and even with a tutorial in front it is possible to mess it up.
I've mentioned that this proposal has nothing to with installers. They are different and of course users don't need to define any variable when using installers.
Plus, on a web-managed environment, are there ways of defining environment variables without needing restart rights on the servlet container?
You mean in case the servlet container is meant to host several webapps, xwiki being only one of them and it's not possible to stop it?
Thanks -Vincent
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.
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Well, I really like the idea, and agree with you that it would simplify upgrade process. If I may, I would propose XWIKI_HOME as environment variable name, and use it both to store permanent data and configuration (in specific sub-folders for example). If one day xwiki manages to upgrade its configuration files at startup automatically (as is done for database) or whatever, then it will appear logical that this conf is in the permanent directory. By the way xwiki could safely propose new conf files with a name scheme (reference.xwiki.properties, reference.xwiki.cfg ...) and rename them only if they do not already exist, that would simplify users life. This really is close to what does Jenkins, and the data directory is JENKINS_HOME. I think this is because the most important and valuable information about your app in this case, is not what's inside the webapp, but what is inside this data directory. So the concept of HOME is appropriate. I apologize as some things here are a bit off-topic, my main point being that XWIKI_HOME would seem more logical to me, as far as I understood the need (and much nicer than XWIKI_PERMANENT_DATA_DIRECTORY or such :) ) Jeremie. 2012/5/27 Thomas Mortagne <[email protected]>:
On Fri, May 25, 2012 at 7:02 PM, Vincent Massol <[email protected]> wrote:
On May 25, 2012, at 3:45 PM, Sergiu Dumitriu wrote:
On 05/25/2012 02:16 AM, Vincent Massol 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 * 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 prefer the current way, defining it in xwiki.properties. Changing the way this configuration works is going to add some more headache for upgrades.
err? That cannot work :)
Maybe I wasn't clear: the goal is to move XWiki configuration files in a different directory from xwiki's binaries, that includes xwiki.properties of course :)
Yes you were definitely not clear since you only talked about environment.permanentDirectory.
AFAIR, it is possible in the izpack installer to filter a configuration file with values from the environment, or even asked from the user.
I don't know how many people know how to define system variables, and even with a tutorial in front it is possible to mess it up.
I've mentioned that this proposal has nothing to with installers. They are different and of course users don't need to define any variable when using installers.
Plus, on a web-managed environment, are there ways of defining environment variables without needing restart rights on the servlet container?
You mean in case the servlet container is meant to host several webapps, xwiki being only one of them and it's not possible to stop it?
Thanks -Vincent
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.
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Sun, May 27, 2012 at 12:08 PM, Jeremie BOUSQUET <[email protected]> wrote:
Well, I really like the idea, and agree with you that it would simplify upgrade process. If I may, I would propose XWIKI_HOME as environment variable name, and use it both to store permanent data and configuration (in specific sub-folders for example).
Yep, I was going to say the same thing. A little bit like Maven does... .m2/settings.xml for configuration .m2/repository for actual data A complete snapshot/backup of an XWiki instance can be done simply by using tar cvzf backup.tar.gz $XWIKI_HOME (or whatever) Of course the standard layout can be overridden by using xwiki.properties, if the corresponding properties are set. -Fabio
If one day xwiki manages to upgrade its configuration files at startup automatically (as is done for database) or whatever, then it will appear logical that this conf is in the permanent directory. By the way xwiki could safely propose new conf files with a name scheme (reference.xwiki.properties, reference.xwiki.cfg ...) and rename them only if they do not already exist, that would simplify users life. This really is close to what does Jenkins, and the data directory is JENKINS_HOME. I think this is because the most important and valuable information about your app in this case, is not what's inside the webapp, but what is inside this data directory. So the concept of HOME is appropriate. I apologize as some things here are a bit off-topic, my main point being that XWIKI_HOME would seem more logical to me, as far as I understood the need (and much nicer than XWIKI_PERMANENT_DATA_DIRECTORY or such :) )
Jeremie.
2012/5/27 Thomas Mortagne <[email protected]>:
On Fri, May 25, 2012 at 7:02 PM, Vincent Massol <[email protected]> wrote:
On May 25, 2012, at 3:45 PM, Sergiu Dumitriu wrote:
On 05/25/2012 02:16 AM, Vincent Massol 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 * 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 prefer the current way, defining it in xwiki.properties. Changing the way this configuration works is going to add some more headache for upgrades.
err? That cannot work :)
Maybe I wasn't clear: the goal is to move XWiki configuration files in a different directory from xwiki's binaries, that includes xwiki.properties of course :)
Yes you were definitely not clear since you only talked about environment.permanentDirectory.
AFAIR, it is possible in the izpack installer to filter a configuration file with values from the environment, or even asked from the user.
I don't know how many people know how to define system variables, and even with a tutorial in front it is possible to mess it up.
I've mentioned that this proposal has nothing to with installers. They are different and of course users don't need to define any variable when using installers.
Plus, on a web-managed environment, are there ways of defining environment variables without needing restart rights on the servlet container?
You mean in case the servlet container is meant to host several webapps, xwiki being only one of them and it's not possible to stop it?
Thanks -Vincent
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.
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (6)
-
Denis Gervalle -
Fabio Mancinelli -
Jeremie BOUSQUET -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol