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 activemq config for fcrepo #12

Merged
merged 2 commits into from
Sep 15, 2017

Conversation

jonathangreen
Copy link
Contributor

Ticket

Islandora/documentation#711

Issue

Fcrepo wasn't coming up because of two activemq, embedded and external. Same fix as for the vagrant box we need to configure fedora to not start activemq broker.

Testcase

Run playbook and make sure fcrepo comes up.

@jonathangreen
Copy link
Contributor Author

@whikloj @dannylamb @ajs6f

ran into this while testing the crayfish pull. if anyone has time to review and merge would be most appreciated.

@@ -3,3 +3,5 @@ fcrepo_user: tomcat8
fcrepo_data_dir: /var/lib/tomcat8/fcrepo4-data
fcrepo_war_path: "{{ tomcat8_home }}/webapps/fcrepo.war"
fcrepo_home_dir: /opt/fcrepo
fcrepo_activemq_template: activemq.xml.j2
fcrepo_tomcat_config_dir: "{{ tomcat8_home }}/webapps/fcrepo/WEB-INF/classes/config/"
Copy link
Contributor

Choose a reason for hiding this comment

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

It's generally not best practice to put config like this inside the filesystem space of the webapp itself... maybe someplace inside /usr/local or /etc or the like?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you 100%. Fedora itself puts a activemq.xml file at this path, that I am trying to override here. Is there some way to pass a path for this config to fedora so it reads the alternative configuration? I'm not sure how I would do that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Jeez, I can't believe Fedora does that. No, I can totally believe that. If that's the way that Fedora does it, I guess we're probably better off leaving it alone.

Copy link
Member

Choose a reason for hiding this comment

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

I think we reverted my work on Fedora to make a single configuration file that you could override with a JAVA_OPT. I'll look back and see.

Copy link
Member

@whikloj whikloj Sep 14, 2017

Choose a reason for hiding this comment

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

Ok, I think we can put the activemq.xml anywhere and use this https://github.com/fcrepo4/fcrepo4/blob/fcrepo-4.7.4/fcrepo-webapp/src/main/resources/spring/jms.xml#L18-L19 to point to it.

Copy link
Member

Choose a reason for hiding this comment

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

So I'm not sure how we do this in Ansible, but we need to add
-Dfcrepo.activemq.configuration=file:/blah/blah/activemq.xml
to
https://github.com/Islandora-Devops/claw-playbook/blob/master/inventory/vagrant/group_vars/tomcat.yml#L9-L22

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool. Thanks @whikloj I'll update the playbook.

-->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost">
<persistenceAdapter>
<kahaDB directory="${fcrepo.activemq.directory:ActiveMQ/kahadb}"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we setting fcrepo.activemq.directory somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume its being set in the fedora configs somewhere. I stole this line directly from the activemq config that ships with fcrepo.

https://github.com/fcrepo4/fcrepo4/blob/master/fcrepo-configs/src/main/resources/config/activemq.xml#L78-L80

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, cool, then it's not CLAW's problem.

@ajs6f
Copy link
Contributor

ajs6f commented Sep 14, 2017

I'll wait a bit through today in case anyone else has comments, then I'll merge this. It's pretty much a no-brainer.

@jonathangreen
Copy link
Contributor Author

@whikloj @ajs6f updated the path for the config file.

@ajs6f
Copy link
Contributor

ajs6f commented Sep 14, 2017

I know @dannylamb is out this week, so can I assume that everyone who wants to has chimed in on this PR?

@ajs6f ajs6f merged commit 79d2160 into Islandora-Devops:master Sep 15, 2017
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.

3 participants