= Testing harvest + import of individual endpoints = Objective: harvest a specific endpoint and include the harvested result in the [https://alpha-vlo.clarin.eu alpha instance of the VLO] for testing purposes. * Host: [[SystemAdministration/Hosts/rs236235.rs.hosteurope.de|rs236235.rs.hosteurope.de]] * User account: any account that has the right to do `sudo su deploy` on this machine == Running the test harvest == 1. Clone [https://github.com/clarin-eric/test-oai-harvest] in a location with write access on the server (or locally if you prefer) 1. Prepare a harvester XML configuration file for the harvesting scenario to test. The repository contains several configuration files that can be used as an example or template. 1. Optionally: customise configuration (see the `test-oai-harvest` project's README for instructions) 1. Finally, run the harvest.\\ \\This following example that you have made a configuration file `my-provider.xml`.\\Output will in this case (assuming default configuration settings) go to `test-oai-harvest/output/my-provider`.\\ \\It's probably a good idea to run the script in the background: {{{#!sh cd test-oai-harvest nohup ./harvest.sh my-provider & }}} == Importing the result into the alpha VLO == After the harvest has completed, you can import the results into the VLO. 1. Make the harvest output available to a location (e.g.`test-oai-harvest/output/my-config`) that can be read by the `deploy` user on the VLO host.\\We will call this location `$HARVEST_OUTPUT_SOURCE` (e.g. `HARVEST_OUTPUT_SOURCE=/tmp/output/my-provider`) 1. Confirm that there exists a directory `${HARVEST_OUTPUT_SOURCE}/output/test/results`\\(if not, you may be able to find and use `${HARVEST_OUTPUT_SOURCE}/workdir/test-test/results`) 1. Become the deploy user (`sudo su deploy`) 1. Copy or move the result directory to the 'test data roots parent directory: {{{#!sh cp -r "${HARVEST_OUTPUT_SOURCE}/output/test" "/home/deploy/vlo-volumes/vlo-data/test/my-provider" }}} 1. Add the dataroot definition to the `/home/deploy/vlo/dataroots/testing-dataroots.xml`. Only `originName` and `rootFile` have to be customised for the specific case. For example: {{{#!xml ... My provider /srv/vlo-data/test/my-provider/results/cmdi/ http://alpha-vlo.clarin.eu/data/ /srv/vlo-data/ false .. }}} 1. Restart the VLO compose project: {{{#!sh (cd /home/deploy && ./control.sh vlo restart) }}} 6. After restart, you can run an import: {{{#!sh (cd /home/deploy && ./control.sh vlo run-import) }}}