-
Notifications
You must be signed in to change notification settings - Fork 4
Installation instructions v 3.x
These instructions explain how to install wikidemarches (nosdemarches / monavis), versions 3.x. Dedicated paragraphs specify operations needed for an upgrade from 2.x. Instructions are driven for and tested for an upgrade from 2.4 (not 2.5 or snapshot of 2.5).
This project is built to run on top of XWiki Standard , version 9.11.3 - see http://www.xwiki.org .
Build the code of this repo using maven (set up as explained in http://dev.xwiki.org/xwiki/bin/view/Community/Building/#HInstallingMaven ), with
mvn clean install
then use the built artefacts to install as described under.
XWiki standard war, version 9.11.3, which can be downloaded from here: http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-web/9.11.3/ .
The following additional settings are required by the project:
- Deploy XWiki to the webapps/ROOT instead of webapps/xwiki and copy
xwiki.cfg
,xwiki.properties
andurlrewrite.xml
from the sources from web/src/main/webapp/WEB-INF into the WEB-INF folder of the deployment. Then perform the following configurations:- in
xwiki.cfg
:- set
xwiki.authentication.validationKey
andxwiki.authentication.encryptionKey
to safely generated random keys
- set
- in
xwiki.properties
:- set
environment.permanentDirectory
to the value corresponding to the current instance - set
openoffice.homePath
to the value corresponding to the current instance
- set
- in
- Deploy
xwiki-platform-legacy-oldcore-DINSICDEMA9.11.3-b55fe5c5c2fb453bb4154999f94de7e014b7fa58.jar
as follows:- Checkout
xwiki-platform-legacy-oldcore-DINSICDEMA9.11.3-b55fe5c5c2fb453bb4154999f94de7e014b7fa58.jar
from the bin folder of the wikidemarches git repository - Copy and paste this jar into the WEB-INF/lib folder of the webapp
- Remove
xwiki-platform-legacy-oldcore-9.11.3.jar
from the same folder
- Checkout
- Deploy
xwiki-platform-search-solr-api-DINSICDEMA9.11.3-45ad9b0e084d555ea5dc1361eb7edb41d61e30d0.jar
as follows:- Checkout the jar from the bin folder of the wikidemarches git repository
- Copy and paste this jar into the WEB-INF/lib folder of the webapp
- Remove
xwiki-platorm-search-solr-api-9.11.3.jar
from that folder
- Deploy the tools-api-.jar, built or released from module extensions/tools/tools-api in WEB-INF/lib
- Deploy the excel plugin in WEB-INF/lib as follows:
- download the excel plugin jar from http://maven.xwiki.org/releases/org/xwiki/contrib/xwiki-plugin-excel/1.1/xwiki-plugin-excel-1.1.jar and copy it in WEB-INF/lib
- download jxl plugin from https://repo1.maven.org/maven2/net/sourceforge/jexcelapi/jxl/2.6.12/jxl-2.6.12.jar and copy it in WEB-INF/lib
- add ",com.xpn.xwiki.plugin.excel.ExcelPlugin" at the end of the value of xwiki.plugins in xwiki.cfg
- Restart the server (once the operations below are done as well)
- This project runs on a standard Apache configuration, which needs to serve the file from robots-public.txt as robots.txt .
- The Apache configuration should pass requests to tomcat for / and should include some specific redirections described below
RewriteEngine On
RewriteCond %{HTTP_HOST} !^nosdemarches.gouv.fr
RewriteRule ^/?(.*) https://nosdemarches.gouv.fr/$1 [R,L]
RewriteRule "/robots.txt$" "/robots-public.txt" [L,PT]
RewriteRule "^/$" "/bin/view/Main/" [L,PT]
RewriteRule "^/bin/view/Main/$" "/" [L,R]
RewriteRule "^/bin/Main/$" "/" [L,R]
RewriteRule "^/Main/$" "/" [L,R]
Add the following in the apache configuration:
Just after the ErrorDocument settings:
Alias "/monavis-static" /var/www/monavis-static
At the end of the file, before ProxyPass /:
ProxyPass /monavis-static !
Copy the folder static
from the sources to the location /var/www/monavis-static
on the server. Change owner to folder and subfolders to www-data.
- XWiki Livetable Exporter Macro, version 3.0 (extension id:
org.xwiki.contrib:xwiki-livetable-exporter-macro
) - UIN Script Service (for creating new Avis):
org.xwiki.contrib:api-uin-scriptservice
version 2.0 - Open Sans font as webjar: Using advanced search, install the following extension
org.webjars.bower:open-sans
version 1.1.0 - Query Generator and Query Macro, version 1.4.1 (extension id:
org.xwiki.contrib:application-querygenerator
)- edit rights on page Macros.QueryGenerator and give 'view' right only to Admin group (local admin group)
- AppWithin Minutes Charts and Data, version 1.2.2 (extension id:
org.xwiki.contrib:appwithinminutes-charts
- OpenCSV (for exporting data in CSV):
com.opencsv:opencsv
version 3.10 - Chart.js Integration (
org.xwiki.contrib:application-chartjs-ui
), version 1.1.6 -
org.webjars:datatables
, version 1.10.19 -
org.webjars:requirejs-domready
, version 2.0.1-2 -
org.webjars:require-css
, version 0.1.7
Custom code:
- Delete the french translation of the Main.WebHome page, as follows:
- Go to wiki administration
- Enable multilanguage, setup english and french as available languages
- Save
- Go on the main page, in french language, and manually change the url the delete action URL with parameter ?language=fr (/xwiki/bin/delete/Main/WebHome?language=fr)
- Confirm delete, accept to delete pages from the extension "XWiki Platform - Distribution - Flavor - Common" (click "sélectionner tout", there's a bug in the platform)
- Restore the wiki in French language only
- Uninstall the following extensions: Help Center Application 1.2, Sandbox application 9.11.3, Help Application 9.11.3
- Import xwiki-dinsic-wikidemarches-wikis-main-.xar
- Using Administration->Content->Import, import the artifact xwiki-dinsic-wikidemarches-wikis-main-upgrade-.xar
- Manually remove from the wiki the pages that were deleted from the repo since the last install
- Manually upgrade the non-upgradable pages that were modified since last install
The following migrations are to be executed for the first install of a 3.x version on top of a 2.x version:
- Users migration
- Go to Administration.GroupFiller
- select the group XWiki.AdministrateursMinisteriels
- hit preview and execute
- any change wrt to the script's result can be done manually after (add extra users or remove extra users)
The following operations need to be done upon upgrade to a 3.2+ version from a previous version:
- Remove space page CM.WebHome and its descendants (containing the code and the data for champs ministériels), as agreed on in #558
- Create entry "Ministeres.MTES-MCT" "Écologie / cohésion des territoires" so that demarches previously affiliated to MCT or MTES will be reaffiliated to this new entry.
- Go to page "Demarches.Admin.M9-DataMigrator": hit each button, then confirm, except button titled "Remove deprecated properties"
- Install the following jars, in WEB-INF/lib (or update them to the specified version if already present). Note: if these jars are installed with extension manager, remove them first from extension manager.
- opencsv api version 3.10 (the dependency of xwiki-batchimport-api v2.3)
- xwiki-batchimport-api, version 2.3
- xwiki-batchimport-postprocessors-listidentifier version 2.3
- xwiki-dinsic-wikidemarches-extensions-batch-imports-api version current version
- Using extension manager in the UI, install:
- xwiki-batchimport-application version 2.3
- Using the standard xar import:
- xwiki-dinsic-wikidemarches-extensions-batch-imports-ui current version
- Go to page "Administration.TopDemarchesImport", upload the top démarches file and proceed with its batch import.
- Go to page "Administration.TopDemarchesPingdomScoreImport", upload the file obtained from top démarches file (sheet with pingdom data) and proceed with its batch import.
TODO: fix this process This operation is to be executed whenever the data of the dashboard needs to be refreshed from live platform data, e.g. after an import.
- Go to page "Demarches.Code.Top" and click the button "Generate json data and attach it to this page".