2019-03-03 08:50:49 +00:00
|
|
|
# Create installation directory:
|
|
|
|
directory node['digdag']['install_path'] do
|
|
|
|
owner 'root'
|
|
|
|
group 'root'
|
|
|
|
mode '755'
|
|
|
|
end
|
|
|
|
|
|
|
|
# Download and install:
|
|
|
|
URL = "#{node['digdag']['binary_url']}"
|
|
|
|
TARGET = "#{node['digdag']['install_path']}/digdag"
|
|
|
|
|
|
|
|
execute "wget #{URL} -O #{TARGET}" do
|
|
|
|
not_if "test -e #{TARGET}"
|
|
|
|
end
|
|
|
|
|
|
|
|
file TARGET do
|
|
|
|
owner 'root'
|
|
|
|
group 'root'
|
|
|
|
mode '755'
|
|
|
|
end
|
|
|
|
|
|
|
|
# Create link:
|
|
|
|
link '/usr/local/bin/digdag' do
|
|
|
|
user 'root'
|
|
|
|
to TARGET
|
|
|
|
end
|
|
|
|
|
|
|
|
# Install the Java Runtime:
|
2019-08-10 10:59:16 +00:00
|
|
|
%w(nkf openjdk-8-jdk).each do |p|
|
2019-03-03 08:50:49 +00:00
|
|
|
package p do
|
|
|
|
action :install
|
|
|
|
end
|
|
|
|
end
|
2019-08-10 10:59:16 +00:00
|
|
|
|
|
|
|
execute 'update-java-alternatives -s java-1.8.0-openjdk-amd64' do
|
|
|
|
user 'root'
|
|
|
|
end
|