Skip to content

Commit

Permalink
logstash forwarder working. git install
Browse files Browse the repository at this point in the history
  • Loading branch information
lmunro committed Feb 10, 2015
1 parent 1fe2ff6 commit 4106b75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
File renamed without changes.
23 changes: 9 additions & 14 deletions recipes/forwarder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,20 @@
action :checkout
end

execute "build_logstash_forwarder" do
execute 'build_logstash_forwarder' do
cwd node['logstash_forwarder']['app_dir']
command '/usr/local/go/bin/go build'
action :run
user "root"
group "root"
not_if do ::File.exists?("#{node['logstash_forwarder']['app_dir']}/logstash-forwarder") end
user 'root'
group 'root'
not_if { ::File.exist?("#{node['logstash_forwarder']['app_dir']}/logstash-forwarder") }
end

case node['platform_family']
when 'debian'

when 'rhel'
cookbook_file '/etc/init.d/logstash-forwarder' do
source 'logstash-forwarder-init-rhel'
owner 'root' # init script must be root, not user/group configured
group 'root'
mode 0755
end
cookbook_file '/etc/init.d/logstash-forwarder' do
source 'logstash-forwarder-init'
owner 'root' # init script must be root, not user/group configured
group 'root'
mode 0755
end

require 'json'
Expand Down
2 changes: 1 addition & 1 deletion test/integration/forwarder/serverspec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
describe 'logstash-forwarder service' do
# can't use process() matcher because of two java processes
describe 'should be running Logstash main class' do
describe command('ps aux | grep -v grep | grep -s /opt/logstash-forwarder/bin/logstash-forwarder') do
describe command('ps aux | grep -v grep | grep -s /opt/logstash-forwarder/logstash-forwarder') do
its(:exit_status) { should eq 0 }
end
end
Expand Down

0 comments on commit 4106b75

Please sign in to comment.