deprec 2.1.19 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +11 -1
- data/{README → README.md} +33 -68
- data/bin/hosts.rb +44 -0
- data/docs/nagios.txt +28 -0
- data/lib/deprec/capistrano_extensions.rb +21 -32
- data/lib/deprec/recipes/apache.rb +54 -73
- data/lib/deprec/recipes/deprec.rb +30 -48
- data/lib/deprec/recipes/git.rb +2 -85
- data/lib/deprec/recipes/haproxy.rb +3 -11
- data/lib/deprec/recipes/mri.rb +23 -40
- data/lib/deprec/recipes/mysql.rb +6 -23
- data/lib/deprec/recipes/nagios.rb +2 -17
- data/lib/deprec/recipes/nagios3.rb +180 -0
- data/lib/deprec/recipes/network.rb +60 -28
- data/lib/deprec/recipes/nrpe.rb +82 -0
- data/lib/deprec/recipes/passenger.rb +15 -12
- data/lib/deprec/recipes/postgresql.rb +2 -2
- data/lib/deprec/recipes/rack.rb +44 -0
- data/lib/deprec/recipes/rails.rb +10 -32
- data/lib/deprec/recipes/ree.rb +27 -18
- data/lib/deprec/recipes/rubygems.rb +29 -0
- data/lib/deprec/recipes/sqlite.rb +1 -1
- data/lib/deprec/recipes/ssh.rb +1 -0
- data/lib/deprec/recipes/svn.rb +1 -160
- data/lib/deprec/recipes/users.rb +19 -16
- data/lib/deprec/recipes_minus_rails.rb +39 -36
- data/lib/deprec/templates/apache/CHANGES.txt +11 -0
- data/lib/deprec/templates/mysql/my.cnf.erb +21 -31
- data/lib/deprec/templates/{nagios → nagios.old}/README +0 -0
- data/lib/deprec/templates/nagios.old/apache_vhost.erb +25 -0
- data/lib/deprec/templates/{nagios → nagios.old}/cgi.cfg.erb +0 -0
- data/lib/deprec/templates/nagios.old/check_linux_free_memory.pl +118 -0
- data/lib/deprec/templates/{nagios → nagios.old}/check_mongrel_cluster.rb +0 -0
- data/lib/deprec/templates/nagios.old/htpasswd.users +1 -0
- data/lib/deprec/templates/{nagios → nagios.old}/mrtg.cfg +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/nagios.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/nrpe.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/nrpe.xinetd.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/objects/commands.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/objects/contacts.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/objects/hosts.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/objects/localhost.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/objects/services.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/objects/timeperiods.cfg.erb +0 -0
- data/lib/deprec/templates/{nagios → nagios.old}/resource.cfg.erb +0 -0
- data/lib/deprec/templates/nagios/apache2.conf +55 -0
- data/lib/deprec/templates/nagios/cgi.cfg +25 -0
- data/lib/deprec/templates/nagios/commands.cfg +52 -0
- data/lib/deprec/templates/nagios/conf.d/contacts_nagios2.cfg +23 -0
- data/lib/deprec/templates/nagios/conf.d/extinfo_nagios2.cfg +13 -0
- data/lib/deprec/templates/nagios/conf.d/generic-host_nagios2.cfg +19 -0
- data/lib/deprec/templates/nagios/conf.d/generic-service_nagios2.cfg +26 -0
- data/lib/deprec/templates/nagios/conf.d/hostgroups_nagios2.cfg +48 -0
- data/lib/deprec/templates/nagios/conf.d/hosts/localhost_nagios2.cfg +59 -0
- data/lib/deprec/templates/nagios/conf.d/services_nagios2.cfg +45 -0
- data/lib/deprec/templates/nagios/conf.d/timeperiods_nagios2.cfg +50 -0
- data/lib/deprec/templates/nagios/host_template.erb +6 -0
- data/lib/deprec/templates/nagios/htpasswd.users +1 -1
- data/lib/deprec/templates/nagios/nagios.cfg +1326 -0
- data/lib/deprec/templates/nagios/nrpe.cfg +28 -0
- data/lib/deprec/templates/nagios/resource.cfg +31 -0
- data/lib/deprec/templates/passenger/apache_vhost.erb +2 -2
- data/lib/deprec/templates/passenger/logrotate.conf.erb +1 -1
- data/lib/deprec/templates/passenger/passenger.conf.erb +12 -11
- data/lib/deprec/templates/passenger/passenger.load.erb +1 -1
- metadata +43 -42
- data/lib/deprec/recipes/wordpress.rb +0 -96
@@ -0,0 +1,29 @@
|
|
1
|
+
# Copyright by Mike Bailey. All rights reserved.
|
2
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
3
|
+
|
4
|
+
namespace :deprec do
|
5
|
+
namespace :rubygems do
|
6
|
+
|
7
|
+
SRC_PACKAGES[:rubygems] = {
|
8
|
+
:md5sum => "b5badb7c5adda38d9866fa21ae46bbcc rubygems-1.4.2.tgz",
|
9
|
+
:url => "http://rubyforge.org/frs/download.php/73882/rubygems-1.4.2.tgz",
|
10
|
+
:configure => "",
|
11
|
+
:make => "",
|
12
|
+
:install => 'ruby setup.rb; exit 0;' # rubygems 1.4.2 is a bit broken http://bit.ly/k1IfUa
|
13
|
+
}
|
14
|
+
|
15
|
+
desc "Install Rubygems"
|
16
|
+
task :install do
|
17
|
+
deprec2.download_src(SRC_PACKAGES[:rubygems])
|
18
|
+
deprec2.install_from_src(SRC_PACKAGES[:rubygems])
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "Upgrade to the latest version of Rubygems"
|
22
|
+
task :update_system do
|
23
|
+
gem2.update_system
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -36,7 +36,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
36
36
|
# We need these stubs for deprec:rails:setup_database
|
37
37
|
end
|
38
38
|
|
39
|
-
|
39
|
+
# "Grant user access to Database"
|
40
40
|
task :grant_user_access_to_database do
|
41
41
|
# Not needed for sqlite
|
42
42
|
# We need these stubs for deprec:rails:setup_database
|
data/lib/deprec/recipes/ssh.rb
CHANGED
data/lib/deprec/recipes/svn.rb
CHANGED
@@ -1,171 +1,12 @@
|
|
1
1
|
# Copyright 2006-2008 by Mike Bailey. All rights reserved.
|
2
|
-
require 'fileutils'
|
3
|
-
require 'uri'
|
4
|
-
|
5
|
-
# http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.serverconfig.choosing.apache
|
6
|
-
|
7
2
|
Capistrano::Configuration.instance(:must_exist).load do
|
8
3
|
namespace :deprec do
|
9
4
|
namespace :svn do
|
10
5
|
|
11
|
-
set :scm_group, 'scm'
|
12
|
-
|
13
|
-
# Extract svn attributes from :repository URL
|
14
|
-
#
|
15
|
-
# Two examples of :repository entries are:
|
16
|
-
#
|
17
|
-
# set :repository, 'svn+ssh://scm.deprecated.org/var/svn/deprec/trunk'
|
18
|
-
# set :repository, 'file:///tmp/svn/deprec/trunk'
|
19
|
-
#
|
20
|
-
# This has only been tested with svn+ssh but file: should work.
|
21
|
-
#
|
22
|
-
set (:svn_scheme) { URI.parse(repository).scheme }
|
23
|
-
set (:svn_host) { URI.parse(repository).host }
|
24
|
-
set (:repos_path) { URI.parse(repository).path }
|
25
|
-
set (:repos_root) {
|
26
|
-
URI.parse(repository).path.sub(/\/(trunk|tags|branches)$/, '')
|
27
|
-
}
|
28
|
-
|
29
|
-
# account name to perform actions on (such as granting access to an account)
|
30
|
-
# this is a hack to allow us to optionally pass a variable to tasks
|
31
|
-
set (:svn_account) do
|
32
|
-
Capistrano::CLI.ui.ask 'account name'
|
33
|
-
end
|
34
|
-
|
35
|
-
set(:svn_backup_dir) { File.join(backup_dir, 'svn') }
|
36
|
-
|
37
6
|
desc "Install Subversion"
|
38
7
|
task :install do
|
39
8
|
install_deps
|
40
|
-
# XXX should really check if apache has already been installed
|
41
|
-
# XXX can do that when we move to rake
|
42
|
-
# deprec2.download_src(src_package, src_dir)
|
43
|
-
# deprec2.install_from_src(src_package, src_dir)
|
44
|
-
end
|
45
|
-
|
46
|
-
desc "install dependencies for Subversion"
|
47
|
-
task :install_deps do
|
48
|
-
apt.install( {:base => %w(subversion)}, :stable )
|
49
|
-
# XXX deprec1 - was building from source to get subversion-1.4.5 onto dapper. Compiled swig bindings for trac
|
50
|
-
# apt.install( {:base => %w(build-essential wget libneon25 libneon25-dev swig python-dev libexpat1-dev)}, :stable )
|
51
|
-
end
|
52
|
-
|
53
|
-
desc "grant a user access to svn repos"
|
54
|
-
task :grant_user_access, :roles => :scm do
|
55
|
-
# creates account, scm_group and adds account to group
|
56
|
-
deprec2.useradd(svn_account)
|
57
|
-
deprec2.groupadd(scm_group)
|
58
|
-
deprec2.add_user_to_group(svn_account, scm_group)
|
59
|
-
end
|
60
|
-
|
61
|
-
desc "Create subversion repository and import project into it"
|
62
|
-
task :setup, :roles => :scm do
|
63
|
-
create_repos
|
64
|
-
import
|
65
|
-
end
|
66
|
-
|
67
|
-
desc "Create a subversion repository"
|
68
|
-
task :create_repos, :roles => :scm do
|
69
|
-
set :svn_account, top.user
|
70
|
-
grant_user_access
|
71
|
-
deprec2.mkdir(repos_root, :mode => 02775, :group => scm_group, :via => :sudo)
|
72
|
-
sudo "svnadmin verify #{repos_root} > /dev/null 2>&1 || sudo svnadmin create #{repos_root}"
|
73
|
-
sudo "chmod -R g+w #{repos_root}"
|
74
|
-
end
|
75
|
-
|
76
|
-
# Adapted from code in Bradley Taylors RailsMachine gem
|
77
|
-
desc "Import project into subversion repository."
|
78
|
-
task :import, :roles => :scm do
|
79
|
-
new_path = "../#{application}"
|
80
|
-
tags = repository.sub("trunk", "tags")
|
81
|
-
branches = repository.sub("trunk", "branches")
|
82
|
-
puts "Adding branches and tags"
|
83
|
-
system "svn mkdir -m 'Adding tags and branches directories' #{tags} #{branches}"
|
84
|
-
puts "Importing application."
|
85
|
-
system "svn import #{repository} -m 'Import'"
|
86
|
-
cwd = Dir.getwd
|
87
|
-
puts "Moving application to new directory"
|
88
|
-
Dir.chdir '../'
|
89
|
-
system "mv #{cwd} #{cwd}.imported"
|
90
|
-
puts "Checking out application."
|
91
|
-
system "svn co #{repository} #{application}"
|
92
|
-
Dir.chdir application
|
93
|
-
remove_log_and_tmp
|
94
|
-
puts "Your repository is: #{repository}"
|
95
|
-
end
|
96
|
-
|
97
|
-
# Lifted from Bradley Taylors RailsMachine gem
|
98
|
-
desc "remove and ignore log files and tmp from subversion"
|
99
|
-
task :remove_log_and_tmp, :roles => :scm do
|
100
|
-
puts "removing log directory contents from svn"
|
101
|
-
system "svn remove log/*"
|
102
|
-
puts "ignoring log directory"
|
103
|
-
system "svn propset svn:ignore '*.log' log/"
|
104
|
-
system "svn update log/"
|
105
|
-
puts "removing contents of tmp sub-directorys from svn"
|
106
|
-
system "svn remove tmp/cache/*"
|
107
|
-
system "svn remove tmp/pids/*"
|
108
|
-
system "svn remove tmp/sessions/*"
|
109
|
-
system "svn remove tmp/sockets/*"
|
110
|
-
puts "ignoring tmp directory"
|
111
|
-
system "svn propset svn:ignore '*' tmp/cache"
|
112
|
-
system "svn propset svn:ignore '*' tmp/pids"
|
113
|
-
system "svn propset svn:ignore '*' tmp/sessions"
|
114
|
-
system "svn propset svn:ignore '*' tmp/sockets"
|
115
|
-
system "svn update tmp/"
|
116
|
-
puts "committing changes"
|
117
|
-
system "svn commit -m 'Removed and ignored log files and tmp'"
|
118
|
-
end
|
119
|
-
|
120
|
-
# desc "Cache svn name and password on the server. Useful for http-based repositories."
|
121
|
-
task :cache_credentials do
|
122
|
-
run_with_input "svn list #{repository}"
|
123
|
-
end
|
124
|
-
|
125
|
-
desc "create backup of trac repository"
|
126
|
-
task :backup, :roles => :scm do
|
127
|
-
# http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.backup
|
128
|
-
# XXX do we need this? insane!
|
129
|
-
# echo "REPOS_BASE=/var/svn" > ~/.svntoolsrc
|
130
|
-
DATE=`date +%Y%m%d-%a`
|
131
|
-
|
132
|
-
timestamp = Time.now.strftime("%Y%m%d-%a")
|
133
|
-
deprec2.mkdir(svn_backup_dir, :owner => :root, :group => :deploy, :mode => 0775, :via => :sudo)
|
134
|
-
dest_dir = File.join(svn_backup_dir, "#{application}_#{timestamp}")
|
135
|
-
sudo "svnadmin hotcopy #{repos_root} #{dest_dir}"
|
136
9
|
end
|
137
|
-
|
138
|
-
task :restore, :roles => :scm do
|
139
|
-
# prompt user to select from list of locally stored backups
|
140
|
-
# tracd_stop
|
141
|
-
# copy out backup
|
142
|
-
end
|
143
|
-
|
144
|
-
|
145
|
-
# XXX TODO
|
146
|
-
# desc "backup repository"
|
147
|
-
# task :svn_backup_respository, :roles => :scm do
|
148
|
-
# puts "read http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.reposadmin.maint.backup"
|
149
|
-
# end
|
150
|
-
|
151
|
-
end
|
10
|
+
end
|
152
11
|
end
|
153
12
|
end
|
154
|
-
|
155
|
-
# svnserve setup
|
156
|
-
# I've previously used ssh exclusively I've decided svnserve is a reasonable choice for collaboration on open source projects.
|
157
|
-
# It's easier to setup than apache/ssl webdav access.
|
158
|
-
#
|
159
|
-
# sudo useradd svn
|
160
|
-
# sudo mkdir -p /var/svn/deprec_svnserve_root
|
161
|
-
# sudo ln -sf /var/www/apps/deprec/repos /var/svn/deprec_svnserve_root/deprec
|
162
|
-
# sudo chown -R svn /var/svn/deprec_svnserve_root/deprec
|
163
|
-
|
164
|
-
#
|
165
|
-
# XXX put password file into svn and command to push it
|
166
|
-
#
|
167
|
-
# # run svnserve
|
168
|
-
# sudo -u svn svnserve --daemon --root /var/svn/deprec_svnserve_root
|
169
|
-
#
|
170
|
-
# # check it out now
|
171
|
-
# svn co svn://scm.deprecated.org/deprec/trunk deprec
|
data/lib/deprec/recipes/users.rb
CHANGED
@@ -3,25 +3,14 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
3
3
|
namespace :deprec do
|
4
4
|
namespace :users do
|
5
5
|
|
6
|
-
set(:users_target_user) { Capistrano::CLI.ui.ask "Enter userid
|
6
|
+
set(:users_target_user) { Capistrano::CLI.ui.ask "Enter userid" do |q| q.default = current_user; end }
|
7
7
|
set(:users_target_group) { Capistrano::CLI.ui.ask "Enter group name for new user" do |q| q.default = 'deploy'; end }
|
8
8
|
set(:users_make_admin) { Capistrano::CLI.ui.ask "Should this be an admin account?" do |q| q.default = 'no'; end }
|
9
9
|
|
10
10
|
desc "Create account"
|
11
11
|
task :add do
|
12
|
-
[users_target_user,
|
13
|
-
|
14
|
-
while true do
|
15
|
-
new_password = Capistrano::CLI.ui.ask("Enter new password for #{users_target_user}") { |q| q.echo = false }
|
16
|
-
password_conf = Capistrano::CLI.ui.ask("Re-enter new password for #{users_target_user}") { |q| q.echo = false }
|
17
|
-
if new_password != password_conf
|
18
|
-
puts "Fail. Passwords do not match.\n\n"
|
19
|
-
elsif new_password.chomp == ""
|
20
|
-
puts "Fail. Passwords cannot be empty.\n\n"
|
21
|
-
else
|
22
|
-
break
|
23
|
-
end
|
24
|
-
end
|
12
|
+
[users_target_user, users_make_admin] # get input
|
13
|
+
new_password = get_new_password
|
25
14
|
|
26
15
|
# Grab a list of all users with keys
|
27
16
|
if users_target_user == 'all'
|
@@ -47,8 +36,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
47
36
|
|
48
37
|
desc "Change user password"
|
49
38
|
task :passwd do
|
50
|
-
new_password =
|
51
|
-
|
39
|
+
new_password = get_new_password
|
52
40
|
deprec2.invoke_with_input("passwd #{users_target_user}", /UNIX password/, new_password)
|
53
41
|
end
|
54
42
|
|
@@ -63,6 +51,21 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
63
51
|
add
|
64
52
|
end
|
65
53
|
|
54
|
+
def get_new_password
|
55
|
+
while true do
|
56
|
+
new_password = Capistrano::CLI.ui.ask("Enter new password for #{users_target_user}") { |q| q.echo = false }
|
57
|
+
password_conf = Capistrano::CLI.ui.ask("Re-enter new password for #{users_target_user}") { |q| q.echo = false }
|
58
|
+
if new_password != password_conf
|
59
|
+
puts "Fail. Passwords do not match.\n\n"
|
60
|
+
elsif new_password.chomp == ""
|
61
|
+
puts "Fail. Passwords cannot be empty.\n\n"
|
62
|
+
else
|
63
|
+
break
|
64
|
+
end
|
65
|
+
end
|
66
|
+
new_password
|
67
|
+
end
|
68
|
+
|
66
69
|
end
|
67
70
|
end
|
68
71
|
end
|
@@ -6,61 +6,64 @@ require "#{File.dirname(__FILE__)}/recipes/canonical"
|
|
6
6
|
require "#{File.dirname(__FILE__)}/recipes/deprec"
|
7
7
|
require "#{File.dirname(__FILE__)}/recipes/deprecated"
|
8
8
|
|
9
|
-
#
|
10
|
-
require "#{File.dirname(__FILE__)}/recipes/ec2"
|
11
|
-
require "#{File.dirname(__FILE__)}/recipes/vmware_tools"
|
9
|
+
# Updated for deprec3
|
12
10
|
|
13
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
14
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
15
|
-
require "#{File.dirname(__FILE__)}/recipes/mysql"
|
16
|
-
require "#{File.dirname(__FILE__)}/recipes/postgresql"
|
17
|
-
require "#{File.dirname(__FILE__)}/recipes/sqlite"
|
18
|
-
require "#{File.dirname(__FILE__)}/recipes/couchdb"
|
11
|
+
require "#{File.dirname(__FILE__)}/recipes/users"
|
12
|
+
require "#{File.dirname(__FILE__)}/recipes/network"
|
19
13
|
require "#{File.dirname(__FILE__)}/recipes/mri"
|
20
14
|
require "#{File.dirname(__FILE__)}/recipes/ree"
|
21
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
22
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
23
|
-
|
24
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
15
|
+
require "#{File.dirname(__FILE__)}/recipes/rack"
|
16
|
+
require "#{File.dirname(__FILE__)}/recipes/rubygems"
|
17
|
+
require "#{File.dirname(__FILE__)}/recipes/nagios3"
|
18
|
+
require "#{File.dirname(__FILE__)}/recipes/nrpe"
|
25
19
|
require "#{File.dirname(__FILE__)}/recipes/git"
|
26
|
-
# require "#{File.dirname(__FILE__)}/recipes/gitosis"
|
27
20
|
require "#{File.dirname(__FILE__)}/recipes/svn"
|
28
|
-
# require "#{File.dirname(__FILE__)}/recipes/integrity"
|
29
21
|
|
30
|
-
|
31
|
-
require "#{File.dirname(__FILE__)}/recipes/ssh"
|
32
|
-
require "#{File.dirname(__FILE__)}/recipes/php"
|
33
|
-
# require "#{File.dirname(__FILE__)}/recipes/scm/trac"
|
22
|
+
# To be updated for deprec3
|
34
23
|
|
35
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
24
|
+
require "#{File.dirname(__FILE__)}/recipes/ssh"
|
25
|
+
require "#{File.dirname(__FILE__)}/recipes/passenger"
|
26
|
+
require "#{File.dirname(__FILE__)}/recipes/mysql"
|
27
|
+
require "#{File.dirname(__FILE__)}/recipes/postgresql"
|
28
|
+
require "#{File.dirname(__FILE__)}/recipes/apache"
|
29
|
+
require "#{File.dirname(__FILE__)}/recipes/haproxy"
|
30
|
+
require "#{File.dirname(__FILE__)}/recipes/heartbeat"
|
31
|
+
require "#{File.dirname(__FILE__)}/recipes/monit"
|
32
|
+
require "#{File.dirname(__FILE__)}/recipes/collectd"
|
33
|
+
require "#{File.dirname(__FILE__)}/recipes/ubuntu"
|
36
34
|
|
37
|
-
|
38
|
-
require "#{File.dirname(__FILE__)}/recipes/xentools"
|
35
|
+
# To be decided...
|
39
36
|
|
37
|
+
require "#{File.dirname(__FILE__)}/recipes/ec2"
|
38
|
+
require "#{File.dirname(__FILE__)}/recipes/vmware_tools"
|
39
|
+
require "#{File.dirname(__FILE__)}/recipes/mongrel"
|
40
|
+
require "#{File.dirname(__FILE__)}/recipes/sqlite"
|
41
|
+
require "#{File.dirname(__FILE__)}/recipes/nginx"
|
42
|
+
require "#{File.dirname(__FILE__)}/recipes/bash"
|
43
|
+
require "#{File.dirname(__FILE__)}/recipes/php"
|
44
|
+
require "#{File.dirname(__FILE__)}/recipes/aoe"
|
40
45
|
require "#{File.dirname(__FILE__)}/recipes/ddclient"
|
41
46
|
require "#{File.dirname(__FILE__)}/recipes/ntp"
|
42
47
|
require "#{File.dirname(__FILE__)}/recipes/logrotate"
|
43
48
|
require "#{File.dirname(__FILE__)}/recipes/ssl"
|
44
|
-
|
45
49
|
require "#{File.dirname(__FILE__)}/recipes/postfix"
|
46
50
|
require "#{File.dirname(__FILE__)}/recipes/memcache"
|
47
|
-
require "#{File.dirname(__FILE__)}/recipes/monit"
|
48
|
-
require "#{File.dirname(__FILE__)}/recipes/network"
|
49
|
-
require "#{File.dirname(__FILE__)}/recipes/nagios"
|
50
|
-
require "#{File.dirname(__FILE__)}/recipes/collectd"
|
51
51
|
require "#{File.dirname(__FILE__)}/recipes/syslog"
|
52
52
|
require "#{File.dirname(__FILE__)}/recipes/syslog_ng"
|
53
53
|
require "#{File.dirname(__FILE__)}/recipes/stunnel"
|
54
|
-
require "#{File.dirname(__FILE__)}/recipes/heartbeat"
|
55
|
-
require "#{File.dirname(__FILE__)}/recipes/haproxy"
|
56
|
-
|
57
|
-
require "#{File.dirname(__FILE__)}/recipes/ubuntu"
|
58
54
|
require "#{File.dirname(__FILE__)}/recipes/lvm"
|
59
55
|
require "#{File.dirname(__FILE__)}/recipes/vnstat"
|
60
|
-
require "#{File.dirname(__FILE__)}/recipes/sphinx"
|
61
56
|
require "#{File.dirname(__FILE__)}/recipes/utils"
|
57
|
+
|
58
|
+
# Retired recipes
|
59
|
+
#
|
60
|
+
# require "#{File.dirname(__FILE__)}/recipes/integrity"
|
61
|
+
# require "#{File.dirname(__FILE__)}/recipes/xen"
|
62
|
+
# require "#{File.dirname(__FILE__)}/recipes/xentools"
|
63
|
+
# require "#{File.dirname(__FILE__)}/recipes/scm/trac"
|
64
|
+
# require "#{File.dirname(__FILE__)}/recipes/sphinx"
|
62
65
|
# require "#{File.dirname(__FILE__)}/recipes/apt_mirror"
|
63
|
-
# require "#{File.dirname(__FILE__)}/recipes/
|
64
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
65
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
66
|
-
require "#{File.dirname(__FILE__)}/recipes/
|
66
|
+
# require "#{File.dirname(__FILE__)}/recipes/wpmu"
|
67
|
+
# require "#{File.dirname(__FILE__)}/recipes/ar_sendmail"
|
68
|
+
# require "#{File.dirname(__FILE__)}/recipes/starling"
|
69
|
+
# require "#{File.dirname(__FILE__)}/recipes/couchdb"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
apache2.conf
|
2
|
+
- natty uses relative paths for things like "Include ports.conf"
|
3
|
+
|
4
|
+
envvars
|
5
|
+
- natty adds stuff
|
6
|
+
|
7
|
+
mods-available/info.conf # and some others
|
8
|
+
- natty uses variable for path prefix
|
9
|
+
|
10
|
+
mods-available/mime.conf
|
11
|
+
- natty changes language list
|
@@ -32,14 +32,19 @@ nice = 0
|
|
32
32
|
#
|
33
33
|
# * Basic Settings
|
34
34
|
#
|
35
|
+
|
36
|
+
#
|
37
|
+
# * IMPORTANT
|
38
|
+
# If you make changes to these settings and your system uses apparmor, you may
|
39
|
+
# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
|
40
|
+
#
|
41
|
+
|
35
42
|
user = mysql
|
36
|
-
pid-file = /var/run/mysqld/mysqld.pid
|
37
43
|
socket = /var/run/mysqld/mysqld.sock
|
38
44
|
port = 3306
|
39
45
|
basedir = /usr
|
40
46
|
datadir = /var/lib/mysql
|
41
47
|
tmpdir = /tmp
|
42
|
-
language = /usr/share/mysql/english
|
43
48
|
skip-external-locking
|
44
49
|
#
|
45
50
|
# Instead of skip-networking the default is now to listen only on
|
@@ -50,25 +55,30 @@ bind-address = 127.0.0.1
|
|
50
55
|
#
|
51
56
|
key_buffer = 16M
|
52
57
|
max_allowed_packet = 16M
|
53
|
-
thread_stack =
|
54
|
-
thread_cache_size
|
58
|
+
thread_stack = 192K
|
59
|
+
thread_cache_size = 8
|
60
|
+
# This replaces the startup script and checks MyISAM tables if needed
|
61
|
+
# the first time they are touched
|
62
|
+
myisam-recover = BACKUP
|
55
63
|
#max_connections = 100
|
56
64
|
#table_cache = 64
|
57
65
|
#thread_concurrency = 10
|
58
66
|
#
|
59
67
|
# * Query Cache Configuration
|
60
68
|
#
|
61
|
-
query_cache_limit
|
69
|
+
query_cache_limit = 1M
|
62
70
|
query_cache_size = 16M
|
63
71
|
#
|
64
72
|
# * Logging and Replication
|
65
73
|
#
|
66
74
|
# Both location gets rotated by the cronjob.
|
67
75
|
# Be aware that this log type is a performance killer.
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
|
76
|
+
# As of 5.1 you can enable the log at runtime!
|
77
|
+
#general_log_file = /var/log/mysql/mysql.log
|
78
|
+
#general_log = 1
|
79
|
+
|
80
|
+
log_error = /var/log/mysql/error.log
|
81
|
+
|
72
82
|
# Here you can see queries with especially long duration
|
73
83
|
#log_slow_queries = /var/log/mysql/mysql-slow.log
|
74
84
|
#long_query_time = 2
|
@@ -78,24 +88,16 @@ query_cache_size = 16M
|
|
78
88
|
# note: if you are setting up a replication slave, see README.Debian about
|
79
89
|
# other settings you may need to change.
|
80
90
|
#server-id = 1
|
81
|
-
log_bin = /var/log/mysql/mysql-bin.log
|
82
|
-
# WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
|
91
|
+
#log_bin = /var/log/mysql/mysql-bin.log
|
83
92
|
expire_logs_days = 10
|
84
93
|
max_binlog_size = 100M
|
85
94
|
#binlog_do_db = include_database_name
|
86
95
|
#binlog_ignore_db = include_database_name
|
87
96
|
#
|
88
|
-
# * BerkeleyDB
|
89
|
-
#
|
90
|
-
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
|
91
|
-
skip-bdb
|
92
|
-
#
|
93
97
|
# * InnoDB
|
94
98
|
#
|
95
99
|
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
|
96
100
|
# Read the manual for more InnoDB related options. There are many!
|
97
|
-
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
|
98
|
-
#skip-innodb
|
99
101
|
#
|
100
102
|
# * Security Features
|
101
103
|
#
|
@@ -121,20 +123,8 @@ max_allowed_packet = 16M
|
|
121
123
|
[isamchk]
|
122
124
|
key_buffer = 16M
|
123
125
|
|
124
|
-
#
|
125
|
-
# * NDB Cluster
|
126
|
-
#
|
127
|
-
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
|
128
|
-
#
|
129
|
-
# The following configuration is read by the NDB Data Nodes (ndbd processes)
|
130
|
-
# not from the NDB Management Nodes (ndb_mgmd processes).
|
131
|
-
#
|
132
|
-
# [MYSQL_CLUSTER]
|
133
|
-
# ndb-connectstring=127.0.0.1
|
134
|
-
|
135
|
-
|
136
126
|
#
|
137
127
|
# * IMPORTANT: Additional settings that can override those from this file!
|
128
|
+
# The files must end with '.cnf', otherwise they'll be ignored.
|
138
129
|
#
|
139
130
|
!includedir /etc/mysql/conf.d/
|
140
|
-
|