Difference between revisions of "ART-DECOR building and testing"

 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Creating a new art-decor.war package=
+
{{underconstruction}}
Steps to create the art-decor.war package:
+
This page will document how to build and test ART-DECOR in a automated process.
* Download the Community version of Orbeon in zip format from: https://www.orbeon.com/download. For development versions we are running on version Orbeon 2018.1
+
 
* unzip, rename orbeon.war to art-decor.war
+
=Building ART-DECOR=
 +
The following steps are taken during an ART-DECOR build:
 +
* install eXist-db
 +
* Create new ART-DECOR packages for installation in eXist-db database
 +
* Create new vue build
 +
* Restoring data
 +
 
 +
=eXist-db=
 +
==Install eXist-db from installer==
 +
The part will install the eXist-db database.
 +
A Unix-like OS is assumed, but the main part of the work is done inside eXist-db.
 +
 
 +
=== Notes on the installation ===
 +
* Make sure JAVA is installed
 +
* Mac and Linux can use the .jar installer: java -jar INSTALLER_FILE.jar
 +
* Please note ART-DECOR uses a specific eXist-db installer which contains configuration for ART-DECOR. Details about the configuration can be found at: https://bitbucket.org/art-decor/art-decor-backend/src/exist-db-5/exist5/
 +
* Start the database: sudo INSTALLATION_FOLDER/bin/startup.sh or use wrapper scripts for linux (see below)
 +
* See also the installation process for Linux for older versions: [[ART-DECOR_installation_on_linux]]
 +
* See also: https://exist-db.org/exist/apps/doc/basic-installation
 +
 
 +
=== Install eXist-db on linux ===
 +
Installation procedure for Linux, tested on CentOS.
 +
 
 +
* Make sure JAVA is installed
 +
* Setup the directory structure
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
unzip orbeon-*.zip
+
sudo mkdir /opt/art-decor-linux;
mkdir build
+
cd /opt/art-decor-linux
mv ./orbeon*/orbeon.war ./build/art-decor.war
+
sudo mkdir tooling
cd build
+
sudo mkdir tooling/backups
 +
sudo mkdir tooling/packages
 +
sudo mkdir tooling/packages_archives
 +
sudo mkdir tooling/scripts_archives
 +
sudo chown -R root:wheel /opt/art-decor-linux/
 +
cd /opt/art-decor-linux/tooling/packages
 
</syntaxhighlight>
 
</syntaxhighlight>
* Unzip and move the original art-decor.war
+
 
 +
* Run the eXist-db installer
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
jar xvf art-decor.war
+
sudo su -l root
mkdir ../archive
+
# stop previous version of eXist on your system
mv art-decor.war ../archive
+
systemctl stop exist-db.service
 +
cd /opt/art-decor-linux/tooling/packages
 +
# Set the version:
 +
VERSION=5.3.0
 +
VERSIONSHORT=530
 +
# download the ART-DECOR eXist-db installer
 +
wget https://decor.test-nictiz.nl/pub/exist_art_decor_${VERSION}/exist-installer-${VERSION}_artdecor.jar --no-check-certificate
 +
# or curl https://decor.test-nictiz.nl/pub/exist_art_decor_${VERSION}/exist-installer-${VERSION}_artdecor.jar -o exist-installer-${VERSION}_artdecor.jar
 +
 
 +
# start the eXist-db installer:
 +
java -jar exist-installer-${VERSION}_artdecor.jar -console
 +
# output/input during the installer:
 +
# installation path contains VERSIONSHORT_CURRENTDATE
 +
Select the installation path:  [/usr/local/exist_atp_520_20200130]
 +
 
 +
# Use default choice for installation packages (these are eXist-db packages, not ART-DECOR)
 +
Select Installation Packages -> 0
 +
 
 +
# Usually not sensible to create shortcuts on a headless system:
 +
    ----------------------------------
 +
    Create shortcuts in the Start Menu
 +
    ----------------------------------
 +
    Enter Y for Yes, N for No:
 +
    N
 +
    ------------------------------------------
 +
    Create additional shortcuts on the desktop
 +
    ------------------------------------------
 +
    Enter Y for Yes, N for No:
 +
    N
 
