Distribution Wizard

Version 79.1 by Guillaume Delhumeau on 2015/05/27

Starting with XWiki 4.2, the Distribution Wizard (also known as DW) was introduced as an experimental feature which helps users migrate their XWiki instances to newer versions without having to manually import the XAR (wiki pages) corresponding to their new version.

XWiki's Distribution Wizard comes as an aid to ease the migration and installation of the desired user interface (UI, the default set of wiki pages) in your flavour. It works using XWiki's Extension Manager to automatically detect your XWiki version to search, resolve, download and install the UI corresponding to your version. It requires an internet connection in order to work.

Clean Install

After putting your XWiki WAR inside your Servlet Container (Tomcat, Jetty, etc.) you start XWiki. When XWiki is first accessed, it will trigger the Distribution Wizard. If the wizard fails to appear check the troubleshooting section.

Welcome Step

Upon first access, you will be greeted by the Distribution Wizard, offering you the 3 possible options:

  • Continue: when choosing this option, you will move to the next step of the Distribution Wizard
  • Later: DW will prompt you again after XWiki is restarted
  • Never: Discards the DW and you will have to manually import the XAR

dw-welcomeStep.png

User Interface

The first step will check your XWiki version and will propose a version of the UI which is suited for your version.

  • Click on Install to install the proposed UI. This will resolve the extensions that are going to be installed.

    dw-uiStep.png

  • Click on the Continue button. This will start the actual installation of the previously resolved extensions.

    dw-uiStep-installPlan.png

  • You will be prompted to insert credentials for the Administrator, which are Admin/admin.

    dw-uiStep-login.png

  • After the instalation is complete, you can click on the Continue button to proceed to the next step.
  • Since this is a clean install, steps 2 and 3 are skipped.

Report step

Information

Since 5.4

The last step display all changes brought to the wiki.

dw-report.png

Upgrade

Distribution Wizard also allows you to perform an upgrade without having to manually import the XAR file.

User Interface

  • The Distribution Wizard detects that the UI version is not the latest and proposes to upgrade. Click on the Upgrade button. After the required dependencies are resolved, click Continue button to begin the actual installation of the new UI:

    dw-uiStep-upgrade.png

  • During the instalation you might get merge conflicts. Although XWiki does automatically a 3 way merge, sometimes the merge might fail. Solve your conflict and click on Continue:

    DW_Upgrade_4.png

Wikis

Information

Since 5.3

Distribution Wizard list all the existing wikis with the recommended user interface version that needs to be installed in order to update the default set of wiki pages.

dw-wikisStep.png

Extensions

dw-extensionsStep-checkForUpdates.png

In the last step you can upgrade the extensions that you may have installed on your wikis. If you are on a subwiki then you can only check for updates for the extensions installed on that subwiki. On the main wiki global administrators can choose between:

  • computing the upgrade plan only for the main wiki + global namespace
  • computing the upgrade plan for the entire farm (all wikis + global namespace)

The first option is suited when each wiki in the farm is managed by a different entity while the second option is suited when the farm is managed by a single entity. Obviously computing the upgrade plan for the entire farm takes longer (with the number of wikis) than computing the upgrade plan only for the main wiki.

dw-extensionsStep-computingUpgradePlan.png

After the upgrade plan is computed there are two categories of extensions listed, as you can see in the image below:

  • invalid: they don't work with the current XWiki version so they must be upgraded
  • outdated: they should work with the current XWiki version but there is a newer version available that probably has bug fixes, improvements or new features

Under each category, the extensions are sorted by their name, grouped by the namespace (wiki) where they are installed and paginated. In order to complete this step you have to upgrade the invalid extensions. Upgrading the outdated extensions is optional as you can do it later from the Extension Updater section in the administration.

dw-extensionsStep.png

Upgrade with Repair

In order to be able to do 3-way automatic merges, the Extension Manager, used by the Distribution Wizard, needs to know the user interface version (i.e. default set of wiki pages) that was previously installed. When this information is not available the Distribution Wizard asks the user. This can happen for instance when you upgrade from a very old XWiki version where the default set of wiki pages wasn't installed through the Extension Manager. First you need to tell the Distribution Wizard if you are performing an upgrade or not.

dw-uiStep-repair-upgradeQuestion.png

Then you need to select the previous version. You should find your version in the provided list. Otherwise you can click on the pencil icon to enter a different version.

dw-uiStep-repair-selectPreviousVersion.png

Once you select a version the Distribution Wizard shows you the extension id that corresponds to that version. Make sure it is the right id.

dw-uiStep-repair-suggestPreviousId.png

If it's not the right extension id then you should click on the pencil icon to change it.

dw-uiStep-repair-editPreviousId.png

Next you need to repair the previous UI extension. Just click on the Repair button.

dw-uiStep-repair.png

Finally you should be able to upgrade the default set of wiki pages like in a normal upgrade.

If you have multiple wikis, then the Wikis step will allow you to repair the user interface on each of the available wikis. The process is the same as for the main wiki, the one described above.

dw-wikisStep-repairPreviousUI.png

Troubleshooting

The wizard fails to appear at startup

If you're doing a first time install and the Distribution Wizard doesn't appear it's probably because you've copied some directories from an existing install. Namely, the Distribution Wizard looks for status files located in your permanent directory (the environment.permanentDirectory property in xwiki.properties).

Thus you'll need to remove the .../jobs/status/distribution/status.xml file located inside your permanent directory (/var/lib/xwiki/... for APT installation or /var/lib/tomcatX/webapps/... for WAR installation).

Now, if you have done an upgrade of the XWiki WAR, you'll need to be logged with a user having Admin rights to see the Distribution Wizard appear.

Setting up new XWiki instance without reinstalling

To set up empty/new XWiki instance you need to clear its database and local file storage.

  1. Empty the main database.
    For example with MySQL server, you can execute the command:

    mysql -uroot -p -e "drop database xwiki; CREATE DATABASE xwiki CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON xwiki.* TO 'xwiki'@'localhost' IDENTIFIED BY 'password';"

    where 'password' is password for xwiki user in MySQL database.

    You should also delete the subwikis databases if any.

  2. To clear local data in filesystem empty or remove the permanent directory (see environment.permanentDirectory property in xwiki.properties file).

    For example if you have installed XWiki using APT, execute command:

    sudo rm -fr /var/lib/xwiki/data /var/cache/tomcat7/Catalina/localhost/xwiki/
  3. Restart the application server, open e.g. http://localhost:8080/xwiki and rerun distribution wizard again.

Disable the automatic start of Distribution Wizard Information(Since 7.1RC1)

If, for some reason, you need to disable the Distribution Wizard when you start the wiki for the first time, you can change the configuration in xwiki.properties:

#-------------------------------------------------------------------------------------
# Distribution Wizard
#-------------------------------------------------------------------------------------

#-# [Since 7.1RC1] Enable or disable the automatic start of Distribution Wizard on empty/outdated wiki.
#-#
#-# The default is:
# distribution.automaticStartOnMainWiki=true
# distribution.automaticStartOnWiki=true

You just need to uncomment the above two lines and to set the options to false.

Get Connected