duracloud / mill

The Duplication project provides the tools and pieces with which together manage the process of duplicating files between storage providers in DuraCloud.
Apache License 2.0
2 stars 7 forks source link

Add code to use RabbitMQ, Swift, and SMTP email #28

Closed fozboz closed 4 years ago

fozboz commented 4 years ago

What does this Pull Request do?

We have added the ability to:

How should this be tested?

Prerequisites for testing

If you have already gone through the prerequisite steps for testing the associated duradmin/durastore/MC PRs, you already have the necessary infrastructure to test Mill.

Steps

To test SMTP email, add this to the .properties file:

notification.type=spring
notification.user=smtp_username
notification.pass=smtp_password
notification.host=smtp.example.com
notification.port=25

Then perform an operation that sends emails, such as starting a duplication run.

To test RabbitMQ, add this to the .properties file:

queue.type=rabbitmq
rabbitmq.host=rabbitmq.example.com
rabbitmq.port=5672
rabbitmq.vhost=your_vhost
rabbitmq.exchange=your_exchange
rabbitmq.username=username
rabbitmq.password=password

Start Workman. Create some audit log events. You should see Workman process the events in the same way it would for an SQS queue.

To test using a Swift container for audit logs and duplication policies, add this to the .properties file:

swift.accessKey=accessKey
swift.secretKey=secretKey
swift.endpoint=https://swift.example.com
swift.signerType=signerType_if_required

Create a duplication policy in the location specified by duplication-policy.bucket-suffix. Write files and watch the duplications :popcorn: Run auditlog-generator. Audit logs should get written to the configured audit-log-generator.audit-log-space-id.

Interested parties

@bbranan

bbranan commented 4 years ago

I performed a rebase on the develop branch to pick up the change that will let the Travis build run.