Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 24 commits into from Mar 17, 2020

Conversation

fozboz
Copy link
Contributor

@fozboz fozboz commented Feb 26, 2020

What does this Pull Request do?

We have added the ability to:

  • Write audit logs to a Swift container
  • Read duplication policies from a Swift container
  • Process events from RabbitMQ
  • Send emails using an SMTP server

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 🍿
Run auditlog-generator. Audit logs should get written to the configured audit-log-generator.audit-log-space-id.

Interested parties

@bbranan

Shibo Liu and others added 16 commits March 4, 2020 15:55
…uracloud project. Add Swift storage support in relevant mill modules.
Updated to use 6.2.0-SNAPSHOT.
Also updates organization from DuraSpace to LYRASIS and reference urls
to https
There is no need to create an additional parameter that performs the
same function.
…oint and aws.signertype parameters to swift.*
We no longer use a specific variable to determine what kind of S3 we
want to use. Instead, the code will see if we have specified a Swift
Endpoint, in which case, we use Swift.

We now use separate variables for Swift credentials.

Added relevant config to the PropertyDefinitionListBuilder of each
module.
@bbranan
Copy link
Member

bbranan commented Mar 4, 2020

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

Andy Foster and others added 8 commits March 6, 2020 16:19
This commit prevents any config change being necessary for existing
installations, as we always assume AWS options if not explicitly
specified.

We also rename SwiftNotificationManager to SMTPNotificationManager to
mirror the changes made in MC/Duracloud.
We now pull strings from a Constant whenever we do a string comparison.
This makes the code clearer.
Removed useless Javadocs.
Added missing header.
Corrected erroneous Javadoc.
This is no longer used.
We now use Enums in Duracloud to make it clearer what the valid values
are for a particular "type". This commit makes the necessary changes to
utilise those enums.
Copy link
Member

@dbernstein dbernstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well. Nicely done!

@bbranan bbranan merged commit 5818a7a into duracloud:develop Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants