Snap package of XWiki progress (2022 GSoC)

Last modified by Vedant Pol on 2022/09/05 19:18

Comunity bonding period

Milestone 1 [31 May- 5 June ]

Understanding the debian package of XWiki [27% complete]

Basic skeleton snap of the XWiki[5% complete]

Task completed
Built XWiki from the following sources:

  • Maven
  • Docker
  • Debian package

Created a basic yaml file for the XWiki using the debian package as refrence.

(The following processes were done on a debian based operating system since there is no snapcraft package for windows.)
(building a snap won't also work in a VirtualBox as mulitpass doesnt allow nested Virtualization.)

Milestone 2 [5 June -12 June]

Understanding the debian package of XWiki [50% complete]

Basic skeleton snap of the XWiki[5% complete]

I have understood how the debian package of XWiki was built. But after trying for a while i was unable to convert it
from debian to snap .Thus i would be building the XWiki yaml first then move to other parts of distribution .
the main objective of coding period would be to make a working XWiki .yaml file.

Coding Period

Milestone 1 [13 June-23 June]

Snap package of XWiki [60% complete]

I think I am close to making a working snap package of the XWiki(using the XWiki-tomcat9-mysql package).
It should be complete within a week or two.Sticking to the XWiki-tomcat9-mysql package would be the best idea for now.

Milestone 2 [24 June - 7 July]

Snap package of XWiki (non embedded database) [85% complete]
Snap package of XWiki (embedded database ) [60% complete]

Dropped the idea of building the snap package from the .deb package for the following reasons:

  • No way to bride the service inside the snap container to the host 
  • Unable to access the tomcat-start.sh file in the etc/ directory in the snap container 
  • Found a better alternative

Using the war file of the XWiki was a better approach to building the snap package as it opened the door to various possibilities that I couldn't use earlier in the .deb package and showcased my skills. Using the preexisting tomcat snap also helped make this task a lot easier.

I plan on completely automating the snap build using only the .yaml file before the first evaluation.

Milestone 3 [8 July-17 July]

Snap package of XWiki (non embedded database) [95% complete]

Snap package of XWiki (embedded database ) [90% complete]

The nonembedded database snap is complete but has a few flaws:

  • It does not create the permanent directory on its own (would update the setup script to do so)(var/lib/xwiki)

The embedded database snap is complete but not stable:

  • The MySQL part breaks in a few situations

Both the snaps compile successfully and generate a snap for xwiki .
xwiki-base-snap works perfectly with MySQL database.
Would be creating the MySQL snap from scratch to use it in our snap.

jira project
contrib repo 

Milestone 4 [18 July -9 August]

Snap package of XWiki(non embedded database) [97% complete]

Snap package of XWiki(embedded database) [90% complete]

Snap package of XWiki(jetty) [60% complete]

There are still some issues with the non-embedded database, like the configuration of a permanent directory. While it's mostly complete, along with the capability of being able to edit the config files,

Since the following Snap packages involve maintaining quite a few dependencies(tomcat, MySQL), it would be better to use the XWiki jetty package as suggested by Thomas.
It is fairly easy to make a Snap package of the XWiki-jetty package. There may be some difficulties in making a production-ready snap. Currently, I will be focusing on the demo version.

Milestone 5 [10 August - 5 September]

Snap package of XWiki(non embedded database) Abandoned

Snap package of XWiki(embedded database) Abandoned

Snap package of XWiki(jetty) First version 100% completed

The XWiki jetty snap was much easier to build and maintain ,thus the other two snaps have been discontinued.
Fixed the xwiki snap update problem . Now the xwiki updates like normal snap with command sudo snap refresh xwiki.

few drawbacks of the XWiki-jetty snap :

  • xwiki-jetty has many argument options that could be given to start xwiki with. But this functionality is lost in xwiki snap as the argument is already set to change the directory of xwiki lock file to the permanent data directory .link
  • Ideally you should not copy over the configuration files exactly since the new version could have added new configuration options and thus ideally you should do a merge instead of a pure copy.The xwiki-snap purely replaces the new configuration files thus not being the most optimal solution.
  • I would like the xwiki to start as soon as the system boots like a service in the background. But with the xwiki-jetty that is not a vaiable option .We would need to use tomcat server for the following procress or some form of service .Thus I consider a drawback that you have to start xwiki everytime you restart or start your system.

This might be the final progress report before GSoC ends .I'd like to take this opportunity to thank Thomas, my mentor, and all of the people who contributed to making this project a success and a good GSoC experience for me emoticon_smile

Tags:
   

Get Connected