</syntaxhighlight>
 
</syntaxhighlight>
* Copy the configuration files from ART-DECOR repository into the folder. For version 4 Orbeon see:
+
 
 +
* create backup of empty eXist-db
 +
This is handy for when you need to re-deploy the database. Another option for re-deploy is just running the installer again (then this step can be skipped)
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
svn export https://sourceforge.net/p/artdecor/code-0/HEAD/tree/branches/stable/orbeon4/
+
mkdir -p /opt/art-decor-linux/tooling/backups
 +
cd /opt/art-decor-linux/tooling/backups
 +
tar zcvf exist_without_artdecor_${VERSIONSHORT}_$(date '+%Y%m%d%H%M').tgz /usr/local/exist_atp_${VERSIONSHORT}_*
 
</syntaxhighlight>
 
</syntaxhighlight>
For development versions with Orbeon 2018:
+
 
 +
* Create symlink
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
svn export svn://svn.code.sf.net/p/artdecor/code-0/trunk/orbeon2018/
+
cd /usr/local
/bin/cp -Rf orbeon2018/WEB-INF/ .
+
ln -s  exist_atp_${VERSIONSHORT}_* exist_atp_${VERSIONSHORT}
rm -Rf ./orbeon2018
 
 
</syntaxhighlight>
 
</syntaxhighlight>
For development versions with Orbeon 2017:
+
 
 +
* adduser existdb
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
svn export svn://svn.code.sf.net/p/artdecor/code-0/trunk/orbeon2017/
+
adduser --system --shell /sbin/nologin --comment "eXist-db Service Account" existdb
/bin/cp -Rf orbeon2017/WEB-INF/ .
+
chown -h existdb:existdb /usr/local/exist_atp_${VERSIONSHORT}
rm -Rf ./orbeon2017
+
chown -R existdb:existdb /usr/local/exist_atp_${VERSIONSHORT}_20*
 
</syntaxhighlight>
 
</syntaxhighlight>
* Create the war file:
+
 
 +
