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 ec83e72..1d8189b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,10 +1,11 @@ -crayfish_version_tag: 0.0.10 +crayfish_version_tag: 0.0.11 crayfish_services: - Gemini - Houdini - Milliner - Hypercube + - Homarus crayfish_install_dir: /var/www/html/Crayfish @@ -98,3 +99,26 @@ 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: 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 diff --git a/templates/Homarus.config.yaml.j2 b/templates/Homarus.config.yaml.j2 new file mode 100644 index 0000000..c414247 --- /dev/null +++ b/templates/Homarus.config.yaml.j2 @@ -0,0 +1,33 @@ +# managed by Ansible + +homarus: + # path to the ffmpeg executable + executable: {{ crayfish_homarus_executable_config.executable }} + mime_types: + valid: +{% for type in crayfish_homarus_executable_config.mime_types.valid %} + - {{ type }} +{% endfor %} + default_video: {{ crayfish_homarus_executable_config.mime_types.default_video }} + mime_to_format: +{% for type_to_format in crayfish_homarus_executable_config.mime_to_format %} + - {{ type_to_format }} +{% endfor %} + +fedora_resource: + 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: {{ crayfish_homarus_log_level }} + file: {{ crayfish_homarus_log_file }} + +syn: + # toggles JWT security for service + 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: {{ crayfish_homarus_jwt_config }} \ No newline at end of file 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 + 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..6955919 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -12,4 +12,4 @@ __crayfish_packages: - tesseract-langpack-ita - tesseract-langpack-spa - tesseract-langpack-srp - +