fcrepo-exts / fcrepo-camel-toolbox

A collection of ready-to-use messaging applications with fcrepo-camel
Apache License 2.0
13 stars 26 forks source link

Upgrade and Reorganize the Camel Toolbox #160

Closed dbernstein closed 2 years ago

dbernstein commented 2 years ago

Upgrade and Reorganize the Camel Toolbox


JIRA Ticket: https://fedora-repository.atlassian.net/browse/FCREPO-3755

What's new?

It's an all new spring app that runs the old services without karaf.

How should this be tested?

Fire up Fedora 6

docker run -p8080:8080 -p61616:61616  -p8181:8181 --name=my_fcrepo6  fcrepo/fcrepo:6.0.0

Fire up SOLR (you can use docker)

docker run  -p 8983:8983 --name my_solr solr:8

Create collection1

docker exec -it my_solr solr create_core -c collection1

Fire up fuseki

docker run --rm -p 3030:3030 --name my_fuseki atomgraph/fuseki --mem /test

Build camel toolbox

mvn clean install

Create property file using properties specified in root README of this PR. fcepo-camel-toolbox.properties

solr.indexer.enabled=true
triplestore.indexer.enabled=true
triplestore.baseUrl=http://localhost:3030/test

Run the camel toolbox

java -jar fcrepo-camel-toolbox-app/target/ fcrepo-camel-toolbox-app-6.0.0-SNAPSHOT-driver.jar -c fcrepo-camel-toolbox.properties

Add a resource to fedora. Verify that you can see updates to solr and fuseki

  1. open "http://localhost:8983/solr/#/collection1/query?q=*:*&q.op=OR" in a browser
  2. open "http://localhost:3030/test/query?query=SELECT%20%2A%20WHERE%20%7B%20%3Fs%20%3Fo%20%3Fp%20.%20%7D" - the query param SELECT * WHERE { ?s ?o ?p . } urlencoded.
  3. Delete all the fedora resources and verify that all the solr and fuseki entries are gone.
  4. Stop camel toolbox and then create a bunch of resources.
  5. Turn camel toolbox back on
  6. Run the reindexer and verify that fuseki and solr entries have been repopulated
    curl -v -XPOST localhost:9080/reindexing -H"Content-Type: application/json" -d '["broker:queue:solr.reindex", "broker:queue:triplestore.reindex"]'

Additional Notes

Example:

Interested parties

Tag (@ mention) interested parties or, if unsure, @fcrepo/committers