server_maint 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitmodules +12 -0
- data/lib/cookbooks/bluepill/.gitignore +4 -0
- data/lib/cookbooks/bluepill/CHANGELOG.md +31 -0
- data/lib/cookbooks/bluepill/CONTRIBUTING +29 -0
- data/lib/cookbooks/bluepill/Gemfile +5 -0
- data/lib/cookbooks/bluepill/Gemfile.lock +115 -0
- data/lib/cookbooks/bluepill/LICENSE +201 -0
- data/lib/cookbooks/bluepill/README.md +80 -0
- data/lib/cookbooks/bluepill/attributes/default.rb +34 -0
- data/lib/cookbooks/bluepill/metadata.rb +7 -0
- data/lib/cookbooks/bluepill/providers/service.rb +155 -0
- data/lib/cookbooks/bluepill/recipes/default.rb +33 -0
- data/lib/cookbooks/bluepill/resources/service.rb +27 -0
- data/lib/cookbooks/bluepill/templates/centos/bluepill_init.erb +32 -0
- data/lib/cookbooks/bluepill/templates/freebsd/bluepill_init.erb +31 -0
- data/lib/cookbooks/bluepill/test/kitchen/Kitchenfile +3 -0
- data/lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/README.md +12 -0
- data/lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/attributes/default.rb +5 -0
- data/lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/files/default/tests/minitest/default_test.rb +38 -0
- data/lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/files/default/tests/minitest/support/helpers.rb +13 -0
- data/lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/metadata.rb +8 -0
- data/lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/recipes/default.rb +20 -0
- data/lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/templates/default/test_app.pill.erb +8 -0
- data/lib/cookbooks/build-essential/CHANGELOG.md +15 -0
- data/lib/cookbooks/build-essential/CONTRIBUTING +29 -0
- data/lib/cookbooks/build-essential/LICENSE +201 -0
- data/lib/cookbooks/build-essential/README.md +124 -0
- data/lib/cookbooks/build-essential/attributes/default.rb +33 -0
- data/lib/cookbooks/build-essential/metadata.rb +12 -0
- data/lib/cookbooks/build-essential/recipes/default.rb +81 -0
- data/lib/cookbooks/ohai/CHANGELOG.md +12 -0
- data/lib/cookbooks/ohai/CONTRIBUTING +29 -0
- data/lib/cookbooks/ohai/LICENSE +201 -0
- data/lib/cookbooks/ohai/README.md +49 -0
- data/lib/cookbooks/ohai/attributes/default.rb +24 -0
- data/lib/cookbooks/ohai/files/default/plugins/README +1 -0
- data/lib/cookbooks/ohai/metadata.rb +22 -0
- data/lib/cookbooks/ohai/recipes/default.rb +52 -0
- data/lib/cookbooks/runit/CHANGELOG.md +3 -0
- data/lib/cookbooks/runit/CONTRIBUTING +29 -0
- data/lib/cookbooks/runit/LICENSE +201 -0
- data/lib/cookbooks/runit/README.md +226 -0
- data/lib/cookbooks/runit/attributes/default.rb +31 -0
- data/lib/cookbooks/runit/definitions/runit_service.rb +164 -0
- data/lib/cookbooks/runit/files/default/runit.seed +1 -0
- data/lib/cookbooks/runit/files/default/runsvdir +0 -0
- data/lib/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/lib/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/lib/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/lib/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/lib/cookbooks/runit/metadata.rb +37 -0
- data/lib/cookbooks/runit/recipes/default.rb +72 -0
- data/lib/cookbooks/runit/templates/gentoo/runit-start.sh.erb +32 -0
- data/lib/server_maint/version.rb +1 -1
- metadata +57 -5
@@ -0,0 +1,37 @@
|
|
1
|
+
maintainer "Opscode, Inc."
|
2
|
+
maintainer_email "cookbooks@opscode.com"
|
3
|
+
license "Apache 2.0"
|
4
|
+
description "Installs runit and provides runit_service definition"
|
5
|
+
version "0.15.0"
|
6
|
+
|
7
|
+
recipe "runit", "Installs and configures runit"
|
8
|
+
|
9
|
+
%w{ ubuntu debian gentoo }.each do |os|
|
10
|
+
supports os
|
11
|
+
end
|
12
|
+
|
13
|
+
attribute "runit",
|
14
|
+
:display_name => "Runit",
|
15
|
+
:description => "Hash of runit attributes",
|
16
|
+
:type => "hash"
|
17
|
+
|
18
|
+
attribute "runit/sv_bin",
|
19
|
+
:display_name => "Runit sv bin",
|
20
|
+
:description => "Location of the sv binary",
|
21
|
+
:default => "/usr/bin/sv"
|
22
|
+
|
23
|
+
attribute "runit/chpst_bin",
|
24
|
+
:display_name => "Runit chpst bin",
|
25
|
+
:description => "Location of the chpst binary",
|
26
|
+
:default => "/usr/bin/chpst"
|
27
|
+
|
28
|
+
attribute "runit/service_dir",
|
29
|
+
:display_name => "Runit service directory",
|
30
|
+
:description => "Symlinks to services managed under runit",
|
31
|
+
:default => "/etc/service"
|
32
|
+
|
33
|
+
attribute "runit/sv_dir",
|
34
|
+
:display_name => "Runit sv directory",
|
35
|
+
:description => "Location of services managed by runit",
|
36
|
+
:default => "/etc/sv"
|
37
|
+
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: runit
|
3
|
+
# Recipe:: default
|
4
|
+
#
|
5
|
+
# Copyright 2008-2010, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
case node[:platform]
|
21
|
+
when "debian","ubuntu", "gentoo"
|
22
|
+
execute "start-runsvdir" do
|
23
|
+
command value_for_platform(
|
24
|
+
"debian" => { "default" => "runsvdir-start" },
|
25
|
+
"ubuntu" => { "default" => "start runsvdir" },
|
26
|
+
"gentoo" => { "default" => "/etc/init.d/runit-start start" }
|
27
|
+
)
|
28
|
+
action :nothing
|
29
|
+
end
|
30
|
+
|
31
|
+
execute "runit-hup-init" do
|
32
|
+
command "telinit q"
|
33
|
+
only_if "grep ^SV /etc/inittab"
|
34
|
+
action :nothing
|
35
|
+
end
|
36
|
+
|
37
|
+
if platform? "gentoo"
|
38
|
+
template "/etc/init.d/runit-start" do
|
39
|
+
source "runit-start.sh.erb"
|
40
|
+
mode 0755
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
package "runit" do
|
45
|
+
action :install
|
46
|
+
if platform?("ubuntu", "debian")
|
47
|
+
response_file "runit.seed"
|
48
|
+
end
|
49
|
+
notifies value_for_platform(
|
50
|
+
"debian" => { "4.0" => :run, "default" => :nothing },
|
51
|
+
"ubuntu" => {
|
52
|
+
"default" => :nothing,
|
53
|
+
"9.04" => :run,
|
54
|
+
"8.10" => :run,
|
55
|
+
"8.04" => :run },
|
56
|
+
"gentoo" => { "default" => :run }
|
57
|
+
), resources(:execute => "start-runsvdir"), :immediately
|
58
|
+
notifies value_for_platform(
|
59
|
+
"debian" => { "squeeze/sid" => :run, "default" => :nothing },
|
60
|
+
"default" => :nothing
|
61
|
+
), resources(:execute => "runit-hup-init"), :immediately
|
62
|
+
end
|
63
|
+
|
64
|
+
if node[:platform] =~ /ubuntu/i && node[:platform_version].to_f <= 8.04
|
65
|
+
cookbook_file "/etc/event.d/runsvdir" do
|
66
|
+
source "runsvdir"
|
67
|
+
mode 0644
|
68
|
+
notifies :run, resources(:execute => "start-runsvdir"), :immediately
|
69
|
+
only_if do ::File.directory?("/etc/event.d") end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/sbin/runscript
|
2
|
+
# Copyright 1999-2006 Gentoo Foundation
|
3
|
+
# Distributed under the terms of the GNU General Public License v2
|
4
|
+
# $Header: $
|
5
|
+
|
6
|
+
depend() {
|
7
|
+
after net
|
8
|
+
}
|
9
|
+
|
10
|
+
start() {
|
11
|
+
ebegin "Starting runsvdir"
|
12
|
+
start-stop-daemon --start --exec /usr/bin/runsvdir \
|
13
|
+
--background --make-pidfile \
|
14
|
+
--pidfile /var/run/runsvdir.pid -- <%= node.runit.sv_dir %>
|
15
|
+
eend $?
|
16
|
+
}
|
17
|
+
|
18
|
+
stop() {
|
19
|
+
local ret1 ret2
|
20
|
+
ebegin "Stopping runsvdir"
|
21
|
+
start-stop-daemon --stop --oknodo --pidfile /var/run/runsvdir.pid
|
22
|
+
ret1=$?
|
23
|
+
eend ${ret1}
|
24
|
+
|
25
|
+
ebegin "Stopping services and logging"
|
26
|
+
sv shutdown -w 10 <%= node.runit.sv_dir %>/*
|
27
|
+
ret2=$?
|
28
|
+
eend ${ret2}
|
29
|
+
|
30
|
+
return $((ret1+ret2))
|
31
|
+
}
|
32
|
+
|
data/lib/server_maint/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: server_maint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -59,6 +59,35 @@ files:
|
|
59
59
|
- lib/server_maint.rb
|
60
60
|
- lib/server_maint/version.rb
|
61
61
|
- server_maint.gemspec
|
62
|
+
- lib/cookbooks/bluepill/.gitignore
|
63
|
+
- lib/cookbooks/bluepill/CHANGELOG.md
|
64
|
+
- lib/cookbooks/bluepill/CONTRIBUTING
|
65
|
+
- lib/cookbooks/bluepill/Gemfile
|
66
|
+
- lib/cookbooks/bluepill/Gemfile.lock
|
67
|
+
- lib/cookbooks/bluepill/LICENSE
|
68
|
+
- lib/cookbooks/bluepill/README.md
|
69
|
+
- lib/cookbooks/bluepill/attributes/default.rb
|
70
|
+
- lib/cookbooks/bluepill/metadata.rb
|
71
|
+
- lib/cookbooks/bluepill/providers/service.rb
|
72
|
+
- lib/cookbooks/bluepill/recipes/default.rb
|
73
|
+
- lib/cookbooks/bluepill/resources/service.rb
|
74
|
+
- lib/cookbooks/bluepill/templates/centos/bluepill_init.erb
|
75
|
+
- lib/cookbooks/bluepill/templates/freebsd/bluepill_init.erb
|
76
|
+
- lib/cookbooks/bluepill/test/kitchen/Kitchenfile
|
77
|
+
- lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/README.md
|
78
|
+
- lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/attributes/default.rb
|
79
|
+
- lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/files/default/tests/minitest/default_test.rb
|
80
|
+
- lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/files/default/tests/minitest/support/helpers.rb
|
81
|
+
- lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/metadata.rb
|
82
|
+
- lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/recipes/default.rb
|
83
|
+
- lib/cookbooks/bluepill/test/kitchen/cookbooks/bluepill_test/templates/default/test_app.pill.erb
|
84
|
+
- lib/cookbooks/build-essential/CHANGELOG.md
|
85
|
+
- lib/cookbooks/build-essential/CONTRIBUTING
|
86
|
+
- lib/cookbooks/build-essential/LICENSE
|
87
|
+
- lib/cookbooks/build-essential/README.md
|
88
|
+
- lib/cookbooks/build-essential/attributes/default.rb
|
89
|
+
- lib/cookbooks/build-essential/metadata.rb
|
90
|
+
- lib/cookbooks/build-essential/recipes/default.rb
|
62
91
|
- lib/cookbooks/nginx/.gitignore
|
63
92
|
- lib/cookbooks/nginx/CHANGELOG.md
|
64
93
|
- lib/cookbooks/nginx/CONTRIBUTING
|
@@ -114,6 +143,29 @@ files:
|
|
114
143
|
- lib/cookbooks/nginx/templates/default/sv-nginx-run.erb
|
115
144
|
- lib/cookbooks/nginx/templates/ubuntu/nginx.init.erb
|
116
145
|
- lib/cookbooks/nginx/test/kitchen/Kitchenfile
|
146
|
+
- lib/cookbooks/ohai/CHANGELOG.md
|
147
|
+
- lib/cookbooks/ohai/CONTRIBUTING
|
148
|
+
- lib/cookbooks/ohai/LICENSE
|
149
|
+
- lib/cookbooks/ohai/README.md
|
150
|
+
- lib/cookbooks/ohai/attributes/default.rb
|
151
|
+
- lib/cookbooks/ohai/files/default/plugins/README
|
152
|
+
- lib/cookbooks/ohai/metadata.rb
|
153
|
+
- lib/cookbooks/ohai/recipes/default.rb
|
154
|
+
- lib/cookbooks/runit/CHANGELOG.md
|
155
|
+
- lib/cookbooks/runit/CONTRIBUTING
|
156
|
+
- lib/cookbooks/runit/LICENSE
|
157
|
+
- lib/cookbooks/runit/README.md
|
158
|
+
- lib/cookbooks/runit/attributes/default.rb
|
159
|
+
- lib/cookbooks/runit/definitions/runit_service.rb
|
160
|
+
- lib/cookbooks/runit/files/default/runit.seed
|
161
|
+
- lib/cookbooks/runit/files/default/runsvdir
|
162
|
+
- lib/cookbooks/runit/files/ubuntu-6.10/runsvdir
|
163
|
+
- lib/cookbooks/runit/files/ubuntu-7.04/runsvdir
|
164
|
+
- lib/cookbooks/runit/files/ubuntu-7.10/runsvdir
|
165
|
+
- lib/cookbooks/runit/files/ubuntu-8.04/runsvdir
|
166
|
+
- lib/cookbooks/runit/metadata.rb
|
167
|
+
- lib/cookbooks/runit/recipes/default.rb
|
168
|
+
- lib/cookbooks/runit/templates/gentoo/runit-start.sh.erb
|
117
169
|
- lib/cookbooks/sanitize/.gitignore
|
118
170
|
- lib/cookbooks/sanitize/CHANGELOG.md
|
119
171
|
- lib/cookbooks/sanitize/README.md
|
@@ -136,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
188
|
version: '0'
|
137
189
|
segments:
|
138
190
|
- 0
|
139
|
-
hash:
|
191
|
+
hash: 653286020225476647
|
140
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
193
|
none: false
|
142
194
|
requirements:
|
@@ -145,10 +197,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
197
|
version: '0'
|
146
198
|
segments:
|
147
199
|
- 0
|
148
|
-
hash:
|
200
|
+
hash: 653286020225476647
|
149
201
|
requirements: []
|
150
202
|
rubyforge_project:
|
151
|
-
rubygems_version: 1.8.
|
203
|
+
rubygems_version: 1.8.24
|
152
204
|
signing_key:
|
153
205
|
specification_version: 3
|
154
206
|
summary: Host usefull chef cookbooks for server maintenance
|