Skip to content

Commit

Permalink
Merge pull request #26 from dearing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dearing committed Aug 4, 2015
2 parents d88d7dd + ea67b6f commit ff91735
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 23 deletions.
4 changes: 1 addition & 3 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ metadata

group :integration do
cookbook 'ellktest', path: './test/cookbooks/ellktest'
# until https://github.com/hw-cookbooks/runit/issues/142
cookbook 'runit', '= 1.5.18'
# cookbook 'runit', git: "https://github.com/hw-cookbooks/runit.git", ref: "dev"
cookbook 'runit'
end
2 changes: 1 addition & 1 deletion libraries/provider_elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class Elasticsearch < Chef::Provider::LWRPBase
'WORK_DIR' => nil
}

# TODO: signal for changes
runit_service service_name do
default_logger true
owner new_resource.user
Expand All @@ -84,7 +85,6 @@ class Elasticsearch < Chef::Provider::LWRPBase
'group' => new_resource.group
)
action [:create, :enable]
# notifies :restart, "runit_service[#{service_name}]", :delayed
end
end

Expand Down
3 changes: 1 addition & 2 deletions libraries/provider_logstash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class Logstash < Chef::Provider::LWRPBase
'LS_NICE' => '19'
}

# TODO: signal for changes
runit_service service_name do
default_logger true
owner new_resource.user
Expand All @@ -88,9 +89,7 @@ class Logstash < Chef::Provider::LWRPBase
'group' => new_resource.group,
'config_file' => 'config/logstash.conf'
)

action [:create, :enable]
# notifies :restart, "runit_service[#{service_name}]", :delayed
end
end

Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_logstash_forwarder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class LogstashForwarder < Chef::Provider::LWRPBase
variables options: {
'crt_location' => new_resource.crt_location,
'files' => new_resource.files,
# 'key_location' => new_resource.key_location,
'key_location' => new_resource.key_location,
'logstash_servers' => new_resource.logstash_servers,
'timeout' => new_resource.timeout
}.merge(new_resource.conf_options)
Expand Down
3 changes: 1 addition & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.3.2'

# retsricted only to runit and ark really
%w(ubuntu debian centos redhat amazon scientific oracle enterpriseenterprise).each do |os|
supports os
end

depends 'ark'
depends 'runit'
depends 'runit', '= 1.5.18' # until https://github.com/hw-cookbooks/runit/issues/142
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"network": {
"servers": <%= @options['logstash_servers'].to_json %>,
# "ssl key": "<%= @options['key_location'] %>",
<%= '"ssl key": "'+ @options['key_location'] +'",' if @options['key_location'] -%>
"ssl ca": "<%= @options['crt_location'] %>",
"timeout": <%= @options['timeout'] %>
},
Expand Down
12 changes: 6 additions & 6 deletions test/integration/helpers/serverspec/elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
its(:stdout) { should contain 'run: elasticsearch' }
end

describe command('curl http://localhost:9200/') do
its(:stdout) { should contain '"status" : 200,' }
end
describe command('curl -s http://localhost:9200/_cluster/state') do
its(:stdout) { should contain 'elasticsearch' } # node name
end
# describe command('curl http://localhost:9200/') do
# its(:stdout) { should contain '"status" : 200,' }
# end
# describe command('curl -s http://localhost:9200/_cluster/state') do
# its(:stdout) { should contain 'elasticsearch' } # node name
# end

describe file('/etc/service/elasticsearch/env/ES_USER') do
it { should be_file }
Expand Down
6 changes: 3 additions & 3 deletions test/integration/helpers/serverspec/kibana.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
it { should be_file }
its(:content) { should contain '# This file was generated by Chef' }
end
describe command('curl http://localhost:8080') do
its(:stdout) { should contain 'Kibana 4' }
end
# describe command('curl -I http://localhost:8080') do
# its(:stdout) { should contain 'X-App-Name: kibana' }
# end
describe file('/var/log/kibana/current') do
it { should be_file }
its(:content) { should contain 'Listening on 0.0.0.0:8080' }
Expand Down
8 changes: 4 additions & 4 deletions test/integration/helpers/serverspec/logstash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
its(:content) { should contain '# This file was generated by merged hash from a recipe!' }
end

describe file('/var/log/logstash/current') do
it { should be_file }
its(:content) { should contain 'detected_master' }
end
# describe file('/var/log/logstash/current') do
# it { should be_file }
# its(:content) { should contain 'detected_master' }
# end
end

0 comments on commit ff91735

Please sign in to comment.