Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

centos fixes #3

Merged
merged 5 commits into from
May 23, 2018
Merged

centos fixes #3

merged 5 commits into from
May 23, 2018

Conversation

seth-shaw-unlv
Copy link
Contributor

Fixes for issue #2

  1. install tesseract and imagemagick
  2. Use variables for apache config dirs

install tesseract and imagemagick
Use variables for apache config dirs
The previous source .tgz disappeared when a new version appeared, but the github version sticks around. Replacing the gzipped source sith github clone for stability.
@@ -1,12 +1,12 @@
crayfish_user: www-data
crayfish_user: "{% if ansible_os_family == 'RedHat' %}apache{% else %}www-data{% endif %}"
Copy link
Contributor

Choose a reason for hiding this comment

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

If we can, I'd like to have the variables work like we were talking about in islandora-deprecated/ansible-role-karaf#1

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 can do that once the Karaf PR is put to bed.

Copy link
Contributor

Choose a reason for hiding this comment

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

tesseract_lang_dir: /usr/local/share/tessdata/
tesseract_directory: "/opt/tesseract-{{ tesseract_version }}"

httpd_conf_directory: "{% if ansible_os_family == 'RedHat' %}/etc/httpd{% else %}/etc/apache2{% endif %}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@@ -1,8 +1,18 @@
---

- name: Install requisite package repositories
- include: tesseract-centos.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm kind of worried about adding this here and I'm wondering if we would be better off moving tesseract to its own role. It could install the package for Debian, and do the compile for Cent. I don't think it would be too much work to move the tesseract stuff out of this role, and put it into its own.

Seems like a bit of a mixing of concerns the way it is right now, since the yml for compiling tesseract is ~100 lines, and the yml for installing crayfish is ~70 lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fine by me. I'll need someone to make the repo since I don't have write permissions.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to start it in your own GitHub, we can transfer it over afterwords. @dannylamb should be able to help with the transfer process when the role is ready...

Copy link
Contributor

Choose a reason for hiding this comment

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

@seth-shaw-unlv Let me know when you're ready and I can set up the transfer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dannylamb Just published the new tesseract-ocr repository. Tested with both Debian and CentOS. Once this is moved over to Islandora-DevOps we can make a PR to update claw-playbook's requirements.yml and crayfish.yml.

@seth-shaw-unlv
Copy link
Contributor Author

@jonathangreen @dannylamb are we good with this one now?

@whikloj
Copy link
Contributor

whikloj commented Apr 4, 2018

This worked with Ubuntu but with Centos I fail at

TASK [Islandora-Devops.tomcat8 : install tomcat8] ******************************
Wednesday 04 April 2018  14:51:51 -0500 (0:00:00.901)       0:22:00.899 ******* 
failed: [default] (item=[u'tomcat8']) => {"changed": false, "cmd": "apt-get update", "failed": true, "item": ["tomcat8"], "msg": "[Errno 2] No such file or directory", "rc": 2}

@seth-shaw-unlv
Copy link
Contributor Author

@whikloj That is a problem with the tomcat role. Which tomcat role version do you have?

@seth-shaw-unlv
Copy link
Contributor Author

@whikloj Update your requirements.yml:

- src: https://github.com/Islandora-Devops/ansible-role-tomcat8
  name: Islandora-Devops.tomcat8
  version: 0.0.2

@jonathangreen
Copy link
Contributor

Sorry @seth-shaw-unlv I totally lost track of this one. I can take a look next week if @whikloj doesn’t get to it first.

@whikloj
Copy link
Contributor

whikloj commented Apr 5, 2018

@seth-shaw-unlv ugh you're right so we need Islandora-Devops/islandora-playbook#60 merged and then fcrepo-syn breaks because of https://github.com/Islandora-Devops/ansible-role-fcrepo-syn/issues/4 🤦‍♂️

I'm gonna pull you in there to move this along.

@seth-shaw-unlv
Copy link
Contributor Author

@whikloj I thought Islandora-Devops/islandora-playbook#60 resolves Islandora-Devops/ansible-role-fcrepo-syn#4 by overriding the fcrepo-syn defaults. We shouldn't need another PR to fix it. What happened when you tested Islandora-Devops/islandora-playbook#60?

@whikloj
Copy link
Contributor

whikloj commented Apr 6, 2018

@seth-shaw-unlv ok, so I have got the new claw-playbook master with Islandora-Devops/islandora-playbook#60 merged, then I altered.

