deprec 2.2.3 → 3.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -1
- data/bin/depify +3 -8
- data/{lib → docs}/deprec_cmd_completion.sh +0 -0
- data/lib/deprec.rb +5 -7
- data/lib/deprec/cap.rb +51 -0
- data/lib/deprec/{callbacks → cap/callbacks}/asset_pipeline.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/aoe.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/apache.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/bash.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/canonical.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/collectd.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/deprec.rb +1 -2
- data/lib/deprec/{recipes → cap/recipes}/deprecated.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/ec2.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/example.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/git.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/haproxy.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/heartbeat.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/logrotate.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/lvm.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/mongrel.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/monit.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/mri.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/mysql.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/nagios.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/nagios3.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/network.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/nginx.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/nrpe.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/ntp.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/passenger.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/php.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/postfix.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/postgresql.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/rack.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/rails.rb +4 -4
- data/lib/deprec/{recipes → cap/recipes}/ree.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/rubygems.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/sqlite.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/ssh.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/ssl.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/stunnel.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/syslog.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/syslog_ng.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/ubuntu.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/users.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/utils.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/xen.rb +0 -0
- data/lib/deprec/{recipes → cap/recipes}/xentools.rb +0 -0
- data/lib/deprec/{templates → cap/templates}/aoe/aoe-init +0 -0
- data/lib/deprec/{templates → cap/templates}/aoe/fence_aoemask +0 -0
- data/lib/deprec/{templates → cap/templates}/apache/CHANGES.txt +0 -0
- data/lib/deprec/{templates → cap/templates}/apache/apache2.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/apache/default.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/apache/namevirtualhosts.conf +0 -0
- data/lib/deprec/{templates → cap/templates}/apache/ports.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/apache/status.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/apache/vhost.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/bash/bash_global +0 -0
- data/lib/deprec/{templates → cap/templates}/collectd/collectd-init.d +0 -0
- data/lib/deprec/{templates → cap/templates}/collectd/collectd.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/deprec/caprc.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/haproxy/haproxy-init.d +0 -0
- data/lib/deprec/{templates → cap/templates}/haproxy/haproxy.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/heartbeat/authkeys.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/heartbeat/ha.cf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/heartbeat/haresources.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/logrotate/logrotate.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/mongrel/apache_vhost.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/mongrel/logrotate.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/mongrel/mongrel_cluster-init-script +0 -0
- data/lib/deprec/{templates → cap/templates}/mongrel/mongrel_cluster.yml.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/mongrel/monit.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/mongrel/nginx_vhost.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/monit/monit-init-script +0 -0
- data/lib/deprec/{templates → cap/templates}/monit/monitrc.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/monit/nothing.monitrc +0 -0
- data/lib/deprec/{templates → cap/templates}/mysql/create_databases.sql +0 -0
- data/lib/deprec/{templates → cap/templates}/mysql/database.yml.prod +0 -0
- data/lib/deprec/{templates → cap/templates}/mysql/database.yml.stage +0 -0
- data/lib/deprec/{templates → cap/templates}/mysql/my.cnf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/mysql/sphinx.conf.prod +0 -0
- data/lib/deprec/{templates → cap/templates}/mysql/sphinx.conf.stage +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/README +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/apache_vhost.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/cgi.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/check_linux_free_memory.pl +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/check_mongrel_cluster.rb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/htpasswd.users +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/mrtg.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/nagios.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/nrpe.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/nrpe.xinetd.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/objects/commands.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/objects/contacts.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/objects/hosts.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/objects/localhost.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/objects/services.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/objects/timeperiods.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios.old/resource.cfg.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/apache2.conf +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/cgi.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/check_linux_free_memory.pl +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/commands.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/conf.d/contacts_nagios2.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/conf.d/extinfo_nagios2.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/conf.d/generic-host_nagios2.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/conf.d/generic-service_nagios2.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/conf.d/hostgroups_nagios2.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/conf.d/hosts/localhost_nagios2.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/conf.d/services_nagios2.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/conf.d/timeperiods_nagios2.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/host_template.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/htpasswd.users +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/nagios.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/nrpe.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/nagios/resource.cfg +0 -0
- data/lib/deprec/{templates → cap/templates}/network/hostname.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/network/hosts.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/network/interfaces.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/network/resolv.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nginx/logrotate.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nginx/mime.types.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nginx/nginx-init-script +0 -0
- data/lib/deprec/{templates → cap/templates}/nginx/nginx.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/nginx/nginx.logrotate.d +0 -0
- data/lib/deprec/{templates → cap/templates}/nginx/nothing.conf +0 -0
- data/lib/deprec/{templates → cap/templates}/nginx/rails_nginx_vhost.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/ntp/ntp.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/passenger/apache_vhost.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/passenger/logrotate.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/passenger/passenger.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/passenger/passenger.load.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/postfix/aliases.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/postfix/dynamicmaps.cf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/postfix/main.cf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/postfix/master.cf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/ssh/ssh_config.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/ssh/sshd_config.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/ssl/make-ssl-cert +0 -0
- data/lib/deprec/{templates → cap/templates}/ssl/ssl-cert-snakeoil.key +0 -0
- data/lib/deprec/{templates → cap/templates}/ssl/ssl-cert-snakeoil.pem +0 -0
- data/lib/deprec/{templates → cap/templates}/stunnel/stunnel.conf-client +0 -0
- data/lib/deprec/{templates → cap/templates}/stunnel/stunnel.conf-orig +0 -0
- data/lib/deprec/{templates → cap/templates}/stunnel/stunnel.conf-server +0 -0
- data/lib/deprec/{templates → cap/templates}/stunnel/stunnel4 +0 -0
- data/lib/deprec/{templates → cap/templates}/stunnel/syslog-server.pem +0 -0
- data/lib/deprec/{templates → cap/templates}/syslog/syslog.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/syslog/syslogd.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/syslog_ng/apache_syslog +0 -0
- data/lib/deprec/{templates → cap/templates}/syslog_ng/syslog-ng.conf-client +0 -0
- data/lib/deprec/{templates → cap/templates}/syslog_ng/syslog-ng.conf-orig +0 -0
- data/lib/deprec/{templates → cap/templates}/syslog_ng/syslog-ng.conf-server +0 -0
- data/lib/deprec/{templates → cap/templates}/xen/network-bridge-wrapper +0 -0
- data/lib/deprec/{templates → cap/templates}/xen/xend-config.sxp.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/xen/xend-init.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/xen/xendomains.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/xentools/15-disable-hwclock +0 -0
- data/lib/deprec/{templates → cap/templates}/xentools/40-setup-networking +0 -0
- data/lib/deprec/{templates → cap/templates}/xentools/xen-tools.conf.erb +0 -0
- data/lib/deprec/{templates → cap/templates}/xentools/xm.tmpl.erb +0 -0
- data/lib/deprec_minus_rails.rb +22 -12
- metadata +178 -212
- data/lib/deprec/TODO.txt +0 -6
- data/lib/deprec/capistrano_extensions.rb +0 -418
- data/lib/deprec/recipes.rb +0 -7
- data/lib/deprec/recipes/ar_sendmail.rb +0 -67
- data/lib/deprec/recipes/chef.rb +0 -68
- data/lib/deprec/recipes/couchdb.rb +0 -107
- data/lib/deprec/recipes/ddclient.rb +0 -51
- data/lib/deprec/recipes/gitosis.rb +0 -55
- data/lib/deprec/recipes/integrity.rb +0 -108
- data/lib/deprec/recipes/memcache.rb +0 -49
- data/lib/deprec/recipes/sphinx.rb +0 -86
- data/lib/deprec/recipes/starling.rb +0 -119
- data/lib/deprec/recipes/svn.rb +0 -12
- data/lib/deprec/recipes/trac.rb +0 -277
- data/lib/deprec/recipes/vmware_tools.rb +0 -15
- data/lib/deprec/recipes/vnstat.rb +0 -85
- data/lib/deprec/recipes/wpmu.rb +0 -103
- data/lib/deprec/recipes_minus_rails.rb +0 -69
- data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +0 -9
- data/lib/deprec/templates/ar_sendmail/monit.conf.erb +0 -5
- data/lib/deprec/templates/chef/chef.json.erb +0 -1
- data/lib/deprec/templates/chef/solo.rb +0 -2
- data/lib/deprec/templates/ddclient/ddclient.conf.erb +0 -11
- data/lib/deprec/templates/ddclient/ddclient.erb +0 -15
- data/lib/deprec/templates/integrity/apache_vhost.erb +0 -4
- data/lib/deprec/templates/integrity/config.ru.erb +0 -21
- data/lib/deprec/templates/integrity/config.yml.erb +0 -43
- data/lib/deprec/templates/sphinx/monit.conf.erb +0 -5
- data/lib/deprec/templates/starling/monit.conf.erb +0 -14
- data/lib/deprec/templates/starling/starling-init-script.erb +0 -71
- data/lib/deprec/templates/subversion/svn.apache.vhost.erb +0 -43
- data/lib/deprec/templates/trac/apache_vhost.conf.erb +0 -24
- data/lib/deprec/templates/trac/nginx_vhost.conf.erb +0 -26
- data/lib/deprec/templates/trac/trac.ini.erb +0 -169
- data/lib/deprec/templates/trac/trac_deprec.png +0 -0
- data/lib/deprec/templates/trac/tracd-init.erb +0 -43
- data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
- data/lib/deprec/templates/vnstat/config.php +0 -57
- data/lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb +0 -31
- data/lib/deprec/templates/wordpress/wp-config.php.erb +0 -31
- data/lib/deprec/templates/wpmu/apache_vhost.conf.erb +0 -13
- data/lib/vmbuilder_plugins/all.rb +0 -20
- data/lib/vmbuilder_plugins/apt.rb +0 -93
- data/lib/vmbuilder_plugins/emerge.rb +0 -76
- data/lib/vmbuilder_plugins/gem.rb +0 -90
- data/lib/vmbuilder_plugins/std.rb +0 -203
data/lib/deprec/recipes/chef.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
# Copyright 2006-2009 by Mike Bailey. All rights reserved.
|
2
|
-
Capistrano::Configuration.instance(:must_exist).load do
|
3
|
-
namespace :deprec do
|
4
|
-
namespace :chef do
|
5
|
-
|
6
|
-
set(:server_fqdn) { Capistrano::CLI.ui.ask 'Enter Chef server hostname' }
|
7
|
-
set(:recipes) { "chef::#{install_type}" }
|
8
|
-
|
9
|
-
default(:install_type) do
|
10
|
-
Capistrano::CLI.ui.choose do |menu|
|
11
|
-
%w(client server).each {|c| menu.choice(c)}
|
12
|
-
menu.header = "Select Chef version to install"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
desc "Install Chef"
|
17
|
-
task :install do
|
18
|
-
config # Do this first so we can ensure we have any user input
|
19
|
-
install_deps
|
20
|
-
run_solo
|
21
|
-
top.deprec.apache.restart if install_type == 'server'
|
22
|
-
end
|
23
|
-
|
24
|
-
desc "Run chef-solo to setup on server"
|
25
|
-
task :run_solo do
|
26
|
-
sudo 'chef-solo -c /etc/chef/solo.rb -j /etc/chef/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz'
|
27
|
-
end
|
28
|
-
|
29
|
-
# Install dependencies for Chef
|
30
|
-
task :install_deps, :roles => :chef do
|
31
|
-
top.deprec.couchdb.install if install_type == 'server'
|
32
|
-
# apt.install( {:base => %w(ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb)}, :stable )
|
33
|
-
top.deprec.ruby.install
|
34
|
-
top.deprec.rubygems.install
|
35
|
-
sudo "gem sources -a http://gems.opscode.com"
|
36
|
-
sudo "gem install ohai chef --no-rdoc --no-ri"
|
37
|
-
end
|
38
|
-
|
39
|
-
SYSTEM_CONFIG_FILES[:chef] = [
|
40
|
-
|
41
|
-
{:template => "solo.rb",
|
42
|
-
:path => '/etc/chef/solo.rb',
|
43
|
-
:mode => 0644,
|
44
|
-
:owner => 'root:root'},
|
45
|
-
|
46
|
-
{:template => "chef.json.erb",
|
47
|
-
:path => '/etc/chef/chef.json',
|
48
|
-
:mode => 0644,
|
49
|
-
:owner => 'root:root'}
|
50
|
-
|
51
|
-
]
|
52
|
-
|
53
|
-
desc "Generate Chef configs (system & project level)."
|
54
|
-
task :config_gen do
|
55
|
-
SYSTEM_CONFIG_FILES[:chef].each do |file|
|
56
|
-
deprec2.render_template(:chef, file)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
desc "Push Chef config files (system & project level) to server"
|
61
|
-
task :config, :roles => :chef do
|
62
|
-
deprec2.push_configs(:chef, SYSTEM_CONFIG_FILES[:chef])
|
63
|
-
end
|
64
|
-
|
65
|
-
end
|
66
|
-
|
67
|
-
end
|
68
|
-
end
|
@@ -1,107 +0,0 @@
|
|
1
|
-
# Copyright 2006-2009 by Mike Bailey. All rights reserved.
|
2
|
-
Capistrano::Configuration.instance(:must_exist).load do
|
3
|
-
namespace :deprec do
|
4
|
-
namespace :couchdb do
|
5
|
-
|
6
|
-
set :couchdb_user, 'couchdb'
|
7
|
-
|
8
|
-
SRC_PACKAGES[:couchdb] = {
|
9
|
-
:url => "http://mirror.public-internet.co.uk/ftp/apache/incubator/couchdb/0.8.0-incubating/apache-couchdb-0.8.0-incubating.tar.gz",
|
10
|
-
:md5sum => "1f915929d4f54a2e0449a4a08f093118 git-1.6.1.tar.gz"
|
11
|
-
}
|
12
|
-
|
13
|
-
desc "Install CouchDB"
|
14
|
-
task :install do
|
15
|
-
install_deps
|
16
|
-
deprec2.download_src(SRC_PACKAGES[:couchdb], src_dir)
|
17
|
-
deprec2.install_from_src(SRC_PACKAGES[:couchdb], src_dir)
|
18
|
-
create_user
|
19
|
-
setup_filepaths
|
20
|
-
activate
|
21
|
-
start
|
22
|
-
end
|
23
|
-
|
24
|
-
task :create_user, :roles => :couchdb do
|
25
|
-
deprec2.useradd(couchdb_user)
|
26
|
-
end
|
27
|
-
|
28
|
-
task :setup_filepaths, :roles => :couchdb do
|
29
|
-
sudo "mkdir -p /usr/local/var/lib/couchdb"
|
30
|
-
sudo "chown -R couchdb /usr/local/var/lib/couchdb"
|
31
|
-
sudo "mkdir -p /usr/local/var/log/couchdb"
|
32
|
-
sudo "chown -R couchdb /usr/local/var/log/couchdb"
|
33
|
-
sudo "mkdir -p /usr/local/var/run"
|
34
|
-
sudo "chown -R couchdb /usr/local/var/run"
|
35
|
-
sudo "cp /usr/local/etc/init.d/couchdb /etc/init.d/"
|
36
|
-
end
|
37
|
-
|
38
|
-
# Install dependencies for CouchDB
|
39
|
-
task :install_deps, :roles => :couchdb do
|
40
|
-
apt.install( {:base => %w(automake autoconf libtool subversion-tools help2man erlang libicu38 libicu-dev libreadline5-dev checkinstall libmozjs-dev)}, :stable )
|
41
|
-
end
|
42
|
-
|
43
|
-
SYSTEM_CONFIG_FILES[:couchdb] = []
|
44
|
-
|
45
|
-
desc "Generate CouchDB configs (system & project level)."
|
46
|
-
task :config_gen do
|
47
|
-
SYSTEM_CONFIG_FILES[:couchdb].each do |file|
|
48
|
-
deprec2.render_template(:couchdb, file)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
desc "Push CouchDB config files (system & project level) to server"
|
53
|
-
task :config, :roles => :couchdb do
|
54
|
-
deprec2.push_configs(:couchdb, SYSTEM_CONFIG_FILES[:couchdb])
|
55
|
-
end
|
56
|
-
|
57
|
-
desc "Set CouchDB to start on boot"
|
58
|
-
task :activate, :roles => :couchdb do
|
59
|
-
send(run_method, "update-rc.d couchdb defaults")
|
60
|
-
end
|
61
|
-
|
62
|
-
desc "Set CouchDB to not start on boot"
|
63
|
-
task :deactivate, :roles => :couchdb do
|
64
|
-
send(run_method, "update-rc.d -f couchdb remove")
|
65
|
-
end
|
66
|
-
|
67
|
-
desc "Start CouchDB"
|
68
|
-
task :start, :roles => :web do
|
69
|
-
send(run_method, "/etc/init.d/couchdb start")
|
70
|
-
end
|
71
|
-
|
72
|
-
desc "Stop CouchDB"
|
73
|
-
task :stop, :roles => :web do
|
74
|
-
send(run_method, "/etc/init.d/couchdb stop")
|
75
|
-
end
|
76
|
-
|
77
|
-
desc "Restart CouchDB"
|
78
|
-
task :restart, :roles => :web do
|
79
|
-
send(run_method, "/etc/init.d/couchdb restart")
|
80
|
-
end
|
81
|
-
|
82
|
-
desc "Reload CouchDB"
|
83
|
-
task :reload, :roles => :web do
|
84
|
-
send(run_method, "/etc/init.d/couchdb force-reload")
|
85
|
-
end
|
86
|
-
|
87
|
-
end
|
88
|
-
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
# sudo apt-get install automake autoconf libtool subversion-tools help2man build-essential erlang libicu38 libicu-dev libreadline5-dev checkinstall libmozjs-dev wget
|
93
|
-
# wget http://mirror.public-internet.co.uk/ftp/apache/incubator/couchdb/0.8.0-incubating/apache-couchdb-0.8.0-incubating.tar.gz
|
94
|
-
# tar -xzvf apache-couchdb-0.8.0-incubating.tar.gz
|
95
|
-
# cd apache-couchdb-0.8.0-incubating
|
96
|
-
# ./configure
|
97
|
-
# make && sudo make install
|
98
|
-
# sudo useradd couchdb
|
99
|
-
# sudo mkdir -p /usr/local/var/lib/couchdb
|
100
|
-
# sudo chown -R couchdb /usr/local/var/lib/couchdb
|
101
|
-
# sudo mkdir -p /usr/local/var/log/couchdb
|
102
|
-
# sudo chown -R couchdb /usr/local/var/log/couchdb
|
103
|
-
# sudo mkdir -p /usr/local/var/run
|
104
|
-
# sudo chown -R couchdb /usr/local/var/run
|
105
|
-
# sudo cp /usr/local/etc/init.d/couchdb /etc/init.d/
|
106
|
-
# sudo update-rc.d couchdb defaults
|
107
|
-
# sudo /etc/init.d/couchdb start
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# Copyright 2006-2008 by Mike Bailey. All rights reserved.
|
2
|
-
Capistrano::Configuration.instance(:must_exist).load do
|
3
|
-
namespace :deprec do
|
4
|
-
namespace :ddclient do
|
5
|
-
|
6
|
-
set(:ddclient_user) { Capistrano::CLI.ui.ask "Enter ddclient username" }
|
7
|
-
set(:ddclient_pass) { Capistrano::CLI.ui.ask "Enter ddclient password" }
|
8
|
-
set(:ddclient_domains) { Capistrano::CLI.ui.ask "Enter ddclient domain" }
|
9
|
-
set(:ddclient_interface) {
|
10
|
-
Capistrano::CLI.ui.ask "Enter ddclient interface" do |q|
|
11
|
-
q.default = 'eth0'
|
12
|
-
end
|
13
|
-
}
|
14
|
-
|
15
|
-
desc "Install ddclient"
|
16
|
-
task :install do
|
17
|
-
install_deps
|
18
|
-
end
|
19
|
-
|
20
|
-
# install dependencies for ddclient
|
21
|
-
task :install_deps do
|
22
|
-
apt.install( {:base => %w(ddclient)}, :stable )
|
23
|
-
end
|
24
|
-
|
25
|
-
SYSTEM_CONFIG_FILES[:ddclient] = [
|
26
|
-
{ :template => "ddclient.conf.erb",
|
27
|
-
:path => '/etc/ddclient.conf',
|
28
|
-
:mode => 0600,
|
29
|
-
:owner => 'root:root'},
|
30
|
-
|
31
|
-
{ :template => "ddclient.erb",
|
32
|
-
:path => '/etc/default/ddclient',
|
33
|
-
:mode => 0600,
|
34
|
-
:owner => 'root:root'}
|
35
|
-
]
|
36
|
-
|
37
|
-
desc "Update system networking configuration"
|
38
|
-
task :config do
|
39
|
-
SYSTEM_CONFIG_FILES[:ddclient].each do |file|
|
40
|
-
deprec2.render_template(:ddclient, file.merge(:remote=>true))
|
41
|
-
end
|
42
|
-
start
|
43
|
-
end
|
44
|
-
|
45
|
-
task :start do
|
46
|
-
sudo '/etc/init.d/ddclient start'
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# Not working
|
2
|
-
#
|
3
|
-
# # Copyright 2006-2008 by Mike Bailey. All rights reserved.
|
4
|
-
# Capistrano::Configuration.instance(:must_exist).load do
|
5
|
-
# namespace :deprec do
|
6
|
-
# namespace :gitosis do
|
7
|
-
#
|
8
|
-
# # ref: http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
|
9
|
-
#
|
10
|
-
# set :gitosis_user, 'git'
|
11
|
-
#
|
12
|
-
# SRC_PACKAGES[:gitosis] = {
|
13
|
-
# :url => "git://eagain.net/gitosis.git",
|
14
|
-
# :download_method => :git,
|
15
|
-
# :configure => '',
|
16
|
-
# :make => '',
|
17
|
-
# :install => '#{sudo} python setup.py install'
|
18
|
-
# }
|
19
|
-
#
|
20
|
-
# desc "Install gitosis"
|
21
|
-
# task :install do
|
22
|
-
# install_deps
|
23
|
-
# deprec2.download_src(SRC_PACKAGES[:gitosis], src_dir)
|
24
|
-
# deprec2.install_from_src(SRC_PACKAGES[:gitosis], src_dir)
|
25
|
-
# create_user
|
26
|
-
# init
|
27
|
-
# end
|
28
|
-
#
|
29
|
-
# # install dependencies for nginx
|
30
|
-
# task :install_deps do
|
31
|
-
# apt.install( {:base => %w(python-setuptools)}, :stable )
|
32
|
-
# end
|
33
|
-
#
|
34
|
-
# # Create user for gitosis to run as
|
35
|
-
# # This will also be the account you use for ssh access to git
|
36
|
-
# task :create_user do
|
37
|
-
# run "grep '^#{gitosis_user}:' /etc/passwd || #{sudo} adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/#{gitosis_user} #{gitosis_user}"
|
38
|
-
# sudo "passwd --unlock #{gitosis_user}"
|
39
|
-
# end
|
40
|
-
#
|
41
|
-
# task :init do
|
42
|
-
# sudo "sudo -H -u #{git_user} gitosis-init < ~/.ssh/authorized_keys"
|
43
|
-
# sudo "chmod 0755 /home/git/repositories/gitosis-admin.git/hooks/post-update"
|
44
|
-
# puts
|
45
|
-
# puts "Now check out the gitosis-admin repo, edit configs and push changes back"
|
46
|
-
# puts "Your changes with update gitosis as soon as they are checked in."
|
47
|
-
# puts
|
48
|
-
# puts "git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git"
|
49
|
-
# puts "cd gitosis-admin"
|
50
|
-
# puts ""
|
51
|
-
# end
|
52
|
-
#
|
53
|
-
# end
|
54
|
-
# end
|
55
|
-
# end
|
@@ -1,108 +0,0 @@
|
|
1
|
-
require 'digest/sha1'
|
2
|
-
|
3
|
-
# Copyright 2006-2009 by Mike Bailey. All rights reserved.
|
4
|
-
Capistrano::Configuration.instance(:must_exist).load do
|
5
|
-
namespace :deprec do
|
6
|
-
namespace :integrity do
|
7
|
-
|
8
|
-
set :integrity_install_dir, '/opt/apps/integrity'
|
9
|
-
set(:integrity_domain) do
|
10
|
-
Capistrano::CLI.ui.ask 'Please enter domain name' do |q|
|
11
|
-
q.default = 'integrity.failmode.com'
|
12
|
-
end
|
13
|
-
end
|
14
|
-
set :integrity_use_basic_auth, true
|
15
|
-
set :integrity_hash_admin_password, true
|
16
|
-
set(:integrity_admin_username) do
|
17
|
-
Capistrano::CLI.ui.ask 'Please enter admin username' do |q|
|
18
|
-
q.default = 'admin'
|
19
|
-
end
|
20
|
-
end
|
21
|
-
set(:integrity_admin_password) { Capistrano::CLI.password_prompt 'Please enter admin password' }
|
22
|
-
set :integrity_user, 'integrity'
|
23
|
-
|
24
|
-
|
25
|
-
desc "Install Integrity"
|
26
|
-
task :install, :roles => :ci do
|
27
|
-
install_deps
|
28
|
-
sudo 'gem sources -a http://gems.github.com'
|
29
|
-
gem2.install 'integrity'
|
30
|
-
|
31
|
-
sudo "integrity install --passenger #{integrity_install_dir}"
|
32
|
-
deprec2.useradd 'integrity'
|
33
|
-
sudo "chown -R #{integrity_user} #{integrity_install_dir}"
|
34
|
-
end
|
35
|
-
|
36
|
-
# Install dependencies for Integrity
|
37
|
-
task :install_deps, :roles => :ci do
|
38
|
-
apt.install( {:base => %w(postfix sqlite3 libsqlite3-dev git libxslt1-dev libxml2-dev)}, :stable )
|
39
|
-
gem2.install 'sqlite3-ruby'
|
40
|
-
gem2.install 'do_sqlite3'
|
41
|
-
# Gems your tests might need
|
42
|
-
gem2.install 'webrat'
|
43
|
-
end
|
44
|
-
|
45
|
-
SYSTEM_CONFIG_FILES[:integrity] = [
|
46
|
-
|
47
|
-
{ :template => 'apache_vhost.erb',
|
48
|
-
:path => "/etc/apache2/sites-available/integrity",
|
49
|
-
:mode => 0755,
|
50
|
-
:owner => 'root:root'},
|
51
|
-
|
52
|
-
{ :template => 'config.ru.erb',
|
53
|
-
:path => "/opt/apps/integrity/config.ru", # XXX shouldn't be hard coded
|
54
|
-
:mode => 0755,
|
55
|
-
:owner => 'root:root'},
|
56
|
-
|
57
|
-
{ :template => 'config.yml.erb',
|
58
|
-
:path => "/opt/apps/integrity/config.yml", # XXX shouldn't be hard coded
|
59
|
-
:mode => 0755,
|
60
|
-
:owner => 'root:root'}
|
61
|
-
|
62
|
-
]
|
63
|
-
|
64
|
-
desc "Generate Integrity apache configs (system & project level)."
|
65
|
-
task :config_gen do
|
66
|
-
SYSTEM_CONFIG_FILES[:integrity].each do |file|
|
67
|
-
deprec2.render_template(:integrity, file)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
desc "Push Integrity config files (system & project level) to server"
|
72
|
-
task :config, :roles => :ci do
|
73
|
-
deprec2.push_configs(:integrity, SYSTEM_CONFIG_FILES[:integrity])
|
74
|
-
sudo "chown #{integrity_user} #{integrity_install_dir}/config.ru"
|
75
|
-
activate
|
76
|
-
end
|
77
|
-
|
78
|
-
# XXX Setup database for testing project
|
79
|
-
#
|
80
|
-
# $ mysql -uroot p
|
81
|
-
# mysql> CREATE USER integrity INDENTIFIED BY PASSWORD 'mypassword123';
|
82
|
-
# mysql> CREATE DATABASE my_cool_application_test;
|
83
|
-
# mysql> GRANT ALL ON my_cool_application_test.* TO 'integrity'@localhost IDENTIFIED BY 'mypassword123';
|
84
|
-
|
85
|
-
task :activate, :roles => :ci do
|
86
|
-
sudo "a2ensite integrity"
|
87
|
-
restart_apache
|
88
|
-
end
|
89
|
-
|
90
|
-
task :deactivate, :roles => :ci do
|
91
|
-
sudo "a2dissite integrity"
|
92
|
-
restart_apache
|
93
|
-
end
|
94
|
-
|
95
|
-
desc "Restart Application"
|
96
|
-
task :restart, :roles => :ci do
|
97
|
-
sudo "touch #{integrity_install_dir}/tmp/restart.txt"
|
98
|
-
end
|
99
|
-
|
100
|
-
desc "Restart Apache"
|
101
|
-
task :restart_apache, :roles => :ci do
|
102
|
-
run "#{sudo} /etc/init.d/apache2 restart"
|
103
|
-
end
|
104
|
-
|
105
|
-
end
|
106
|
-
|
107
|
-
end
|
108
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# Copyright 2006-2008 by Mike Bailey. All rights reserved.
|
2
|
-
Capistrano::Configuration.instance(:must_exist).load do
|
3
|
-
namespace :deprec do
|
4
|
-
namespace :memcache do
|
5
|
-
|
6
|
-
set :memcache_ip, '127.0.0.1'
|
7
|
-
set :memcache_port, 11211
|
8
|
-
set :memcache_memory, 256
|
9
|
-
|
10
|
-
# XXX needs thought/work
|
11
|
-
task :memcached_start do
|
12
|
-
run "memcached -d -m #{memcache_memory} -l #{memcache_ip} -p #{memcache_port}"
|
13
|
-
end
|
14
|
-
|
15
|
-
# XXX needs thought/work
|
16
|
-
task :memcached_stop do
|
17
|
-
run "killall memcached"
|
18
|
-
end
|
19
|
-
|
20
|
-
# XXX needs thought/work
|
21
|
-
task :memcached_restart do
|
22
|
-
memcached_stop
|
23
|
-
memcached_start
|
24
|
-
end
|
25
|
-
|
26
|
-
task :install_memcached do
|
27
|
-
version = 'memcached-1.2.2'
|
28
|
-
set :src_package, {
|
29
|
-
:file => version + '.tar.gz',
|
30
|
-
:md5sum => 'a08851f7fa7b15e92ee6320b7a79c321 memcached-1.2.2.tar.gz',
|
31
|
-
:dir => version,
|
32
|
-
:url => "http://www.danga.com/memcached/dist/#{version}.tar.gz",
|
33
|
-
:unpack => "tar zxf #{version}.tar.gz;",
|
34
|
-
:configure => %w{
|
35
|
-
./configure
|
36
|
-
--prefix=/usr/local
|
37
|
-
;
|
38
|
-
}.reject{|arg| arg.match '#'}.join(' '),
|
39
|
-
:make => 'make;',
|
40
|
-
:install => 'make install;',
|
41
|
-
:post_install => 'install -b scripts/memcached-init /etc/init.d/memcached;'
|
42
|
-
}
|
43
|
-
apt.install( {:base => %w(libevent-dev)}, :stable )
|
44
|
-
deprec.download_src(src_package, src_dir)
|
45
|
-
deprec.install_from_src(src_package, src_dir)
|
46
|
-
end
|
47
|
-
end end
|
48
|
-
|
49
|
-
end
|
@@ -1,86 +0,0 @@
|
|
1
|
-
# Copyright 2006-2008 by Mike Bailey. All rights reserved.
|
2
|
-
Capistrano::Configuration.instance(:must_exist).load do
|
3
|
-
namespace :deprec do
|
4
|
-
namespace :sphinx do
|
5
|
-
|
6
|
-
SRC_PACKAGES[:sphinx] = {
|
7
|
-
:filename => 'sphinx-0.9.8-rc2.tar.gz',
|
8
|
-
:dir => 'sphinx-0.9.8-rc2',
|
9
|
-
:url => "http://www.sphinxsearch.com/downloads/sphinx-0.9.8-rc2.tar.gz",
|
10
|
-
:unpack => "tar zxf sphinx-0.9.8-rc2.tar.gz;",
|
11
|
-
:configure => %w(
|
12
|
-
./configure
|
13
|
-
;
|
14
|
-
).reject{|arg| arg.match '#'}.join(' '),
|
15
|
-
:make => 'make;',
|
16
|
-
:install => 'make install;'
|
17
|
-
}
|
18
|
-
|
19
|
-
desc "install Sphinx Search Engine"
|
20
|
-
task :install do
|
21
|
-
deprec2.download_src(SRC_PACKAGES[:sphinx], src_dir)
|
22
|
-
deprec2.install_from_src(SRC_PACKAGES[:sphinx], src_dir)
|
23
|
-
end
|
24
|
-
|
25
|
-
# install dependencies for sphinx
|
26
|
-
task :install_deps do
|
27
|
-
# apt.install( {:base => %w(blah)}, :stable )
|
28
|
-
end
|
29
|
-
|
30
|
-
SYSTEM_CONFIG_FILES[:sphinx] = []
|
31
|
-
|
32
|
-
PROJECT_CONFIG_FILES[:sphinx] = [
|
33
|
-
|
34
|
-
{:template => 'monit.conf.erb',
|
35
|
-
:path => 'monit.conf',
|
36
|
-
:mode => 0644,
|
37
|
-
:owner => 'root:root'}
|
38
|
-
|
39
|
-
]
|
40
|
-
|
41
|
-
desc <<-DESC
|
42
|
-
Generate sphinx config from template. Note that this does not
|
43
|
-
push the config to the server, it merely generates required
|
44
|
-
configuration files. These should be kept under source control.
|
45
|
-
The can be pushed to the server with the :config task.
|
46
|
-
DESC
|
47
|
-
task :config_gen do
|
48
|
-
PROJECT_CONFIG_FILES[:sphinx].each do |file|
|
49
|
-
deprec2.render_template(:sphinx, file)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
desc "Push sphinx config files to server"
|
54
|
-
task :config, :roles => :sphinx do
|
55
|
-
config_project
|
56
|
-
end
|
57
|
-
|
58
|
-
desc "Push sphinx config files to server"
|
59
|
-
task :config_project, :roles => :sphinx do
|
60
|
-
deprec2.push_configs(:sphinx, PROJECT_CONFIG_FILES[:sphinx])
|
61
|
-
symlink_monit_config
|
62
|
-
end
|
63
|
-
|
64
|
-
task :symlink_monit_config, :roles => :sphinx do
|
65
|
-
sudo "ln -sf #{deploy_to}/sphinx/monit.conf #{monit_confd_dir}/sphinx_#{application}.conf"
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
# Control
|
70
|
-
|
71
|
-
desc "Restart the sphinx searchd daemon"
|
72
|
-
task :restart, :roles => :app do
|
73
|
-
run("cd #{deploy_to}/current; /usr/bin/rake us:start") ### start or restart? SUDO ? ###
|
74
|
-
end
|
75
|
-
|
76
|
-
desc "Regenerate / Rotate the search index."
|
77
|
-
task :reindex, :roles => :app do
|
78
|
-
run("cd #{deploy_to}/current; /usr/bin/rake us:in") ### SUDO ? ###
|
79
|
-
end
|
80
|
-
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
# ultrasphinx deployment notes
|
86
|
-
# http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/DEPLOYMENT_NOTES.html
|