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

fits ansible separation into separate hosts #162

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Natkeeran
Copy link
Contributor

@Natkeeran Natkeeran commented Feb 10, 2020

GitHub Issue: (link)

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

Islandora/documentation#1429

What does this Pull Request do?

Currently, the ansible-role-fits is written assuming a single server deployment. Specifically, it deploys the Islandora Module (Webserver), Microservice (Crayfish?), and the FITS service (Tomcat) into Tomcat server (https://github.com/Islandora-Devops/islandora-playbook/blob/dev/tomcat.yml#L24).

This causes issues for two server/multi server deployments, and will cause an issue for ISLE 8 development.

This PR separates the ansible-role-fits into Webserver, Crayfish and Tomcat host tasks.

What's new?

As noted above, separation of above noted ansible-role-fits role into separate target hosts.

How should this be tested?

This PR is intended for testing. The PRs to roles will need to be merged separately, then this PR updated before it can be merged.

Single Server Testing
vagrant up.

Multi Server Testing
(One option)
server 1: webserver + database + crayfish
server 2: karaf + database + tomcat + solr

Additional Notes:

I am still testing this PR in a multi server setup. Running into some issues :(

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora-Devops/committers

@MarcusBarnes
Copy link

I have tested the single server deployment (Ubuntu) for this PR and it appears to function as expected. I added a JPEG media (as an Original, Preservation Master File) to the repository item I created and a corresponding FITS XML file was created.

@Natkeeran
Copy link
Contributor Author

@ajstanley

When we have the Crayfits on one server and Tomcat/Fedora/Karaf on another server, getting the following error.

It is sending to the right server. The end points seems to be running as expected: "The Fits microservice is up and running.". Thus not sure where it is failing! No error longs for fits.

2020-02-10 15:37:43,090 | DEBUG | -connector-fits] | SendProcessor                    | 57 - org.apache.camel.camel-core - 2.20.4 | >>>> http://webserver.ca:8000/crayfits?connectionClose=true Exchange[ID-dsu-repo-1581358642031-11-1]
2020-02-10 15:37:43,090 | DEBUG | -connector-fits] | HttpProducer                     | 110 - org.apache.camel.camel-http4 - 2.20.4 | Executing http GET method: http://webserver.ca:8000/crayfits
2020-02-10 15:37:43,104 | DEBUG | iplestore-index] | HttpProducer                     | 110 - org.apache.camel.camel-http4 - 2.20.4 | Http responseCode: 404
2020-02-10 15:37:43,105 | DEBUG | iplestore-index] | BlueprintPropertiesParser        | 57 - org.apache.camel.camel-core - 2.20.4 | Blueprint parsed property key: error.maxRedeliveries as value: 10
2020-02-10 15:37:43,105 | DEBUG | iplestore-index] | BlueprintPropertiesParser        | 57 - org.apache.camel.camel-core - 2.20.4 | Delegate property parser parsed the property key: error.maxRedeliveries as value: 10
2020-02-10 15:37:43,105 | DEBUG | iplestore-index] | BlueprintCamelContext            | 57 - org.apache.camel.camel-core - 2.20.4 | Resolved text: {{error.maxRedeliveries}} -> 10
2020-02-10 15:37:43,105 | DEBUG | iplestore-index] | DefaultErrorHandler              | 57 - org.apache.camel.camel-core - 2.20.4 | Failed delivery for (MessageId: ID:dsu-repo-39667-1581358267669-3:12:-1:1:2 on ExchangeId: ID-dsu-repo-1581358642031-6-92). On delivery attempt: 0 caught: org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking http://webserver.ca:8000/media/1?_format=jsonld with statusCode: 404

@ajstanley
Copy link
Contributor

Looks like you have the web service on the Karaf box, so you'll need to change .env on the microservice to point to that instance. Be default the microservice assumes it can find the web service at localhost:8080
See https://github.com/roblib/CrayFits/blob/master/.env#L29

@Natkeeran
Copy link
Contributor Author

Natkeeran commented Feb 11, 2020

@ajstanley that was the issue.

I am going to update the https://github.com/Natkeeran/ansible-role-crayfish PR to make that a variable.

@Natkeeran
Copy link
Contributor Author

@ajstanley

Templated it out the env config file. Seems to work. For review. Thanks.

@bondjimbond
Copy link

What's the status of this PR at the moment? It is of interest to the Multi-Tenancy Interest Group.

@ajstanley
Copy link
Contributor

This all looks good (and it works on aa local build) but it will soon be largely redundant. The plan is to move the generation of the fits xml from a web service to an executable held within the microservice.

I hope to be able to get to that in the next few weeks.

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.

4 participants