From 9666ebe8251c6a89670089ffd68981ac837a1ccd Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Fri, 2 Nov 2018 14:26:23 -0400 Subject: [PATCH 01/13] Homarus --- templates/Homarus.config.yaml.j2 | 33 ++++++++++++++++++++++++++++++++ templates/httpd/Homarus.conf.j2 | 9 +++++++++ 2 files changed, 42 insertions(+) create mode 100644 templates/Homarus.config.yaml.j2 create mode 100644 templates/httpd/Homarus.conf.j2 diff --git a/templates/Homarus.config.yaml.j2 b/templates/Homarus.config.yaml.j2 new file mode 100644 index 0000000..7c254c7 --- /dev/null +++ b/templates/Homarus.config.yaml.j2 @@ -0,0 +1,33 @@ +# managed by Ansible + +homarus: + # path to the convert executable + executable: ffmpeg + mime_types: + valid: + - video/mp4 + - video/x-msvideo + - video/ogg + default_video: video/mp4 + mime_to_format: + - video/mp4_mp4 + - video/x-msvideo_avi + - video/ogg_ogg + +fedora_resource: + base_url: http://localhost:8080/fcrepo/rest + +log: + # Valid log levels are: + # DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY, NONE + # log level none won't open logfile + level: DEBUG + file: /var/log/islandora/homarus.log + +syn: + # toggles JWT security for service + enable: True + # Path to the syn config file for authentication. + # example can be found here: + # https://github.com/Islandora-CLAW/Syn/blob/master/conf/syn-settings.example.xml + config: ../syn-settings.xml diff --git a/templates/httpd/Homarus.conf.j2 b/templates/httpd/Homarus.conf.j2 new file mode 100644 index 0000000..5f58139 --- /dev/null +++ b/templates/httpd/Homarus.conf.j2 @@ -0,0 +1,9 @@ +# managed by Ansible + +Alias "/homarus" "/var/www/html/Crayfish/Homarus/src" + + FallbackResource /homarus/index.php + Require all granted + DirectoryIndex index.php + SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 + From 01a8e582a746018dfba597bbf1cdb0b5f52d07eb Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Fri, 2 Nov 2018 15:03:55 -0400 Subject: [PATCH 02/13] testing https://github.com/Natkeeran/Crayfish --- tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index 9ac84dc..74d9179 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -13,9 +13,9 @@ - name: Install crayfish code git: - repo: https://github.com/Islandora-CLAW/Crayfish.git + repo: https://github.com/Natkeeran/Crayfish.git dest: "{{ crayfish_install_dir }}" - version: "{{ crayfish_version_tag }}" + version: "homarus" - name: Build crayfish code including dependencies composer: From 620359e09901abdedcaf8ad1617a322bcd51183d Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Fri, 2 Nov 2018 16:17:07 -0400 Subject: [PATCH 03/13] homarus config vars --- defaults/main.yml | 20 ++++++++++++++++++++ templates/Homarus.config.yaml.j2 | 27 ++++++++++++++------------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index ec83e72..ccaeb00 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,6 +5,7 @@ crayfish_services: - Houdini - Milliner - Hypercube + - Homarus crayfish_install_dir: /var/www/html/Crayfish @@ -98,3 +99,22 @@ crayfish_milliner_db_options: php_packages_extra: - php7.0-mysql - php7.0-pgsql + + +# homarus +crayfish_homarus_log_file: /var/log/islandora/homarus.log +crayfish_homarus_log_level: DEBUG + +crayfish_homarus_jwt_enabled: TRUE +crayfish_homarus_jwt_config: ../syn-settings.xml + +crayfish_homarus_fedora_base_url: http://localhost:8080/fcrepo/rest + +crayfish_homarus_executable_config: + executable: convert + mime_types: + valid: + - video/mp4 + - video/x-msvideo + - video/ogg + default: image/jpeg \ No newline at end of file diff --git a/templates/Homarus.config.yaml.j2 b/templates/Homarus.config.yaml.j2 index 7c254c7..bf49431 100644 --- a/templates/Homarus.config.yaml.j2 +++ b/templates/Homarus.config.yaml.j2 @@ -2,32 +2,33 @@ homarus: # path to the convert executable - executable: ffmpeg + executable: {{ crayfish_homarus_executable_config.executable }} mime_types: valid: - - video/mp4 - - video/x-msvideo - - video/ogg - default_video: video/mp4 +{% for type in crayfish_homarus_executable_config.mime_types.valid %} + - {{ type }} +{% endfor %} + default: {{ crayfish_homarus_executable_config.mime_types.default }} mime_to_format: - - video/mp4_mp4 - - video/x-msvideo_avi - - video/ogg_ogg + valid: +{% for type in crayfish_homarus_executable_config.mime_to_format %} + - {{ type_to_format }} +{% endfor %} fedora_resource: - base_url: http://localhost:8080/fcrepo/rest + base_url: {{ crayfish_houdini_fedora_base_url }} log: # Valid log levels are: # DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY, NONE # log level none won't open logfile - level: DEBUG - file: /var/log/islandora/homarus.log + level: {{ crayfish_homarus_log_file }} + file: {{ crayfish_homarus_log_file }} syn: # toggles JWT security for service - enable: True + enable: {{ crayfish_homarus_jwt_enabled }} # Path to the syn config file for authentication. # example can be found here: # https://github.com/Islandora-CLAW/Syn/blob/master/conf/syn-settings.example.xml - config: ../syn-settings.xml + config: {{ crayfish_homarus_jwt_config }} \ No newline at end of file From b6bbe03c82e125c4f3607358ce39adecb57b9d6d Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Fri, 2 Nov 2018 16:35:17 -0400 Subject: [PATCH 04/13] mime_to_format: --- defaults/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index ccaeb00..0b11e3b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -117,4 +117,8 @@ crayfish_homarus_executable_config: - video/mp4 - video/x-msvideo - video/ogg - default: image/jpeg \ No newline at end of file + default: image/jpeg + mime_to_format: + - video/mp4_mp4 + - video/x-msvideo_avi + - video/ogg_ogg From 69df336528af543355d9aec290a36772892c12de Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Fri, 2 Nov 2018 17:39:12 -0400 Subject: [PATCH 05/13] syntax error --- templates/Homarus.config.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Homarus.config.yaml.j2 b/templates/Homarus.config.yaml.j2 index bf49431..faa640d 100644 --- a/templates/Homarus.config.yaml.j2 +++ b/templates/Homarus.config.yaml.j2 @@ -11,7 +11,7 @@ homarus: default: {{ crayfish_homarus_executable_config.mime_types.default }} mime_to_format: valid: -{% for type in crayfish_homarus_executable_config.mime_to_format %} +{% for type_to_format in crayfish_homarus_executable_config.mime_to_format %} - {{ type_to_format }} {% endfor %} From 8cec1f03bad41f09bafb6c33833f7e38085abab4 Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Tue, 6 Nov 2018 13:29:33 -0500 Subject: [PATCH 06/13] ffmpeg path --- defaults/main.yml | 2 +- templates/Homarus.config.yaml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0b11e3b..0219bdd 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -111,7 +111,7 @@ crayfish_homarus_jwt_config: ../syn-settings.xml crayfish_homarus_fedora_base_url: http://localhost:8080/fcrepo/rest crayfish_homarus_executable_config: - executable: convert + executable: ffmpeg mime_types: valid: - video/mp4 diff --git a/templates/Homarus.config.yaml.j2 b/templates/Homarus.config.yaml.j2 index faa640d..4c24ba6 100644 --- a/templates/Homarus.config.yaml.j2 +++ b/templates/Homarus.config.yaml.j2 @@ -1,7 +1,7 @@ # managed by Ansible homarus: - # path to the convert executable + # path to the ffmpeg executable executable: {{ crayfish_homarus_executable_config.executable }} mime_types: valid: From 9476c851a3a10865d770b35929bd576c63518c62 Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Wed, 7 Nov 2018 16:21:08 -0500 Subject: [PATCH 07/13] homarus config update --- .gitignore | 1 + defaults/main.yml | 2 +- templates/Homarus.config.yaml.j2 | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5c08e36..09728d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ tests/test.sh +.idea/ *.retry diff --git a/defaults/main.yml b/defaults/main.yml index 0219bdd..3b118e3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -117,7 +117,7 @@ crayfish_homarus_executable_config: - video/mp4 - video/x-msvideo - video/ogg - default: image/jpeg + default_video: video/mp4 mime_to_format: - video/mp4_mp4 - video/x-msvideo_avi diff --git a/templates/Homarus.config.yaml.j2 b/templates/Homarus.config.yaml.j2 index 4c24ba6..e1887fe 100644 --- a/templates/Homarus.config.yaml.j2 +++ b/templates/Homarus.config.yaml.j2 @@ -8,7 +8,7 @@ homarus: {% for type in crayfish_homarus_executable_config.mime_types.valid %} - {{ type }} {% endfor %} - default: {{ crayfish_homarus_executable_config.mime_types.default }} + default_video: {{ crayfish_homarus_executable_config.mime_types.default_video }} mime_to_format: valid: {% for type_to_format in crayfish_homarus_executable_config.mime_to_format %} @@ -22,7 +22,7 @@ log: # Valid log levels are: # DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY, NONE # log level none won't open logfile - level: {{ crayfish_homarus_log_file }} + level: {{ crayfish_homarus_log_level }} file: {{ crayfish_homarus_log_file }} syn: From 70358673f15cd3fbe6c22c8752a1c082fdb2f82a Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Wed, 7 Nov 2018 17:25:45 -0500 Subject: [PATCH 08/13] config fix --- templates/Homarus.config.yaml.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/Homarus.config.yaml.j2 b/templates/Homarus.config.yaml.j2 index e1887fe..c414247 100644 --- a/templates/Homarus.config.yaml.j2 +++ b/templates/Homarus.config.yaml.j2 @@ -10,9 +10,8 @@ homarus: {% endfor %} default_video: {{ crayfish_homarus_executable_config.mime_types.default_video }} mime_to_format: - valid: {% for type_to_format in crayfish_homarus_executable_config.mime_to_format %} - - {{ type_to_format }} + - {{ type_to_format }} {% endfor %} fedora_resource: From e641e5c39bbd623da1857411f38e695c194c66c8 Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Wed, 14 Nov 2018 14:19:08 -0500 Subject: [PATCH 09/13] add ffmpeg to package list --- vars/Debian.yml | 1 + vars/RedHat.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/vars/Debian.yml b/vars/Debian.yml index 0ceba76..a0cf481 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -12,3 +12,4 @@ __crayfish_packages: - tesseract-ocr-ita - tesseract-ocr-spa - tesseract-ocr-srp + - ffmpeg diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 0812dee..6c54bcc 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -12,4 +12,5 @@ __crayfish_packages: - tesseract-langpack-ita - tesseract-langpack-spa - tesseract-langpack-srp + - ffmpeg From 9d4a64a8e93eb27cbb2fcfc4da6328e2a8db36b7 Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Wed, 14 Nov 2018 15:50:31 -0500 Subject: [PATCH 10/13] add Centos repo for ffmpeg --- tasks/install.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks/install.yml b/tasks/install.yml index 74d9179..70a073b 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -5,6 +5,18 @@ repo: 'ppa:lyrasis/imagemagick-jp2' when: ansible_os_family == "Debian" +- name: Add repository nux for ffmpeg + yum_repository: + name: nux + description: Nux Dextop + baseurl: mirror.li.nux.ro + when: ansible_os_family == "RedHat" + +- name: Add ImageMagick repo (apt) + apt_repository: + repo: 'ppa:lyrasis/imagemagick-jp2' + when: ansible_os_family == "RedHat" + - name: Install requisite packages package: name: "{{ item }}" From a3e83fdd1e1b76e9503f7ddb51dba0aa710c88bf Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Thu, 15 Nov 2018 17:26:59 -0500 Subject: [PATCH 11/13] remove ffmpeg related centos tasks, not working --- tasks/install.yml | 12 ------------ vars/RedHat.yml | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index 70a073b..74d9179 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -5,18 +5,6 @@ repo: 'ppa:lyrasis/imagemagick-jp2' when: ansible_os_family == "Debian" -- name: Add repository nux for ffmpeg - yum_repository: - name: nux - description: Nux Dextop - baseurl: mirror.li.nux.ro - when: ansible_os_family == "RedHat" - -- name: Add ImageMagick repo (apt) - apt_repository: - repo: 'ppa:lyrasis/imagemagick-jp2' - when: ansible_os_family == "RedHat" - - name: Install requisite packages package: name: "{{ item }}" diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 6c54bcc..6955919 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -12,5 +12,4 @@ __crayfish_packages: - tesseract-langpack-ita - tesseract-langpack-spa - tesseract-langpack-srp - - ffmpeg - + From 8fa099e370dc6ea78ab347183d55a6a230c5ea57 Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Tue, 20 Nov 2018 13:54:07 -0500 Subject: [PATCH 12/13] remove pointing to development branch --- tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index 74d9179..9ac84dc 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -13,9 +13,9 @@ - name: Install crayfish code git: - repo: https://github.com/Natkeeran/Crayfish.git + repo: https://github.com/Islandora-CLAW/Crayfish.git dest: "{{ crayfish_install_dir }}" - version: "homarus" + version: "{{ crayfish_version_tag }}" - name: Build crayfish code including dependencies composer: From d694957bcd34669f32567c85ec40409061b0e681 Mon Sep 17 00:00:00 2001 From: Natkeeran Date: Tue, 20 Nov 2018 15:09:04 -0500 Subject: [PATCH 13/13] update version to 0.0.11 --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3b118e3..1d8189b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,4 +1,4 @@ -crayfish_version_tag: 0.0.10 +crayfish_version_tag: 0.0.11 crayfish_services: - Gemini