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

Upgrades Fixity Service #164

Closed dbernstein closed 2 years ago

dbernstein commented 2 years ago

Upgrades Fixity service to Camel 3.9.0.


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

What does this Pull Request do?

Brings the fixity service in line with other camel toolbox microservices by 1) removing osgi dependencies 2) upgrade to Camel 3.9 3) fixity service can be enabled using the fixity.enabled=true property.

What's new?

How should this be tested?

in your fcrepo-camel-toolbox.properties file:

fixity.enabled=true
fixity.input.stream=broker:queue:fixity
fixity.success=file:/tmp/?fileName=fixity-success.log&fileExist=Append

Start fedora:

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

Add a binary resource

curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/fcrepo/rest/hello-world  -H "Content-Type: text/plain"  -X PUT --data "hello world"

start camel toolbox:

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

Perform fixity check

 curl -XPOST localhost:9080/reindexing -H"Content-Type: application/json" \
        -d '["broker:queue:fixity"]'

Verify the results are found in the success file

cat /tmp/fixity-success.log

Interested parties

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

dbernstein commented 2 years ago

@bbpennel : this should be good to go.