-
Notifications
You must be signed in to change notification settings - Fork 8
Adds microservice to connect Islandora to FITS webservice #3
Conversation
Signed-off-by: Alan Stanley <astanley@upei.ca>
@ajstanley Hrm.... I added your fork to the requirements.yml file for fits, but it definitely didn't install crayfits or the islandora_fits module. Let me see what's up and I'll provide some instructions if I can sort out what I need to do to get this code to execute. |
Looks like build-fits-site.yml didn't run. Any chance your build was
running an already downloaded role?
…On Mon, Jul 29, 2019 at 1:52 PM dannylamb ***@***.***> wrote:
@ajstanley <https://github.com/ajstanley> Hrm.... I added your fork to
the requirements.yml file for fits, but it definitely didn't install
crayfits or the islandora_fits module. Let me see what's up and I'll
provide some instructions if I can sort out what I need to do to get this
code to execute.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADY2J34XG6V3IMPXYACCFDQB4N43ANCNFSM4IE3JPUQ>
.
--
Alan Stanley
Developer and Training Specialist
Agile Humanities
|
I had to add the role back into one of the plays linked in by playbook.yml. I'm testing it out now. |
I'm getting this when the role starts doing its thang:
I don't even think it's gotten to your improvements yet. And that fits code is pretty stale. We removed it well over a year ago. Maybe there's a different way to restart tomcat we should be doing? |
Maybe it's a order of operations type thing. I added the fits role to the crayfish play, but maybe it needs to be on the tomcat play? Because this encompasses apache and tomcat, it may be a little tricky to figure out what needs to go where. I think in the long run, we'd need
Let me see if I can get this sorted out. At least it's trying to run the fits role now. |
The restart ought to work fine - just make sure you run FITS after the
tomcat install
…On Mon, Aug 5, 2019 at 5:06 PM dannylamb ***@***.***> wrote:
Maybe it's a order of operations type thing. I added the fits role to the
crayfish play, but maybe it needs to be on the tomcat play? Because this
encompasses apache and tomcat, it may be a little tricky to figure out what
needs to go where. I think in the long run, we'd need
1. the fits role
2. a crayfits role (or just make it part of crayfish)
3. an islandora_fits role to put download/enable the drupal module,
though maybe that could get thrown into config in geerlingguy's role if we
can sort out the timing issues.
Let me see if I can get this sorted out. At least it's trying to run the
fits role now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADY2J26KY2YTQLT33IDUGLQDCB3HANCNFSM4IE3JPUQ>
.
--
Alan Stanley
Developer and Training Specialist
Agile Humanities
|
Ok, I added the fits role back to the tomcat role a la Islandora-Devops/islandora-playbook@cc83a0a. Unfortunately, I forgot to pull in the newest ansible-role-alpaca in the requirements file, so there was no listener with the latest. Once I've got it, I'll issue a PR to claw-playbook with what I've got and we'll go from there. |
@ajstanley I've pushed up what I've got to a fits branch: https://github.com/Islandora-Devops/claw-playbook/compare/fits So now everything is downloading and deploying, but I'm getting 500's from CrayFits. And I can't seem to track down the log make heads or tails of what's happening. |
Have a look in CrayFits/var/log
…On Tue, Aug 6, 2019 at 12:53 PM dannylamb ***@***.***> wrote:
@ajstanley <https://github.com/ajstanley> I've pushed up what I've got to
a fits branch:
https://github.com/Islandora-Devops/claw-playbook/compare/fits
So now everything is downloading and deploying, but I'm getting 500's from
CrayFits. And I can't seem to track down the log make heads or tails of
what's happening.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADY2JZO5KSIT7F2KXJUI43QDGNAPANCNFSM4IE3JPUQ>
.
--
Alan Stanley
Developer and Training Specialist
Agile Humanities
|
Also http://localhost:8000/crayfits/ should show you an error page saying
filename can't be empty.
On Tue, Aug 6, 2019 at 1:28 PM Alan Stanley <alanjarlathstanley@gmail.com>
wrote:
… Have a look in CrayFits/var/log
On Tue, Aug 6, 2019 at 12:53 PM dannylamb ***@***.***>
wrote:
> @ajstanley <https://github.com/ajstanley> I've pushed up what I've got
> to a fits branch:
> https://github.com/Islandora-Devops/claw-playbook/compare/fits
>
> So now everything is downloading and deploying, but I'm getting 500's
> from CrayFits. And I can't seem to track down the log make heads or tails
> of what's happening.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#3>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AADY2JZO5KSIT7F2KXJUI43QDGNAPANCNFSM4IE3JPUQ>
> .
>
--
Alan Stanley
Developer and Training Specialist
Agile Humanities
--
Alan Stanley
Developer and Training Specialist
Agile Humanities
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in reviewing this @ajstanley. I tried to mark all the spots so you didn't have to do too much hunting.
tasks/build-fits-site.yml
Outdated
@@ -0,0 +1,83 @@ | |||
- name: Build site for FITS microservice | |||
blockinfile: | |||
path: "/etc/apache2/conf-available/CrayFits.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use {{ httpd_conf_directory }}
to allow for changing Apache install directory.
tasks/build-fits-site.yml
Outdated
path: "/etc/apache2/conf-available/CrayFits.conf" | ||
create: yes | ||
block: | | ||
Alias "/crayfits" "/var/www/html/CrayFits/public" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should make /var/www/html/
into a configurable variable so it can be overridden like https://github.com/Islandora-Devops/ansible-role-crayfish/blob/master/defaults/main.yml#L11
tasks/build-fits-site.yml
Outdated
create: yes | ||
block: | | ||
Alias "/crayfits" "/var/www/html/CrayFits/public" | ||
<Directory "/var/www/html/CrayFits/public"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to use new (yet to be defined) variable.
tasks/build-fits-site.yml
Outdated
- name: Enable FITS site | ||
file: | ||
src: "/etc/apache2/conf-available/CrayFits.conf" | ||
dest: "/etc/apache2/conf-enabled/CrayFits.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of these lines should use {{ http_conf_directory }}
as well
tasks/build-fits-site.yml
Outdated
|
||
- name: Change owner on html dir | ||
file: | ||
path: /var/www/html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use your new install directory variable
tasks/build-fits-site.yml
Outdated
- name: Install FITS Microservice from Github | ||
git: | ||
repo: https://github.com/roblib/CrayFits.git | ||
dest: /var/www/html/CrayFits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use yet to be created FITS install directory variable.
tasks/build-fits-site.yml
Outdated
|
||
- name: Clean Directory (Failure okay) | ||
file: | ||
path: '/var/www/html/CrayFits/vendor/symfony/monolog-bundle' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use yet to be created FITS install directory variable.
tasks/build-fits-site.yml
Outdated
|
||
- name: Change CrayFits directory ownership, group and permissions | ||
file: | ||
path: /var/www/html/CrayFits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use yet to be created FITS install directory variable.
tasks/build-fits-site.yml
Outdated
|
||
- name: Open file for logging | ||
file: | ||
path: /var/www/html/CrayFits/var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use yet to be created FITS install directory variable.
tasks/build-fits-site.yml
Outdated
- name: Run Composer On Fits Microservice | ||
composer: | ||
command: update | ||
working_dir: /var/www/html/CrayFits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annnnnnd use yet to be created FITS install directory variable. Also as a TODO, we need to commit the lock file and then just do composer install
to ensure everyone installs the same version of the dependencies.
tasks/build-fits-site.yml
Outdated
owner: www-data | ||
group: www-data | ||
|
||
- name: Download islandora FITS module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think this whole section can be removed. If I understand correctly this is installing the drupal-module. @dannylamb has done that here so this is unnecessary.
@whikloj - Whole lotta new variables, all seem to be working well. Let me know if you find anything else that needs some attention. |
@whikloj do these changes meet your requests? |
Sorry about that @ajstanley and @rosiel. I have not tested the build with these changes but this covers my original review. |
defaults/main.yml
Outdated
fits_install_root: /opt | ||
fits_install_symlink: /opt/fits | ||
fits_user: tomcat8 | ||
fits_group: tomcat8 | ||
fits_ws: yes | ||
crayfits_home: /var/www/html | ||
fits_src_url: "https://github.com/harvard-lts/fits/releases/download/1.4.1/fits-{{ fits_version }}.zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/harvard-lts/fits/releases/download/1.4.1/fits-{{ fits_version }}.zip
should be https://github.com/harvard-lts/fits/releases/download/{{ fits_version }}/fits-{{ fits_version }}.zip
. No sense hardcoding one and not the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor hard-coded value to update. Otherwise, 👍.
Done.
…On Thu, Jan 2, 2020 at 4:10 PM Seth Shaw ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Just one minor hard-coded value to update. Otherwise, 👍.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADY2J3UMO2STIYG4TEESU3Q3ZC4DANCNFSM4IE3JPUQ>
.
--
Alan Stanley
Developer and Training Specialist
Agile Humanities
|
👏 |
GitHub Issue: (link)
Release pull requests, etc.)
What does this Pull Request do?
Downloads, configures and installs a microservice to connect to FITs webservice. The connectors have been added already to the Alpaca role.
What's new?
All new code.
It will create a new media type dynamically - each new field type coming back from the fits xml will be added to the media type on ingest.
How should this be tested?
Once this role is run you should be able to add any Original File and a new Fits Metadata media associated with the owning object.
Additional Notes:
Any additional information that you think would be helpful when reviewing this
PR.
Interested parties
@Islandora-Devops/committers