Commit 7b782acc authored by Markus Guenther's avatar Markus Guenther
Browse files

[FEATURE] Install tika server

parent 2fbf3b45
...@@ -22,4 +22,5 @@ default['tomcat']['work_dir'] = "/var/cache/tomcat#{node['tomcat']['base_version ...@@ -22,4 +22,5 @@ default['tomcat']['work_dir'] = "/var/cache/tomcat#{node['tomcat']['base_version
default['tomcat']['context_dir'] = "#{node['tomcat']['config_dir']}/Catalina/localhost" default['tomcat']['context_dir'] = "#{node['tomcat']['config_dir']}/Catalina/localhost"
default['tomcat']['webapp_dir'] = "/var/lib/tomcat#{node['tomcat']['base_version']}/webapps" default['tomcat']['webapp_dir'] = "/var/lib/tomcat#{node['tomcat']['base_version']}/webapps"
default['typo3_solr']['solr']['solr_home'] = '/srv/solr' default['typo3_solr']['solr']['solr_home'] = '/srv/solr'
\ No newline at end of file default['typo3_solr']['solr']['tika_home'] = '/srv/tika'
\ No newline at end of file
...@@ -18,6 +18,7 @@ action :add do ...@@ -18,6 +18,7 @@ action :add do
ext_solr_uri = "https://raw.githubusercontent.com/TYPO3-Solr/ext-solr/#{remote_branch}/#{resources_path}" ext_solr_uri = "https://raw.githubusercontent.com/TYPO3-Solr/ext-solr/#{remote_branch}/#{resources_path}"
plugin_uri = "https://github.com/TYPO3-Solr/solr-typo3-plugin/releases/download/release-#{new_resource.plugin}" plugin_uri = "https://github.com/TYPO3-Solr/solr-typo3-plugin/releases/download/release-#{new_resource.plugin}"
tika_server_uri = "http://mirror.dkd.de/apache/tika"
service 'tomcat' do service 'tomcat' do
service_name node['tomcat']['base_instance'] service_name node['tomcat']['base_instance']
...@@ -221,6 +222,15 @@ action :add do ...@@ -221,6 +222,15 @@ action :add do
only_if { Gem::Version.new(new_resource.plugin_lang) > Gem::Version.new('0.0.0') } only_if { Gem::Version.new(new_resource.plugin_lang) > Gem::Version.new('0.0.0') }
end end
# tika server
remote_file "#{node['typo3_solr']['solr']['tika_home']}/tika-server-#{new_resource.tika_server}" do
source "#{tika_server_uri}/tika-server-#{new_resource.tika_server}.jar"
mode 0550
notifies :restart, 'service[tomcat]', :immediately
only_if { Gem::Version.new(new_resource.tika_server) > Gem::Version.new('0.0.0') }
end
# reset directory access restrictions # reset directory access restrictions
execute "chown - #{new_resource.name}" do execute "chown - #{new_resource.name}" do
......
...@@ -29,4 +29,11 @@ directory node['typo3_solr']['solr']['solr_home'] do ...@@ -29,4 +29,11 @@ directory node['typo3_solr']['solr']['solr_home'] do
group 'root' group 'root'
mode 0770 mode 0770
action :create action :create
end
directory node['typo3_solr']['solr']['tika_home'] do
owner node['tomcat']['user']
group 'root'
mode 0770
action :create
end end
\ No newline at end of file
...@@ -2,6 +2,7 @@ actions :add, :remove ...@@ -2,6 +2,7 @@ actions :add, :remove
attribute :name, :kind_of => String, :name_attribute => true attribute :name, :kind_of => String, :name_attribute => true
attribute :solr, :kind_of => String, :default => '3.6.2' attribute :solr, :kind_of => String, :default => '3.6.2'
attribute :tika_server, :kind_of => String, :default => '0.0.0'
attribute :extension, :kind_of => String, :default => '2.8' attribute :extension, :kind_of => String, :default => '2.8'
attribute :plugin, :kind_of => String, :default => '0.0.0' attribute :plugin, :kind_of => String, :default => '0.0.0'
attribute :plugin_access, :kind_of => String, :default => '0.0.0' attribute :plugin_access, :kind_of => String, :default => '0.0.0'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment