Configuration and upgrade simplification suggestion

Hi,

I had to upgrade from 12.10.1 to 12.10.2 and again had problems with it. (other than your server down today).

At tomcat server start, may I suggest that you:

  • Test for the presence of a directory: /etc/xwiki (xwiki being the name of the tomcat xwiki.war)
  • If it does not exists:
    • Create it and copy all the configuration files you need.
    • Create /etc/xwiki/lib (to put the driver libs needed for databases…)
  • Else:
    • Copy (or check) /etc/xwiki/lib/* to $TOMCAT_HOME/webapps/xwiki/WEB-INF/lib
    • Use the files here, and ignore those from the tomcat WEB-INF.
      (This is not my idea, I see other tomcat apps do exactly this), and I think that it’s a few lines of code.

About Upgrade:
It would be good if you could provide an option in xwiki interface to (at least prepare) upgrade, which would allow to download the new war directly on the server (and maybe all dependent files and flavors…). It could install a small shell script to kill tomcat, do the needed cleaning and directory renaming and other needed stuff. And when everything is ready, provide a button to restart tomcat?
This way, you are sure that you have everything needed to upgrade the app onsite (I was blocked today to 30 minutes because the nexus.xwiki.org was offline or I had problems to contact it, and so, the upgrade failed 5 times), and the administrator would not need to connect to the server (say in 95% of the time which would be a huge progress).

This would also make xwiki really more professional app, that big companies will like because simpler and faster upgrade.

I hope that this suggestion will have support from others and that you can do it.

Thank you for your work.
regards,
Christian COMMARMOND

Some considerations:

  • There are several ways to install xwiki: manual with WAR, with Debian/APT, using docker, etc. And on several OSes, with any servlet container, any database, etc.
  • You seem to consider only your case (you refer to Tomcat for ex and you seem to indicate some directories that may or may not be used by others depending on the installation method they’ve chosen).
  • I don’t know what method you’ve used to install XWiki (could you tell us?), but if you’ve used the Debian/APT, the upgrade is automatic (same for docker). See https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Upgrade. If you’ve chosen the manual way then it’s … manual :wink:
  • Automatic upgrade may be doable or not depending on the install method chosen. It’s something I’d love to have to but it’s not obvious to implement.

Thanks, that’s good to suggest ideas.

What would help is to have contributors who can submit pull requests. That’s really what would make things go forward the fastest.

Hi,

“what would help is to have contributors who can submit pull requests. That’s really what would make things go forward the fastest.”

Yes, maybe. But I can’t spend days to just setup a development env (I’m not a Java lover) to do some small improvements or corrections. Maybe if a virtual machine were provided, with the java env and everything needed already done? No need to do a specific one for each system (VMWARE, Proxmox, virtualbox…) an ova export can be imported everywhere with a minimum effort.

As I say, “the lower is the mountain the more people try to climb it”. This would make a lot of people try, just because the first step would be much easier.

This said, I hope that at least, the first part of my suggestion could be done? It does not depend on anything else than the java code. If the point about the lib is too much specific, you could just manage the configuration files and always try to run a user script to help to automate some actions before the java code does anything else (like copy the libs). This is, I think very easy to do. And, even me and my zero knowledge of java, I could do it maybe in one hour. But I can’t spend days to install a development system. Too big first step.

regards,
Christian COMMARMOND

It happens that we have that :slight_smile: See https://dev.xwiki.org/xwiki/bin/view/Community/Building/#HBuildingwithDocker

There’s also a full VM (more heavyweight) at https://dev.xwiki.org/xwiki/bin/view/Onboarding/TrackCore/#HForsporadiccontributions but I don’t know how well it’s maintained. The advantage with https://dev.xwiki.org/xwiki/bin/view/Community/Building/#HBuildingwithDocker is that it’s used every minute by our CI to build XWiki so you get the exact same environment.