Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #23 from cotap/service-init
Browse files Browse the repository at this point in the history
Service init
  • Loading branch information
mheffner committed Jul 29, 2014
2 parents 2fba3ea + 63073cf commit 9f13f48
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 7 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source 'https://rubygems.org'

gem 'berkshelf', '~> 3.0'
gem 'chef'
gem 'chefspec'
77 changes: 77 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
berkshelf (3.1.4)
addressable (~> 2.3.4)
berkshelf-api-client (~> 1.2)
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0.pre)
celluloid-io (~> 0.16.0.pre)
faraday (~> 0.9.0)
minitar (~> 0.5.4)
octokit (~> 3.0)
retryable (~> 1.3.3)
ridley (~> 4.0)
solve (~> 1.1)
thor (~> 0.18)
berkshelf-api-client (1.2.0)
faraday (~> 0.9.0)
buff-config (1.0.1)
buff-extensions (~> 1.0)
varia_model (~> 0.4)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.1.1)
buff-ruby_engine (~> 0.1.0)
celluloid (0.16.0.pre3)
timers (~> 4.0.0)
celluloid-io (0.16.0.pre2)
celluloid (>= 0.16.0.pre)
nio4r (>= 1.0.0)
chef (11.12.8)
chef-zero (>= 2.0.2, < 2.1)
diff-lcs (~> 1.2, >= 1.2.4)
Expand Down Expand Up @@ -29,29 +60,43 @@ GEM
fauxhai (~> 2.0)
rspec (~> 3.0)
coderay (1.1.0)
dep-selector-libgecode (1.0.2)
dep_selector (1.0.3)
dep-selector-libgecode (~> 1.0)
ffi (~> 1.9)
diff-lcs (1.2.5)
erubis (2.7.0)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
fauxhai (2.2.0)
net-ssh
ohai
ffi (1.9.3)
hashie (2.1.2)
highline (1.6.21)
hitimes (1.2.2)
ipaddress (0.8.0)
json (1.8.1)
method_source (0.8.2)
mime-types (1.25.1)
minitar (0.5.4)
mixlib-authentication (1.3.0)
mixlib-log
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.4.0)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-multi (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-gateway (>= 1.2.0)
nio4r (1.0.0)
octokit (3.2.0)
sawyer (~> 0.5.3)
ohai (7.0.4)
ipaddress
mime-types (~> 1.16)
Expand All @@ -71,6 +116,24 @@ GEM
rest-client (1.6.8)
mime-types (~> 1.16)
rdoc (>= 2.4.2)
retryable (1.3.5)
ridley (4.0.0)
addressable
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-ignore (~> 1.1)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0.pre)
celluloid-io (~> 0.16.0.pre)
erubis
faraday (~> 0.9.0)
hashie (>= 2.0.2, < 3.0.0)
json (>= 1.7.7)
mixlib-authentication (>= 1.3.0)
net-http-persistent (>= 2.8)
retryable
semverse (~> 1.1)
varia_model (~> 0.4)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
Expand All @@ -83,13 +146,27 @@ GEM
rspec-mocks (3.0.3)
rspec-support (~> 3.0.0)
rspec-support (3.0.3)
sawyer (0.5.4)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
semverse (1.1.0)
slop (3.6.0)
solve (1.2.1)
dep_selector (~> 1.0)
semverse (~> 1.1)
systemu (2.5.2)
thor (0.19.1)
timers (4.0.0)
hitimes
varia_model (0.4.0)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 3.0.0)
yajl-ruby (1.2.1)

PLATFORMS
ruby

DEPENDENCIES
berkshelf (~> 3.0)
chef
chefspec
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs/Configures statsd'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.3.0'
version '0.3.1'

depends 'build-essential'
depends 'git'
Expand Down
12 changes: 6 additions & 6 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
end
end

template '/etc/init/statsd.conf' do
source 'upstart.conf.erb'
mode 0644
notifies :restart, 'service[statsd]', :delayed
end

service 'statsd' do
provider Chef::Provider::Service::Upstart
restart_command 'stop statsd; start statsd'
Expand Down Expand Up @@ -102,12 +108,6 @@
notifies :restart, 'service[statsd]', :delayed
end

template '/etc/init/statsd.conf' do
source 'upstart.conf.erb'
mode 0644
notifies :restart, 'service[statsd]', :delayed
end

file node['statsd']['log_file'] do
owner node['statsd']['user']
group node['statsd']['group']
Expand Down

0 comments on commit 9f13f48

Please sign in to comment.