diff --git a/cookbooks/embulk/attributes.rb b/cookbooks/embulk/attributes.rb index c6375ed..1545185 100644 --- a/cookbooks/embulk/attributes.rb +++ b/cookbooks/embulk/attributes.rb @@ -6,7 +6,7 @@ ipaddr = run_command(cmd).stdout.chomp node.reverse_merge!({ 'embulk' => { - 'base_binary_url' => 'https://dl.bintray.com/embulk/maven/embulk-', + 'base_binary_url' => 'https://github.com/embulk/embulk/releases/download/v', 'version' => '0.9.23', 'extension' => '.jar', 'install_path' => '/opt/embulk' diff --git a/cookbooks/embulk/install.rb b/cookbooks/embulk/install.rb index fc8c09b..0fb7bcf 100644 --- a/cookbooks/embulk/install.rb +++ b/cookbooks/embulk/install.rb @@ -5,13 +5,11 @@ directory node['embulk']['install_path'] do mode '755' end -URL = "#{node['embulk']['base_binary_url']}#{node['embulk']['version']}#{node['embulk']['extension']}" +URL = "#{node['embulk']['base_binary_url']}#{node['embulk']['version']}/embulk-#{node['embulk']['version']}#{node['embulk']['extension']}" TARGET = "#{node['embulk']['install_path']}/embulk" # Download and install: -execute "wget #{URL} -O #{TARGET}" do - not_if "test -e #{TARGET}" -end +execute "wget #{URL} -O #{TARGET}" file TARGET do owner 'root' @@ -23,6 +21,8 @@ end link '/usr/local/bin/embulk' do user 'root' to TARGET + + force true end package 'default-jre' do diff --git a/cookbooks/embulk/setup.rb b/cookbooks/embulk/setup.rb index 61c3a5d..ad8dd9a 100644 --- a/cookbooks/embulk/setup.rb +++ b/cookbooks/embulk/setup.rb @@ -32,7 +32,7 @@ remote_file '/root/.ssh/config' do end -%w(filter-column output-mysql).each do |p| +%w(filter-column filter-row output-mysql).each do |p| execute "embulk gem install embulk-#{p}" do user 'root'