* check that there is no other eXist-db currently running
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
jar -cvf art-decor.war ./*
+
systemctl status exist-db-${VERSIONSHORT}.service
 +
ps aux |grep -i exist
 +
netstat -anp|grep :8080
 +
netstat -anp|grep :8
 
</syntaxhighlight>
 
</syntaxhighlight>
* Store the .war file online and link to it from our installation manuals: [[ART_installation_manual]]
 
* Note when installing newer Orbeon versions: If you are running an Orbeon later than 3.9, also update-xforms by running: art/modules/update-xforms.xquery
 
  
=Creating new .xar packages=
+
* create a wrapper script for systemd
ART-DECOR software is deployed through eXist-db .xar packages with the eXist-db package manager. In order to create these packages, the following files should be present in a subversion software repository:
+
More info: https://exist-db.org/exist/apps/doc/advanced-installation#headless
* build.xml: contains meta information on the package, and the version number (in major.minor.build form). For packages containing software the minor number is:
+
<syntaxhighlight lang="bash">
** even for stable releases
+
location_symlink=/usr/local/exist_atp_${VERSIONSHORT}
** uneven for development (trunk) releases
+
FILE=/etc/systemd/system/exist-db-${VERSIONSHORT}.service
* expath-pkg.xml.tmpl: a generic template that should normally not be edited
+
cat > ${FILE} << _EOF_
* icon.png: the icon to display in the package manager when installing packages
+
[Unit]
* pre-install.xql: pre-installation procedure. This is usually package-specific.
+
Description=eXist-db ${VERSIONSHORT} Server
* post-install.xql: post-installation procedure. This is usually package-specific and can contain permission settings for collections and files.
+
Documentation=
* repo.xml.tmpl: information to display in the package manager for this package. This is a generic template that should normally not be edited.
+
After=syslog.target
These files can be copied from an existing directory and adapted to this package.
 
  
When building .xar packages, a expath-pkg.xml and repo.xml is generated from the .tmpl and build.xml. In subversion there should be a git:ignore so that locally generated expath-pkg.xml and repo.xml are not included in subversion code.
+
[Service]
 +
Type=simple
 +
User=existdb
 +
Group=existdb
 +
ExecStart=${location_symlink}/bin/startup.sh
  
For examples, see: https://sourceforge.net/p/artdecor/code-0/HEAD/tree/branches/stable/art/
+
[Install]
 +
WantedBy=multi-user.target
 +
_EOF_
 +
</syntaxhighlight>
  
For more information on building xars, see: http://exist-db.org/exist/apps/doc/repo.xml
+
* configure systemd and set permissions
 +
<syntaxhighlight lang="bash">
 +
cd /etc/systemd/system
 +
chown existdb exist-db-${VERSIONSHORT}.service
 +
chgrp existdb exist-db-${VERSIONSHORT}.service
 +
echo eXist-db can be started/stopped/status with:
 +
echo sudo systemctl status exist-db-${VERSIONSHORT}.service
 +
echo sudo systemctl start exist-db-${VERSIONSHORT}.service
 +
exit
 +
 
 +
# as normal user, start eXist-db
 +
sudo systemctl status exist-db-${VERSIONSHORT}.service
 +
sudo systemctl start exist-db-${VERSIONSHORT}.service
 +
 
 +
# If you have replaced the version of exist-db on this server:
 +
sudo systemctl daemon-reload
 +
</syntaxhighlight>
  
=Creating a new version of an existing package=
+
* Note that for development environments, the systemd wrapper could be skipped and instead:
* Commit your software code, include an (English) subversion comment that describes your changes.
+
Start eXist by navigating in a command window to the newly installed folder, bin directory and run:
* build.xml: increment the build number:
+
<syntaxhighlight lang="bash">
Example:
+
cd /usr/local/exist_atp_${VERSIONSHORT}/bin; sudo nohup ./startup.sh &
 +
</syntaxhighlight>
 +
(no privileges required, eXist runs on a non-protected port, 8877).
 +
 
 +
* check status and logging files
 +
<syntaxhighlight lang="bash">
 +
sudo ps aux |grep -i exist
 +
sudo netstat -anp |grep :8877
 +
 
 +
sudo updatedb
 +
sudo locate exist.log
 +
sudo tail -f /usr/local/exist_atp_${VERSIONSHORT}/logs/*.log
 +
# or just tail: exist.log
 +
</syntaxhighlight>
 +
 
 +
=== eXist-db ART-DECOR package installation ===
 +
In this step we will install the ART-DECOR packages into eXist-db.
 +
 
 +
Perform the following steps:
 +
* If needed: Create SSH-tunnel to the server. localhost:8877 to server:8877
 +
* Check the eXist-db logs while you are installing packages below
 +
* Navigate in a browser to http://localhost:8877
 +
* Access the package manager:
 +
http://localhost:8877/exist/apps/dashboard/admin#/launcher
 +
http://localhost:8877/exist/apps/dashboard/admin#/packagemanager
 +
* Login as the admin user
 +
* Start the Package Manager and update all packages that are marked as updateable (from the eXist-db repository). Expected are: Dashboard, eXide, shared*
 +
 
 +
* Change the repository configuration to the ART-DECOR repository
 +
Browse to eXide: http://localhost:8877/exist/apps/eXide/index.html
 +
* Open this file: by clicking on '''directory''' and clicking to this location:
 +
/db/apps/packageservice/configuration.xml
 +
The default configuration allows you to install/update eXist-db packages from exist-db.org .xar package repository. Note that eXist-db can only handle one repository.
 +
* Change the repository stanza so that it points to the ART-DECOR .xar package repository (and comment the exist-db.org line out):
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
     <property name="project.version" value="0.989.32"/>
+
<settings>
 +
     <repositories>
 +
      <!--  <repository active="true" default="true">http://exist-db.org/exist/apps/public-repo</repository> -->
 +
        <repository active="true" default="true">http://decor.nictiz.nl/apps/public-repo-dev5</repository>
 
</syntaxhighlight>
 
</syntaxhighlight>
* commit the build.xml to the subversion repository
+
* File, Save
If the project.version is incremented, this can act as a trigger in the package manager to install this new version of the package.
 
  
=ART-DECOR repositories=
+
* Access the package manager:
==Production code repository==
+
http://localhost:8877/exist/apps/dashboard/admin#/packagemanager
For the current production version (ART-DECOR version 2), see: https://bitbucket.org/art-decor/art-decor-backend/src/exist-db-2/
+
* Install ART-DECOR packages from the ART-DECOR repository with the package manager
 +
install, in the given order:
 +
# Advanced Requirements Tooling
 +
# DECOR core files
 +
# DECOR services
 +
# ART-DECOR System Services
 +
# Terminology Applications
 +
# DECOR example files
 +
# ART-DECOR API
 +
# OID Registry tools
  
==Production package repository==
 
All ART-DECOR modules are exposed though an eXist-db repository for easy installation. Check modules [https://art-decor.org/repo/list.php here].
 
  
==ART-DECOR Next generation code repository==
+
* API documentation:
From ART-DECOR version 3 and onwards:
+
See:
'''Currently under development''': a new front-end developed in vue. For more details on vue for developers, see [[ART_developers_vue]]
+
http://localhost:8877/exist/apps/api/api.html
  
* Vue-client front-end: (should be used in combination with Back-end database)
+
* (optional) create users, demo users with which you can test ART-DECOR:
https://bitbucket.org/art-decor/art-decor/
+
Author: decor, editor, issues, terminology
* Back-end database:
+
Project admin: decor, decor-admin, editor, issues, terminology
https://bitbucket.org/art-decor/art-decor-backend/src/exist-db-5/
 
* Dutch terminology demo in vue:
 
https://bitbucket.org/art-decor/vue-client/
 
  
==ART-DECOR Next generation package repository==
+
* create backup of eXist-db which has ART-DECOR installed 
From ART-DECOR version 3 and onwards:
+
<syntaxhighlight lang="bash">
Under construction.
+
VERSIONSHORT=(version you are running)
 +
sudo systemctl stop exist-db-${VERSIONSHORT}.service
 +
sudo systemctl status exist-db-${VERSIONSHORT}.service
 +
mkdir -p /opt/art-decor-linux/tooling/backups
 +
cd /opt/art-decor-linux/tooling/backups
 +
sudo tar zcvf exist_installed_artdecor_${VERSIONSHORT}_$(date '+%Y%m%d%H%M').tgz /usr/local/exist_atp_${VERSIONSHORT}_*
 +
sudo systemctl start exist-db-${VERSIONSHORT}.service
 +
</syntaxhighlight>
  
=ART-DECOR testscenarios=
+
=== eXist-db troubleshooting ===
The following testscenarios can be used to test ART-DECOR software:
+
A couple pointers if issues occur:
* [[testscenario test]]: Test ART-DECOR information standards
+
* For problems with tokens/logging in. Make sure '''eXist-db EXPath Cryptographic library''' and '''JWT''' are installed and updated to the latest version. JWT relies on Crypto, so update Crypto first. Note that you may have to stop/start eXist-db after performing these upgrades.
* [[testscenario test author]]: Test ART-DECOR information standards from an author perspective
 
* [[testscenario xistest]]: Test ART-DECOR xis
 
* [[testscenario terminology]]: Test ART-DECOR terminology
 
* [[testscenario ada]]: Test ART-DECOR ada
 
Specifically for testing the database:
 
* [[testscenario URIs]]: Test ART-DECOR URIs
 
* [[testscenario Terminology URIs]]: Test ART-DECOR Terminology URIs
 
Not yet testable:
 
[[FHIR_URIs]]
 
  
=ART-DECOR building and testing=
+
==eXist-db ART-DECOR code update==
Documentation for automated building and testing against ART-DECOR is located at:
+
===Commit code===
* [[ART-DECOR building and testing version 2]] (up until ART-DECOR version 2)
+
Code is committed in a software repository, see [[ART_developers_manual#ART-DECOR_Next_generation_repository]]
* [[ART-DECOR building and testing]] (from ART-DECOR version 3)
+
===Build .xar packages===
 +
During this step code from the code repository is converted into .xar packages.
 +
 
 +
Documentation on how to run the script for updating the repository can be found here: TODO
 +
 
 +
The result (development) repository is viewable here: http://decor.nictiz.nl/apps/public-repo-dev5/retrieve.html
 +
 
 +
Note: two other routes to get your own sourcecode into a running eXist-db database:
 +
* First locally, create a .xar package by running '''ant xar''' and install that package into the database: at localhost:8877, through the package manager. Or:
 +
* connect to eXist-db and save your code into the database. For instance at localhost:8877, through eXide. Please note that during creation of the .xar package any variables such as @project.title@ in expath-pkg.xml.tmpl, but maybe also in api.json are replaced by the values that are set in build.xml. Therefore the literal code in the git repository is different than the code created in the .xar package (which will be installed into eXist-db).
 +
 
 +
===Installing .xars into a ART-DECOR instance===
 +
Documentation can be found here: [[ART-DECOR_building_and_testing#eXist-db_ART-DECOR_package_installation]]
 +
 
 +
===Restoring data===
 +
Test instances or production instances of ART-DECOR might need data restored into their database.
 +
For example:
 +
* Make sure you have backup from NEW installation (so you can rollback)
 +
* Copy data from old installation. Note that this works for version 5 -> version 5 eXist-db, but might not work between other major eXist-db versions.
 +
<syntaxhighlight lang="bash">
 +
OLD=/usr/local/exist_atp_511
 +
NEW=/usr/local/exist_atp_530
 +
sudo rm -Rf $NEW/data
 +
sudo cp -r --preserve=all $OLD/data $NEW
 +
</syntaxhighlight>
  
=ART-DECOR testbench=
+
{{:ART_developers_vue}}
Documentation for running tests against ART-DECOR is located at:
 
* [[eXist-db testing]]
 
  
=ART-DECOR coding styleguide=
+
==Testing ART-DECOR==
The following styleguides are available:
+
Tests that can be run against a ART-DECOR instance are documented at:
* [[eXist-db coding styleguide]]
+
[[ART_developers_manual#ART-DECOR_testscenarios]]

Latest revision as of 10:17, 28 July 2021

Tools.svg This article or section is in the middle of an expansion or major restructuring and is not yet ready for use. You are welcome to assist in its construction by editing it as well.

This page will document how to build and test ART-DECOR in a automated process.

Building ART-DECOR

The following steps are taken during an ART-DECOR build:

  • install eXist-db
  • Create new ART-DECOR packages for installation in eXist-db database
  • Create new vue build
  • Restoring data

eXist-db

Install eXist-db from installer

The part will install the eXist-db database. A Unix-like OS is assumed, but the main part of the work is done inside eXist-db.

Notes on the installation

Install eXist-db on linux

Installation procedure for Linux, tested on CentOS.

  • Make sure JAVA is installed
  • Setup the directory structure
sudo mkdir /opt/art-decor-linux;
cd /opt/art-decor-linux
sudo mkdir tooling
sudo mkdir tooling/backups
sudo mkdir tooling/packages
sudo mkdir tooling/packages_archives
sudo mkdir tooling/scripts_archives
sudo chown -R root:wheel /opt/art-decor-linux/
cd /opt/art-decor-linux/tooling/packages
  • Run the eXist-db installer
sudo su -l root
# stop previous version of eXist on your system
systemctl stop exist-db.service
cd /opt/art-decor-linux/tooling/packages
# Set the version:
VERSION=5.3.0
VERSIONSHORT=530
# download the ART-DECOR eXist-db installer
wget https://decor.test-nictiz.nl/pub/exist_art_decor_${VERSION}/exist-installer-${VERSION}_artdecor.jar --no-check-certificate
# or curl https://decor.test-nictiz.nl/pub/exist_art_decor_${VERSION}/exist-installer-${VERSION}_artdecor.jar -o exist-installer-${VERSION}_artdecor.jar

# start the eXist-db installer:
java -jar exist-installer-${VERSION}_artdecor.jar -console
# output/input during the installer:
# installation path contains VERSIONSHORT_CURRENTDATE
Select the installation path:  [/usr/local/exist_atp_520_20200130]

# Use default choice for installation packages (these are eXist-db packages, not ART-DECOR)
Select Installation Packages -> 0

# Usually not sensible to create shortcuts on a headless system:
    ----------------------------------
    Create shortcuts in the Start Menu
    ----------------------------------
    Enter Y for Yes, N for No:
    N
    ------------------------------------------
    Create additional shortcuts on the desktop
    ------------------------------------------
    Enter Y for Yes, N for No:
    N
  • create backup of empty eXist-db

This is handy for when you need to re-deploy the database. Another option for re-deploy is just running the installer again (then this step can be skipped)

mkdir -p /opt/art-decor-linux/tooling/backups
cd /opt/art-decor-linux/tooling/backups
tar zcvf exist_without_artdecor_${VERSIONSHORT}_$(date '+%Y%m%d%H%M').tgz /usr/local/exist_atp_${VERSIONSHORT}_*
  • Create symlink
cd /usr/local
ln -s  exist_atp_${VERSIONSHORT}_* exist_atp_${VERSIONSHORT}
  • adduser existdb
adduser --system --shell /sbin/nologin --comment "eXist-db Service Account" existdb
chown -h existdb:existdb /usr/local/exist_atp_${VERSIONSHORT}
chown -R existdb:existdb /usr/local/exist_atp_${VERSIONSHORT}_20*
  • check that there is no other eXist-db currently running
systemctl status exist-db-${VERSIONSHORT}.service
ps aux |grep -i exist
netstat -anp|grep :8080
netstat -anp|grep :8
  • create a wrapper script for systemd

More info: https://exist-db.org/exist/apps/doc/advanced-installation#headless

location_symlink=/usr/local/exist_atp_${VERSIONSHORT}
FILE=/etc/systemd/system/exist-db-${VERSIONSHORT}.service
cat > ${FILE} << _EOF_
[Unit]
Description=eXist-db ${VERSIONSHORT} Server
Documentation=
After=syslog.target

[Service]
Type=simple
User=existdb
Group=existdb
ExecStart=${location_symlink}/bin/startup.sh

[Install]
WantedBy=multi-user.target
_EOF_
  • configure systemd and set permissions
cd /etc/systemd/system
chown existdb exist-db-${VERSIONSHORT}.service
chgrp existdb exist-db-${VERSIONSHORT}.service
echo eXist-db can be started/stopped/status with:
echo sudo systemctl status exist-db-${VERSIONSHORT}.service
echo sudo systemctl start exist-db-${VERSIONSHORT}.service
exit

# as normal user, start eXist-db
sudo systemctl status exist-db-${VERSIONSHORT}.service
sudo systemctl start exist-db-${VERSIONSHORT}.service

# If you have replaced the version of exist-db on this server:
sudo systemctl daemon-reload
  • Note that for development environments, the systemd wrapper could be skipped and instead:

Start eXist by navigating in a command window to the newly installed folder, bin directory and run:

cd /usr/local/exist_atp_${VERSIONSHORT}/bin; sudo nohup ./startup.sh &

(no privileges required, eXist runs on a non-protected port, 8877).

  • check status and logging files
sudo ps aux |grep -i exist
sudo netstat -anp |grep :8877

sudo updatedb
sudo locate exist.log
sudo tail -f /usr/local/exist_atp_${VERSIONSHORT}/logs/*.log
# or just tail: exist.log

eXist-db ART-DECOR package installation

In this step we will install the ART-DECOR packages into eXist-db.

Perform the following steps:

  • If needed: Create SSH-tunnel to the server. localhost:8877 to server:8877
  • Check the eXist-db logs while you are installing packages below
  • Navigate in a browser to http://localhost:8877
  • Access the package manager:

http://localhost:8877/exist/apps/dashboard/admin#/launcher http://localhost:8877/exist/apps/dashboard/admin#/packagemanager

  • Login as the admin user
  • Start the Package Manager and update all packages that are marked as updateable (from the eXist-db repository). Expected are: Dashboard, eXide, shared*
  • Change the repository configuration to the ART-DECOR repository

Browse to eXide: http://localhost:8877/exist/apps/eXide/index.html

  • Open this file: by clicking on directory and clicking to this location:

/db/apps/packageservice/configuration.xml The default configuration allows you to install/update eXist-db packages from exist-db.org .xar package repository. Note that eXist-db can only handle one repository.

  • Change the repository stanza so that it points to the ART-DECOR .xar package repository (and comment the exist-db.org line out):
<settings>
    <repositories>
      <!--  <repository active="true" default="true">http://exist-db.org/exist/apps/public-repo</repository> -->
        <repository active="true" default="true">http://decor.nictiz.nl/apps/public-repo-dev5</repository>
  • File, Save
  • Access the package manager:

http://localhost:8877/exist/apps/dashboard/admin#/packagemanager

  • Install ART-DECOR packages from the ART-DECOR repository with the package manager

install, in the given order:

  1. Advanced Requirements Tooling
  2. DECOR core files
  3. DECOR services
  4. ART-DECOR System Services
  5. Terminology Applications
  6. DECOR example files
  7. ART-DECOR API
  8. OID Registry tools


  • API documentation:

See: http://localhost:8877/exist/apps/api/api.html

  • (optional) create users, demo users with which you can test ART-DECOR:

Author: decor, editor, issues, terminology Project admin: decor, decor-admin, editor, issues, terminology

  • create backup of eXist-db which has ART-DECOR installed
VERSIONSHORT=(version you are running)
sudo systemctl stop exist-db-${VERSIONSHORT}.service
sudo systemctl status exist-db-${VERSIONSHORT}.service
mkdir -p /opt/art-decor-linux/tooling/backups
cd /opt/art-decor-linux/tooling/backups
sudo tar zcvf exist_installed_artdecor_${VERSIONSHORT}_$(date '+%Y%m%d%H%M').tgz /usr/local/exist_atp_${VERSIONSHORT}_*
sudo systemctl start exist-db-${VERSIONSHORT}.service

eXist-db troubleshooting

A couple pointers if issues occur:

  • For problems with tokens/logging in. Make sure eXist-db EXPath Cryptographic library and JWT are installed and updated to the latest version. JWT relies on Crypto, so update Crypto first. Note that you may have to stop/start eXist-db after performing these upgrades.

eXist-db ART-DECOR code update

Commit code

Code is committed in a software repository, see ART_developers_manual#ART-DECOR_Next_generation_repository

Build .xar packages

During this step code from the code repository is converted into .xar packages.

Documentation on how to run the script for updating the repository can be found here: TODO

The result (development) repository is viewable here: http://decor.nictiz.nl/apps/public-repo-dev5/retrieve.html

Note: two other routes to get your own sourcecode into a running eXist-db database:

  • First locally, create a .xar package by running ant xar and install that package into the database: at localhost:8877, through the package manager. Or:
  • connect to eXist-db and save your code into the database. For instance at localhost:8877, through eXide. Please note that during creation of the .xar package any variables such as @project.title@ in expath-pkg.xml.tmpl, but maybe also in api.json are replaced by the values that are set in build.xml. Therefore the literal code in the git repository is different than the code created in the .xar package (which will be installed into eXist-db).

Installing .xars into a ART-DECOR instance

Documentation can be found here: ART-DECOR_building_and_testing#eXist-db_ART-DECOR_package_installation

Restoring data

Test instances or production instances of ART-DECOR might need data restored into their database. For example:

  • Make sure you have backup from NEW installation (so you can rollback)
  • Copy data from old installation. Note that this works for version 5 -> version 5 eXist-db, but might not work between other major eXist-db versions.
OLD=/usr/local/exist_atp_511
NEW=/usr/local/exist_atp_530
sudo rm -Rf $NEW/data
sudo cp -r --preserve=all $OLD/data $NEW

Vue

Vue background information

More info on vue: https://vuetifyjs.com/en/getting-started/quick-start/

Vue installation for user

For users that want to install their own ART-DECOR instance:

Vue installation for developers

Vue debugging

https://vuejs.org/v2/cookbook/debugging-in-vscode.html

Chrome

  • Chrome DevTools: what requests are being sent to the back-end. Shows queries/responses.
  • extension: Vue Devtools and other debugging information.

Testing ART-DECOR

Tests that can be run against a ART-DECOR instance are documented at: ART_developers_manual#ART-DECOR_testscenarios