10 | | * Clone [https://github.com/clarin-eric/test-oai-harvest] in a location with write access on the server (or locally if you prefer) |
11 | | * Prepare a harvester XML configuration file for the harvesting scenario to test. The repositories contains several configuration files that can be used as an example or template |
12 | | * Optionally: customise configuration (see the `test-oai-harvest` project's README for instructions) |
13 | | * Run the harvest - it's probably a good idea to do this in the background: |
14 | | |
| 10 | 1. Clone [https://github.com/clarin-eric/test-oai-harvest] in a location with write access on the server (or locally if you prefer) |
| 11 | 1. Prepare a harvester XML configuration file for the harvesting scenario to test. The repositories contains several configuration files that can be used as an example or template |
| 12 | 1. Optionally: customise configuration (see the `test-oai-harvest` project's README for instructions) |
| 13 | 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: |
24 | | After the harvest has completed, you can import the results into the VLO |
| 22 | After the harvest has completed, you can import the results into the VLO. |
| 23 | |
| 24 | 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`) |
| 25 | 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`) |
| 26 | 1. Become the deploy user (`sudo su deploy`) |
| 27 | 1. Copy or move the result directory to the 'test data roots parent directory: |
| 28 | {{{sh |
| 29 | cp -r "${HARVEST_OUTPUT_SOURCE}/output/test /home/deploy/vlo-data/test/my-provider |
| 30 | }}} |
| 31 | 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: |
| 32 | {{{#!xml |
| 33 | <dataRoots> |
| 34 | ... |
| 35 | <DataRoot> |
| 36 | <originName>My provider</originName> |
| 37 | <rootFile>/srv/vlo-data/test/my-provider/results/cmdi/</rootFile> |
| 38 | <prefix>http://alpha-vlo.clarin.eu/data/</prefix> |
| 39 | <tostrip>/srv/vlo-data/</tostrip> |
| 40 | <deleteFirst>false</deleteFirst> |
| 41 | </DataRoot> |
| 42 | .. |
| 43 | </dataRoots> |
| 44 | }}} |
| 45 | 1. Restart the VLO compose project: |
| 46 | {{{#!sh |
| 47 | (cd /home/deploy && ./control.sh vlo restart) |
| 48 | }}} |
| 49 | 6. After restart, you can run an import: |
| 50 | {{{#!sh |
| 51 | (cd /home/deploy && ./control.sh vlo run-import) |
| 52 | }}} |