> git diff requirements.yml 
diff --git a/requirements.yml b/requirements.yml
index 45922fb..4abc07d 100644
--- a/requirements.yml
+++ b/requirements.yml
@@ -57,9 +57,9 @@
   name: Islandora-Devops.cantaloupe
   version: 0.0.1
 
-- src: https://github.com/Islandora-Devops/ansible-role-crayfish
+- src: https://github.com/seth-shaw-unlv/ansible-role-crayfish
   name: Islandora-Devops.crayfish
-  version: 0.0.1
+  version: centos
 
 - src: https://github.com/Islandora-Devops/ansible-role-drupal-openseadragon
   name: Islandora-Devops.drupal-openseadragon
@@ -83,7 +83,7 @@
 
 - src: https://github.com/Islandora-Devops/ansible-role-grok
   name: Islandora-Devops.grok
-  version: 0.0.1
+  version: 0.0.2
 
 - src: https://github.com/Islandora-Devops/ansible-role-karaf
   name: Islandora-Devops.karaf

Ran

ISLANDORA_DISTRO="centos/7" vagrant up

Now I am getting to crayfish with centos but hitting this.

TASK [Islandora-Devops.crayfish : Install Gemini db schema (mysql)] ************
Friday 06 April 2018  13:57:44 -0500 (0:00:00.791)       0:31:23.974 ********** 
fatal: [default]: FAILED! => {"changed": false, "failed": true, "msg": "ERROR 1709 (HY000) at line 1: Index column size too large. The maximum column size is 767 bytes.\n"}
	to retry, use: --limit @/sw/var/www/DAM2/claw-playbook/playbook.retry

@DigitLib
Copy link
Contributor

DigitLib commented Apr 7, 2018

In /vars/RedHat.yml can be added tesseract after ImageMagick to be installed
Epel repo is already there...
here is a version
[vagrant@claw ~]$ tesseract -v
tesseract 3.04.00
leptonica-1.72
libgif 4.1.6(?) : libjpeg 6b (libjpeg-turbo 1.2.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7 : libwebp 0.3.0

@seth-shaw-unlv
Copy link
Contributor Author

@DigitLib I'm feeling foolish now. When I was looking around for information about tesseract and CentOS I saw mention that tesseract was only in epel-testing. I neglected to check the epel repo myself. Indeed, it has been in the main epel repo since 2016!

@seth-shaw-unlv
Copy link
Contributor Author

So, we've been using remi for PHP 7 in webserver.yml and we haven't been using EPEL (which makes me feel a bit better about not catching it). Do we want to start using EPEL for PHP 7 instead, so we get access to tesseract as well?

@DigitLib
Copy link
Contributor

DigitLib commented Apr 9, 2018

@seth-shaw-unlv I checked a EPEL repo package list and I didn't find a PHP 7 there http://mirror.airenetworks.es/epel/7/x86_64/Packages/p/ and check also with yum install php70 it is only in remi-safe. EPEL is installed during installation process (I don't know exactly when). Let's stay with remi for PHP 7...

@DigitLib
Copy link
Contributor

Can we add new symlink as mentioned in httpd.cnf file:
"Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf"

  • name: Symlink crayfish httpd config file into action (RedHat)
    file:
    src: "{{httpd_conf_directory}}/conf-available/{{item}}.conf"
    dest: "{{httpd_conf_directory}}/conf.d/{{item}}.conf"
    owner: "{{ crayfish_user }}"
    group: "{{ crayfish_user }}"
    state: link
    with_items: "{{ crayfish_services }}"
    notify: restart apache
    when: ansible_os_family == "RedHat"

Aftrer - name: Symlink crayfish httpd config file into action gruop?
In Ubuntu is defined as conf-enabled but in CentOS is conf.d?

Or to find a clenear solution?

@dannylamb
Copy link
Contributor

@DigitLib, @ajs6f has tested this in https://github.com/Islandora-CLAW/CLAW/issues/831and it successfully works. I'm inclined to bring this code in to prevent it from going stale. Would you consider creating an additional issue (and possibly PR by the looks of it) for the symlink?

@DigitLib
Copy link
Contributor

@dannylamb Working on symlink...

@dannylamb dannylamb merged commit a63ea00 into islandora-deprecated:master May 23, 2018
@seth-shaw-unlv seth-shaw-unlv deleted the centos branch May 23, 2018 14:32
@seth-shaw-unlv seth-shaw-unlv restored the centos branch May 24, 2018 17:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants