le1t0-deprec 2.1.6.001
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +444 -0
- data/COPYING +19 -0
- data/LICENSE +339 -0
- data/README +154 -0
- data/THANKS +17 -0
- data/bin/depify +139 -0
- data/docs/EXAMPLE-installing_tracks.txt +41 -0
- data/docs/README.nagios +22 -0
- data/docs/README.rails +17 -0
- data/docs/config_gen_explained.txt +39 -0
- data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
- data/docs/deprec-1.x/notes.txt +12 -0
- data/docs/old/deprec_banner.gif +0 -0
- data/docs/windows_linux.txt +350 -0
- data/docs/xen/traffic_monitoring_with_vnstat.txt +95 -0
- data/docs/xen/xen-tools-notes.txt +31 -0
- data/docs/xen/xen_on_hardy.txt +39 -0
- data/lib/deprec.rb +42 -0
- data/lib/deprec/capistrano_extensions.rb +446 -0
- data/lib/deprec/recipes.rb +7 -0
- data/lib/deprec/recipes/aoe.rb +79 -0
- data/lib/deprec/recipes/app/mongrel.rb +213 -0
- data/lib/deprec/recipes/app/passenger.rb +190 -0
- data/lib/deprec/recipes/ar_sendmail.rb +67 -0
- data/lib/deprec/recipes/aspell.rb +22 -0
- data/lib/deprec/recipes/canonical.rb +68 -0
- data/lib/deprec/recipes/cap.rb +39 -0
- data/lib/deprec/recipes/chef.rb +68 -0
- data/lib/deprec/recipes/collectd.rb +112 -0
- data/lib/deprec/recipes/db/couchdb.rb +107 -0
- data/lib/deprec/recipes/db/mysql.rb +194 -0
- data/lib/deprec/recipes/db/postgresql.rb +104 -0
- data/lib/deprec/recipes/db/sqlite.rb +37 -0
- data/lib/deprec/recipes/ddclient.rb +51 -0
- data/lib/deprec/recipes/deprec.rb +167 -0
- data/lib/deprec/recipes/deprecated.rb +71 -0
- data/lib/deprec/recipes/drbd.rb +137 -0
- data/lib/deprec/recipes/dummy.rb +22 -0
- data/lib/deprec/recipes/example.rb +115 -0
- data/lib/deprec/recipes/git.rb +97 -0
- data/lib/deprec/recipes/gitosis.rb.disabled +55 -0
- data/lib/deprec/recipes/glusterfs.rb +176 -0
- data/lib/deprec/recipes/god.rb +70 -0
- data/lib/deprec/recipes/haproxy.rb +115 -0
- data/lib/deprec/recipes/heartbeat.rb +138 -0
- data/lib/deprec/recipes/imagemagick/imagemagick_bin.rb +24 -0
- data/lib/deprec/recipes/imagemagick/imagemagick_src.rb +39 -0
- data/lib/deprec/recipes/integrity.rb +108 -0
- data/lib/deprec/recipes/iptables.rb +94 -0
- data/lib/deprec/recipes/java.rb +23 -0
- data/lib/deprec/recipes/keepalived.rb +78 -0
- data/lib/deprec/recipes/ldap.rb +52 -0
- data/lib/deprec/recipes/logrotate.rb +56 -0
- data/lib/deprec/recipes/lvm.rb +20 -0
- data/lib/deprec/recipes/memcache.rb +49 -0
- data/lib/deprec/recipes/mongodb.rb +94 -0
- data/lib/deprec/recipes/monit.rb +135 -0
- data/lib/deprec/recipes/mysql_proxy.rb +67 -0
- data/lib/deprec/recipes/nagios.rb +361 -0
- data/lib/deprec/recipes/network.rb +116 -0
- data/lib/deprec/recipes/ntp.rb +103 -0
- data/lib/deprec/recipes/php.rb +58 -0
- data/lib/deprec/recipes/postfix.rb +115 -0
- data/lib/deprec/recipes/profiles.rb +125 -0
- data/lib/deprec/recipes/raid/amcc_3ware.rb +21 -0
- data/lib/deprec/recipes/rails.rb +330 -0
- data/lib/deprec/recipes/redhat_cluster.rb +228 -0
- data/lib/deprec/recipes/redis.rb +90 -0
- data/lib/deprec/recipes/ruby/mri.rb +55 -0
- data/lib/deprec/recipes/ruby/ree.rb +40 -0
- data/lib/deprec/recipes/rvm.rb +32 -0
- data/lib/deprec/recipes/s3utils.rb +63 -0
- data/lib/deprec/recipes/sphinx/thinking_sphinx.rb +105 -0
- data/lib/deprec/recipes/sphinx/ultrasphinx.rb +86 -0
- data/lib/deprec/recipes/ssh.rb +147 -0
- data/lib/deprec/recipes/ssl.rb +56 -0
- data/lib/deprec/recipes/starling.rb +119 -0
- data/lib/deprec/recipes/svn.rb +171 -0
- data/lib/deprec/recipes/syslog.rb +63 -0
- data/lib/deprec/recipes/trac.rb.disabled +277 -0
- data/lib/deprec/recipes/tsung.rb +74 -0
- data/lib/deprec/recipes/ubuntu.rb +90 -0
- data/lib/deprec/recipes/users.rb +90 -0
- data/lib/deprec/recipes/utils.rb +58 -0
- data/lib/deprec/recipes/vnstat.rb +85 -0
- data/lib/deprec/recipes/web/apache.rb +143 -0
- data/lib/deprec/recipes/web/nginx.rb +172 -0
- data/lib/deprec/recipes/wordpress.rb.notworking +96 -0
- data/lib/deprec/recipes/wpmu.rb +103 -0
- data/lib/deprec/recipes/xen.rb +364 -0
- data/lib/deprec/recipes/xentools.rb +101 -0
- data/lib/deprec/recipes_minus_rails.rb +125 -0
- data/lib/deprec/templates/aoe/aoe-init +55 -0
- data/lib/deprec/templates/aoe/fence_aoemask +351 -0
- data/lib/deprec/templates/apache/namevirtualhosts.conf +5 -0
- data/lib/deprec/templates/apache/ports.conf.erb +5 -0
- data/lib/deprec/templates/apache/status.conf.erb +17 -0
- data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
- data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
- data/lib/deprec/templates/chef/chef.json.erb +1 -0
- data/lib/deprec/templates/chef/solo.rb +2 -0
- data/lib/deprec/templates/collectd/collectd-init.d +153 -0
- data/lib/deprec/templates/collectd/collectd.conf.erb +686 -0
- data/lib/deprec/templates/ddclient/ddclient.conf.erb +11 -0
- data/lib/deprec/templates/ddclient/ddclient.erb +15 -0
- data/lib/deprec/templates/deprec/caprc.erb +14 -0
- data/lib/deprec/templates/drbd/drbd.conf.erb +531 -0
- data/lib/deprec/templates/glusterfs/glusterfsd-init.erb +95 -0
- data/lib/deprec/templates/gnbd_client/cluster.conf.erb +21 -0
- data/lib/deprec/templates/gnbd_client/clvm-default.erb +3 -0
- data/lib/deprec/templates/gnbd_client/cman-default.erb +6 -0
- data/lib/deprec/templates/gnbd_client/gnbdimports.conf.erb +1 -0
- data/lib/deprec/templates/gnbd_server/cluster.conf.erb +20 -0
- data/lib/deprec/templates/gnbd_server/clvm-default.erb +3 -0
- data/lib/deprec/templates/gnbd_server/cman-default.erb +6 -0
- data/lib/deprec/templates/gnbd_server/gnbd-server-default.erb +1 -0
- data/lib/deprec/templates/gnbd_server/gnbdexports.conf.erb +1 -0
- data/lib/deprec/templates/god/god-conf.erb +2 -0
- data/lib/deprec/templates/god/god-init.erb +47 -0
- data/lib/deprec/templates/haproxy/haproxy-init.d +120 -0
- data/lib/deprec/templates/haproxy/haproxy.cfg.erb +31 -0
- data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
- data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
- data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
- data/lib/deprec/templates/integrity/apache_vhost.erb +4 -0
- data/lib/deprec/templates/integrity/config.ru.erb +21 -0
- data/lib/deprec/templates/integrity/config.yml.erb +43 -0
- data/lib/deprec/templates/iptables/firewall-default.erb +13 -0
- data/lib/deprec/templates/iptables/firewall-init.erb +171 -0
- data/lib/deprec/templates/keepalived/keepalived.conf.erb +18 -0
- data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
- data/lib/deprec/templates/mongodb/mongodb-init.d +88 -0
- data/lib/deprec/templates/mongrel/apache_vhost.conf.erb +148 -0
- data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
- data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
- data/lib/deprec/templates/mongrel/nginx_vhost.conf.erb +41 -0
- data/lib/deprec/templates/monit/monit-init-script +104 -0
- data/lib/deprec/templates/monit/monitrc.erb +250 -0
- data/lib/deprec/templates/monit/nothing.monitrc +0 -0
- data/lib/deprec/templates/mysql/create_databases.sql +20 -0
- data/lib/deprec/templates/mysql/database.yml.prod +6 -0
- data/lib/deprec/templates/mysql/database.yml.stage +6 -0
- data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
- data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
- data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
- data/lib/deprec/templates/mysql_proxy/mysql-proxy-default.erb +4 -0
- data/lib/deprec/templates/nagios/README +32 -0
- data/lib/deprec/templates/nagios/cgi.cfg.erb +357 -0
- data/lib/deprec/templates/nagios/check_linux_free_memory.pl +118 -0
- data/lib/deprec/templates/nagios/check_mongrel_cluster.rb +82 -0
- data/lib/deprec/templates/nagios/htpasswd.users +1 -0
- data/lib/deprec/templates/nagios/mrtg.cfg +180 -0
- data/lib/deprec/templates/nagios/nagios.cfg.erb +1325 -0
- data/lib/deprec/templates/nagios/nrpe.cfg.erb +222 -0
- data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
- data/lib/deprec/templates/nagios/objects/commands.cfg.erb +265 -0
- data/lib/deprec/templates/nagios/objects/contacts.cfg.erb +89 -0
- data/lib/deprec/templates/nagios/objects/hosts.cfg.erb +114 -0
- data/lib/deprec/templates/nagios/objects/localhost.cfg.erb +116 -0
- data/lib/deprec/templates/nagios/objects/services.cfg.erb +165 -0
- data/lib/deprec/templates/nagios/objects/timeperiods.cfg.erb +94 -0
- data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
- data/lib/deprec/templates/network/hostname.erb +1 -0
- data/lib/deprec/templates/network/hosts.erb +2 -0
- data/lib/deprec/templates/network/interfaces.erb +18 -0
- data/lib/deprec/templates/network/resolv.conf.erb +6 -0
- data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
- data/lib/deprec/templates/nginx/mime.types.erb +70 -0
- data/lib/deprec/templates/nginx/nginx-init-script +62 -0
- data/lib/deprec/templates/nginx/nginx.conf.erb +125 -0
- data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
- data/lib/deprec/templates/nginx/nothing.conf +1 -0
- data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +41 -0
- data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
- data/lib/deprec/templates/passenger/apache_vhost.erb +29 -0
- data/lib/deprec/templates/passenger/logrotate.conf.erb +12 -0
- data/lib/deprec/templates/passenger/passenger.conf.erb +21 -0
- data/lib/deprec/templates/passenger/passenger.load.erb +3 -0
- data/lib/deprec/templates/postfix/aliases.erb +3 -0
- data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
- data/lib/deprec/templates/postfix/main.cf.erb +36 -0
- data/lib/deprec/templates/postfix/master.cf.erb +77 -0
- data/lib/deprec/templates/redis/redis-conf.erb +132 -0
- data/lib/deprec/templates/redis/redis-init.erb +50 -0
- data/lib/deprec/templates/s3utils/s3cfg +35 -0
- data/lib/deprec/templates/s3utils/s3config.yml +3 -0
- data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
- data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
- data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
- data/lib/deprec/templates/ssl/make-ssl-cert +138 -0
- data/lib/deprec/templates/ssl/ssl-cert-snakeoil.key +15 -0
- data/lib/deprec/templates/ssl/ssl-cert-snakeoil.pem +19 -0
- data/lib/deprec/templates/starling/monit.conf.erb +14 -0
- data/lib/deprec/templates/starling/starling-init-script.erb +71 -0
- data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
- data/lib/deprec/templates/syslog/syslog.conf.erb +71 -0
- data/lib/deprec/templates/syslog/syslogd.erb +13 -0
- data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
- data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
- data/lib/deprec/templates/trac/trac.ini.erb +169 -0
- data/lib/deprec/templates/trac/trac_deprec.png +0 -0
- data/lib/deprec/templates/trac/tracd-init.erb +43 -0
- data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
- data/lib/deprec/templates/tsung/tsung.xml.erb +47 -0
- data/lib/deprec/templates/vnstat/config.php +57 -0
- data/lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb +31 -0
- data/lib/deprec/templates/wordpress/wp-config.php.erb +31 -0
- data/lib/deprec/templates/wpmu/apache_vhost.conf.erb +13 -0
- data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
- data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
- data/lib/deprec/templates/xen/xend-init.erb +57 -0
- data/lib/deprec/templates/xen/xendomains.erb +137 -0
- data/lib/deprec/templates/xentools/100-ubuntu-setup +26 -0
- data/lib/deprec/templates/xentools/15-disable-hwclock +40 -0
- data/lib/deprec/templates/xentools/30-disable-gettys +57 -0
- data/lib/deprec/templates/xentools/31-ubuntu-setup +32 -0
- data/lib/deprec/templates/xentools/40-setup-networking +145 -0
- data/lib/deprec/templates/xentools/98-custom +17 -0
- data/lib/deprec/templates/xentools/xen-tools.conf.erb +278 -0
- data/lib/deprec/templates/xentools/xm.tmpl.erb +138 -0
- data/lib/deprec_cmd_completion.sh +26 -0
- data/lib/deprec_minus_rails.rb +12 -0
- data/lib/vmbuilder_plugins/all.rb +20 -0
- data/lib/vmbuilder_plugins/apt.rb +93 -0
- data/lib/vmbuilder_plugins/emerge.rb +76 -0
- data/lib/vmbuilder_plugins/gem.rb +100 -0
- data/lib/vmbuilder_plugins/std.rb +203 -0
- metadata +304 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
[default]
|
2
|
+
access_key = <%= s3utils_access_key %>
|
3
|
+
acl_public = False
|
4
|
+
bucket_location = <%= s3utils_bucket_location %>
|
5
|
+
cloudfront_host = cloudfront.amazonaws.com
|
6
|
+
cloudfront_resource = /2008-06-30/distribution
|
7
|
+
default_mime_type = binary/octet-stream
|
8
|
+
delete_removed = False
|
9
|
+
dry_run = False
|
10
|
+
encoding = ANSI_X3.4-1968
|
11
|
+
encrypt = False
|
12
|
+
force = False
|
13
|
+
get_continue = False
|
14
|
+
gpg_command = /usr/bin/gpg
|
15
|
+
gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
|
16
|
+
gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
|
17
|
+
gpg_passphrase = <%= s3utils_passphrase %>
|
18
|
+
guess_mime_type = True
|
19
|
+
host_base = s3.amazonaws.com
|
20
|
+
host_bucket = %(bucket)s.s3.amazonaws.com
|
21
|
+
human_readable_sizes = False
|
22
|
+
list_md5 = False
|
23
|
+
preserve_attrs = True
|
24
|
+
progress_meter = True
|
25
|
+
proxy_host =
|
26
|
+
proxy_port = 0
|
27
|
+
recursive = False
|
28
|
+
recv_chunk = 4096
|
29
|
+
secret_key = <%= s3utils_secret_key %>
|
30
|
+
send_chunk = 4096
|
31
|
+
simpledb_host = sdb.amazonaws.com
|
32
|
+
skip_existing = False
|
33
|
+
urlencoding_mode = normal
|
34
|
+
use_https = True
|
35
|
+
verbosity = WARNING
|
@@ -0,0 +1,5 @@
|
|
1
|
+
check process searchd with pidfile /opt/local/var/db/sphinx/log/searchd.pid
|
2
|
+
start program = "/usr/local/bin/searchd --config <%= deploy_to %>/current/config/ultrasphinx/production.conf"
|
3
|
+
stop program = "/usr/local/bin/searchd --stop --config <%= deploy_to %>/current/config/ultrasphinx/production.conf"
|
4
|
+
|
5
|
+
if 3 restarts within 5 cycles then timeout
|
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
# This is the ssh client system-wide configuration file. See
|
3
|
+
# ssh_config(5) for more information. This file provides defaults for
|
4
|
+
# users, and the values can be changed in per-user configuration files
|
5
|
+
# or on the command line.
|
6
|
+
|
7
|
+
# Configuration data is parsed as follows:
|
8
|
+
# 1. command line options
|
9
|
+
# 2. user-specific file
|
10
|
+
# 3. system-wide file
|
11
|
+
# Any configuration value is only changed the first time it is set.
|
12
|
+
# Thus, host-specific definitions should be at the beginning of the
|
13
|
+
# configuration file, and defaults at the end.
|
14
|
+
|
15
|
+
# Site-wide defaults for some commonly used options. For a comprehensive
|
16
|
+
# list of available options, their meanings and defaults, please see the
|
17
|
+
# ssh_config(5) man page.
|
18
|
+
|
19
|
+
Host *
|
20
|
+
ForwardAgent yes
|
21
|
+
# ForwardX11 no
|
22
|
+
# ForwardX11Trusted yes
|
23
|
+
# RhostsRSAAuthentication no
|
24
|
+
# RSAAuthentication yes
|
25
|
+
# PasswordAuthentication yes
|
26
|
+
# HostbasedAuthentication no
|
27
|
+
# GSSAPIAuthentication no
|
28
|
+
# GSSAPIDelegateCredentials no
|
29
|
+
# GSSAPIKeyExchange no
|
30
|
+
# GSSAPITrustDNS no
|
31
|
+
# BatchMode no
|
32
|
+
# CheckHostIP yes
|
33
|
+
# AddressFamily any
|
34
|
+
# ConnectTimeout 0
|
35
|
+
# StrictHostKeyChecking ask
|
36
|
+
# IdentityFile ~/.ssh/identity
|
37
|
+
# IdentityFile ~/.ssh/id_rsa
|
38
|
+
# IdentityFile ~/.ssh/id_dsa
|
39
|
+
# Port 22
|
40
|
+
# Protocol 2,1
|
41
|
+
# Cipher 3des
|
42
|
+
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
|
43
|
+
# EscapeChar ~
|
44
|
+
# Tunnel no
|
45
|
+
# TunnelDevice any:any
|
46
|
+
# PermitLocalCommand no
|
47
|
+
SendEnv LANG LC_*
|
48
|
+
HashKnownHosts yes
|
49
|
+
GSSAPIAuthentication yes
|
50
|
+
GSSAPIDelegateCredentials no
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Package generated configuration file
|
2
|
+
# See the sshd(8) manpage for details
|
3
|
+
|
4
|
+
# What ports, IPs and protocols we listen for
|
5
|
+
Port 22
|
6
|
+
# Use these options to restrict which interfaces/protocols sshd will bind to
|
7
|
+
#ListenAddress ::
|
8
|
+
#ListenAddress 0.0.0.0
|
9
|
+
Protocol 2
|
10
|
+
# HostKeys for protocol version 2
|
11
|
+
HostKey /etc/ssh/ssh_host_rsa_key
|
12
|
+
HostKey /etc/ssh/ssh_host_dsa_key
|
13
|
+
#Privilege Separation is turned on for security
|
14
|
+
UsePrivilegeSeparation yes
|
15
|
+
|
16
|
+
# Lifetime and size of ephemeral version 1 server key
|
17
|
+
KeyRegenerationInterval 3600
|
18
|
+
ServerKeyBits 768
|
19
|
+
|
20
|
+
# Logging
|
21
|
+
SyslogFacility AUTH
|
22
|
+
LogLevel INFO
|
23
|
+
|
24
|
+
# Authentication:
|
25
|
+
LoginGraceTime 120
|
26
|
+
PermitRootLogin no
|
27
|
+
StrictModes yes
|
28
|
+
|
29
|
+
RSAAuthentication yes
|
30
|
+
PubkeyAuthentication yes
|
31
|
+
#AuthorizedKeysFile %h/.ssh/authorized_keys
|
32
|
+
|
33
|
+
# Don't read the user's ~/.rhosts and ~/.shosts files
|
34
|
+
IgnoreRhosts yes
|
35
|
+
# For this to work you will also need host keys in /etc/ssh_known_hosts
|
36
|
+
RhostsRSAAuthentication no
|
37
|
+
# similar for protocol version 2
|
38
|
+
HostbasedAuthentication no
|
39
|
+
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
|
40
|
+
#IgnoreUserKnownHosts yes
|
41
|
+
|
42
|
+
# To enable empty passwords, change to yes (NOT RECOMMENDED)
|
43
|
+
PermitEmptyPasswords no
|
44
|
+
|
45
|
+
# Change to yes to enable challenge-response passwords (beware issues with
|
46
|
+
# some PAM modules and threads)
|
47
|
+
ChallengeResponseAuthentication no
|
48
|
+
|
49
|
+
# Change to no to disable tunnelled clear text passwords
|
50
|
+
PasswordAuthentication no
|
51
|
+
|
52
|
+
# Kerberos options
|
53
|
+
#KerberosAuthentication no
|
54
|
+
#KerberosGetAFSToken no
|
55
|
+
#KerberosOrLocalPasswd yes
|
56
|
+
#KerberosTicketCleanup yes
|
57
|
+
|
58
|
+
# GSSAPI options
|
59
|
+
#GSSAPIAuthentication no
|
60
|
+
#GSSAPICleanupCredentials yes
|
61
|
+
|
62
|
+
X11Forwarding yes
|
63
|
+
X11DisplayOffset 10
|
64
|
+
PrintMotd no
|
65
|
+
PrintLastLog yes
|
66
|
+
TCPKeepAlive yes
|
67
|
+
#UseLogin no
|
68
|
+
|
69
|
+
#MaxStartups 10:30:60
|
70
|
+
#Banner /etc/issue.net
|
71
|
+
|
72
|
+
# Allow client to pass locale environment variables
|
73
|
+
AcceptEnv LANG LC_*
|
74
|
+
|
75
|
+
Subsystem sftp /usr/lib/openssh/sftp-server
|
76
|
+
|
77
|
+
UsePAM no
|
78
|
+
UseDNS no
|
@@ -0,0 +1,138 @@
|
|
1
|
+
#!/bin/bash -e
|
2
|
+
# This is a mockup of a script to produce a snakeoil cert
|
3
|
+
# The aim is to have a debconfisable ssl-certificate script
|
4
|
+
|
5
|
+
. /usr/share/debconf/confmodule
|
6
|
+
db_version 2.0
|
7
|
+
db_capb backup
|
8
|
+
|
9
|
+
ask_via_debconf() {
|
10
|
+
db_settitle make-ssl-cert/title
|
11
|
+
|
12
|
+
templates="countryname statename localityname organisationname ouname hostname email"
|
13
|
+
|
14
|
+
for i in $templates; do
|
15
|
+
RET=""
|
16
|
+
while [ "x$RET" = "x" ]; do
|
17
|
+
db_fset make-ssl-cert/$i seen false
|
18
|
+
db_input high make-ssl-cert/$i || true
|
19
|
+
db_go
|
20
|
+
db_get make-ssl-cert/$i
|
21
|
+
done
|
22
|
+
done
|
23
|
+
|
24
|
+
db_get make-ssl-cert/countryname
|
25
|
+
CountryName="$RET"
|
26
|
+
db_fset make-ssl-cert/countryname seen false
|
27
|
+
|
28
|
+
db_get make-ssl-cert/statename
|
29
|
+
StateName="$RET"
|
30
|
+
db_fset make-ssl-cert/statename seen false
|
31
|
+
|
32
|
+
db_get make-ssl-cert/localityname
|
33
|
+
LocalityName="$RET"
|
34
|
+
db_fset make-ssl-cert/localityname seen false
|
35
|
+
|
36
|
+
db_get make-ssl-cert/organisationname
|
37
|
+
OrganisationName="$RET"
|
38
|
+
db_fset make-ssl-cert/organisationname seen false
|
39
|
+
|
40
|
+
db_get make-ssl-cert/ouname
|
41
|
+
OUName="$RET"
|
42
|
+
db_fset make-ssl-cert/ouname seen false
|
43
|
+
|
44
|
+
db_get make-ssl-cert/hostname
|
45
|
+
HostName="$RET"
|
46
|
+
db_fset make-ssl-cert/hostname seen false
|
47
|
+
|
48
|
+
db_get make-ssl-cert/email
|
49
|
+
Email="$RET"
|
50
|
+
db_fset make-ssl-cert/email seen false
|
51
|
+
}
|
52
|
+
|
53
|
+
make_snakeoil() {
|
54
|
+
CountryName="XX"
|
55
|
+
StateName="There is no such thing outside US"
|
56
|
+
LocalityName="Everywhere"
|
57
|
+
OrganisationName="OCOSA"
|
58
|
+
OUName="Office for Complication of Otherwise Simple Affairs"
|
59
|
+
HostName="$(hostname -f || hostname)"
|
60
|
+
Email="root@$HostName"
|
61
|
+
}
|
62
|
+
|
63
|
+
create_temporary_cnf() {
|
64
|
+
sed -e s#@CountryName@#"$CountryName"# \
|
65
|
+
-e s#@StateName@#"$StateName"# \
|
66
|
+
-e s#@LocalityName@#"$LocalityName"# \
|
67
|
+
-e s#@OrganisationName@#"$OrganisationName"# \
|
68
|
+
-e s#@OUName@#"$OUName"# \
|
69
|
+
-e s#@HostName@#"$HostName"# \
|
70
|
+
-e s#@Email@#"$Email"# \
|
71
|
+
$template > $TMPFILE
|
72
|
+
}
|
73
|
+
|
74
|
+
# Takes two arguments, the base layout and the output cert.
|
75
|
+
|
76
|
+
if [ $# -lt 2 ] && [ "$1" != "generate-default-snakeoil" ]; then
|
77
|
+
printf "Usage: $0 template output [--force-overwrite]\n";
|
78
|
+
printf "Usage: $0 generate-default-snakeoil [--force-overwrite]\n";
|
79
|
+
exit 1;
|
80
|
+
fi
|
81
|
+
|
82
|
+
if [ "$1" != "generate-default-snakeoil" ]; then
|
83
|
+
template="$1"
|
84
|
+
output="$2"
|
85
|
+
# be anal in manual mode.
|
86
|
+
if [ ! -f $template ]; then
|
87
|
+
printf "Could not open template file: $template!\n";
|
88
|
+
exit 1;
|
89
|
+
fi
|
90
|
+
if [ -f $output ] && [ "$3" != "--force-overwrite" ]; then
|
91
|
+
printf "$output file already exists!\n";
|
92
|
+
exit 1;
|
93
|
+
fi
|
94
|
+
ask_via_debconf
|
95
|
+
else
|
96
|
+
template="/usr/share/ssl-cert/ssleay.cnf"
|
97
|
+
if [ -f "/etc/ssl/certs/ssl-cert-snakeoil.pem" ] && [ -f "/etc/ssl/private/ssl-cert-snakeoil.key" ]; then
|
98
|
+
if [ "$2" != "--force-overwrite" ]; then
|
99
|
+
exit 0
|
100
|
+
fi
|
101
|
+
fi
|
102
|
+
make_snakeoil
|
103
|
+
fi
|
104
|
+
|
105
|
+
# # should be a less common char
|
106
|
+
# problem is that openssl virtually accepts everything and we need to
|
107
|
+
# sacrifice one char.
|
108
|
+
|
109
|
+
TMPFILE="$(mktemp)" || exit 1
|
110
|
+
|
111
|
+
create_temporary_cnf
|
112
|
+
|
113
|
+
# create the certiface.
|
114
|
+
|
115
|
+
export RANDFILE=/dev/random
|
116
|
+
|
117
|
+
if [ "$1" != "generate-default-snakeoil" ]; then
|
118
|
+
# openssl req -config $TMPFILE -new -x509 -nodes -out $output -keyout $output > /dev/null 2>&1
|
119
|
+
openssl req -config $TMPFILE -new -x509 -days 365 -nodes -out $output -keyout $output > /dev/null 2>&1
|
120
|
+
chmod 600 $output
|
121
|
+
# hash symlink
|
122
|
+
cd $(dirname $output)
|
123
|
+
ln -sf $(basename $output) $(openssl x509 -hash -noout -in $output)
|
124
|
+
else
|
125
|
+
# openssl req -config $TMPFILE -new -x509 -nodes \
|
126
|
+
openssl req -config $TMPFILE -new -x509 -days 365 nodes \
|
127
|
+
-out /etc/ssl/certs/ssl-cert-snakeoil.pem \
|
128
|
+
-keyout /etc/ssl/private/ssl-cert-snakeoil.key > /dev/null 2>&1
|
129
|
+
chmod 644 /etc/ssl/certs/ssl-cert-snakeoil.pem
|
130
|
+
chmod 640 /etc/ssl/private/ssl-cert-snakeoil.key
|
131
|
+
chown root:ssl-cert /etc/ssl/private/ssl-cert-snakeoil.key
|
132
|
+
# hash symlink
|
133
|
+
cd /etc/ssl/certs/
|
134
|
+
ln -sf ssl-cert-snakeoil.pem $(openssl x509 -hash -noout -in ssl-cert-snakeoil.pem)
|
135
|
+
fi
|
136
|
+
|
137
|
+
# cleanup
|
138
|
+
rm -f $TMPFILE
|
@@ -0,0 +1,15 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIICXwIBAAKBgQDAq435f/QmKkc/Z3UDPxcdZM0XNNFE97DGSFJIjuKdJaLp+HDr
|
3
|
+
JroV1TS8YUpZpJ7FhuasEg9G+HcwZcncChWgiwXnwMxG/6zs4U+7SzaehpB0lfCp
|
4
|
+
8jYHNwhaUDr5H4YSfznltGQRlELlSHNLyDgQzRwMjWluTpxJ2MXMcKXCvQIDAQAB
|
5
|
+
AoGBAI7kbQZW1F8dyfuHIixHNUByivykCnSI8s0LxCLV/dGooRu/SxfLgAVDO7pe
|
6
|
+
uYKkabB7bUa+mh/7lIILa9tKi2Bbqnr+DZyCmKqQn3YBsc6yS19zMDhkt+UfhQc9
|
7
|
+
3/ssdASGCQg3cW7Y3x103S+j3zB6dmO44vDOevDymVg8z//tAkEA9kmlwavZ5sKq
|
8
|
+
fLYCz7edp7hCcOL1QO/iwKMlnyGLOhg5sgwHu8o/+5OHlWLGAln0Z6Q6XEdWw9pD
|
9
|
+
LDxPntmAawJBAMhEnvHjPLAN8oSnrLsklBC6N77t3TNt5e+1SSeGhfgZcw3m2ftE
|
10
|
+
jPNgdcu9+JTgGD9yV6u1FWQReG/saYlRc3cCQQCUP8an6qLydbEb+o98q0EaCR7t
|
11
|
+
RqBsYzlxzYLC4/Ujlht8oiMxlc+nxqkxcdBQ8AbfMAr1Kvf+Um5mvTMMIk5bAkEA
|
12
|
+
uOHQspILtqRJnXmGFwZ/wqmHSTYinZX5TkBYFqs0BoTIGK9j0XnJfe0xEjSAxj/T
|
13
|
+
Ys9WbGgyJT2TqA/ipiiRpQJBAMYFGlBV6/zNaX0u1vm2E8/96jl7FAxA06F2OiBn
|
14
|
+
lWtdmT+adpNo04XyX61N5+ie0A2SOgKpZWomm0wA1SGi7TQ=
|
15
|
+
-----END RSA PRIVATE KEY-----
|
@@ -0,0 +1,19 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIDCzCCAnQCCQDHermh7psBnzANBgkqhkiG9w0BAQUFADCByTELMAkGA1UEBhMC
|
3
|
+
WFgxKjAoBgNVBAgTIVRoZXJlIGlzIG5vIHN1Y2ggdGhpbmcgb3V0c2lkZSBVUzET
|
4
|
+
MBEGA1UEBxMKRXZlcnl3aGVyZTEOMAwGA1UEChMFT0NPU0ExPDA6BgNVBAsTM09m
|
5
|
+
ZmljZSBmb3IgQ29tcGxpY2F0aW9uIG9mIE90aGVyd2lzZSBTaW1wbGUgQWZmYWly
|
6
|
+
czEPMA0GA1UEAxMGY2FsdmluMRowGAYJKoZIhvcNAQkBFgtyb290QGNhbHZpbjAe
|
7
|
+
Fw0wOTAyMDMwNTExNDdaFw0wOTAzMDUwNTExNDdaMIHJMQswCQYDVQQGEwJYWDEq
|
8
|
+
MCgGA1UECBMhVGhlcmUgaXMgbm8gc3VjaCB0aGluZyBvdXRzaWRlIFVTMRMwEQYD
|
9
|
+
VQQHEwpFdmVyeXdoZXJlMQ4wDAYDVQQKEwVPQ09TQTE8MDoGA1UECxMzT2ZmaWNl
|
10
|
+
IGZvciBDb21wbGljYXRpb24gb2YgT3RoZXJ3aXNlIFNpbXBsZSBBZmZhaXJzMQ8w
|
11
|
+
DQYDVQQDEwZjYWx2aW4xGjAYBgkqhkiG9w0BCQEWC3Jvb3RAY2FsdmluMIGfMA0G
|
12
|
+
CSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAq435f/QmKkc/Z3UDPxcdZM0XNNFE97DG
|
13
|
+
SFJIjuKdJaLp+HDrJroV1TS8YUpZpJ7FhuasEg9G+HcwZcncChWgiwXnwMxG/6zs
|
14
|
+
4U+7SzaehpB0lfCp8jYHNwhaUDr5H4YSfznltGQRlELlSHNLyDgQzRwMjWluTpxJ
|
15
|
+
2MXMcKXCvQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADZ2Uu123BHOGow9C5lnxP3K
|
16
|
+
nkVpfqOTvVztyOtTVE+GZrCiFj4RyuJpL9JmpXTo+Dl8CrTguxbhnSPFQCYdmIbj
|
17
|
+
zYGygWx4a0qfKdVe4GMREWzsBVCwH0mPEV6i0nxy4KMffNcTKwhSoh3LZ0rWhoYr
|
18
|
+
gb3pgta67aRdAaIS556W
|
19
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1,14 @@
|
|
1
|
+
check process starling-<%= starling_port %> with pidfile <%= starling_run_dir %>/starling.pid
|
2
|
+
group starling
|
3
|
+
start program = "start-stop-daemon -c <%= starling_user %>:<%= starling_group %> --start --quiet --pidfile <%= starling_run_dir %>/starling.pid --exec /usr/local/bin/starling -- <%= starling_runtime_options %>"
|
4
|
+
stop program = "start-stop-daemon -c <%= starling_user %>:<%= starling_group %> --stop --quiet --pidfile <%= starling_run_dir %>/starling.pid --exec /usr/local/bin/starling -- <%= starling_runtime_options %>"
|
5
|
+
|
6
|
+
if failed host 127.0.0.1 port <%= starling_port %>
|
7
|
+
with timeout 10 seconds
|
8
|
+
then alert
|
9
|
+
|
10
|
+
if totalmem > 100 Mb then restart
|
11
|
+
if cpu > 60% for 2 cycles then alert
|
12
|
+
if cpu > 80% for 5 cycles then restart
|
13
|
+
if loadavg(5min) > 10 for 8 cycles then restart
|
14
|
+
if 3 restarts within 5 cycles then timeout
|
@@ -0,0 +1,71 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
### BEGIN INIT INFO
|
3
|
+
# Provides: starling
|
4
|
+
# Required-Start: $local_fs $remote_fs
|
5
|
+
# Required-Stop: $local_fs $remote_fs
|
6
|
+
# Default-Start: 2 3 4 5
|
7
|
+
# Default-Stop: S 0 1 6
|
8
|
+
# Short-Description: Starling queue server
|
9
|
+
# Description: The Starling distributed, transactional queue server
|
10
|
+
### END INIT INFO
|
11
|
+
# Author: Twitter
|
12
|
+
# Version: 0.9.7.7
|
13
|
+
|
14
|
+
set -e
|
15
|
+
|
16
|
+
DUSER=<%= starling_user %>
|
17
|
+
DGROUP=<%= starling_group %>
|
18
|
+
LOGFILE=<%= starling_log_dir %>/starling.log
|
19
|
+
SPOOLDIR=<%= starling_spool_dir %>
|
20
|
+
PORT=<%= starling_port %>
|
21
|
+
LISTEN=0.0.0.0
|
22
|
+
PIDFILE=<%= starling_run_dir %>/starling.pid
|
23
|
+
|
24
|
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
25
|
+
NAME=starling
|
26
|
+
DESC="Starling"
|
27
|
+
INSTALL_DIR=/usr/local/bin
|
28
|
+
DAEMON=$INSTALL_DIR/$NAME
|
29
|
+
SCRIPTNAME=/etc/init.d/$NAME
|
30
|
+
OPTS="-h $LISTEN -p $PORT -d -q $SPOOLDIR -P $PIDFILE -L $LOGFILE"
|
31
|
+
|
32
|
+
. /lib/lsb/init-functions
|
33
|
+
|
34
|
+
|
35
|
+
# Gracefully exit if the package has been removed.
|
36
|
+
test -x $DAEMON || exit 0
|
37
|
+
|
38
|
+
d_start() {
|
39
|
+
log_begin_msg "Starting Starling Server..."
|
40
|
+
start-stop-daemon -c $DUSER:$DGROUP --start --quiet --pidfile $PIDFILE --exec $DAEMON \
|
41
|
+
-- $OPTS || log_end_msg 1
|
42
|
+
log_end_msg 0
|
43
|
+
}
|
44
|
+
|
45
|
+
d_stop() {
|
46
|
+
log_begin_msg "Stopping Starling Server..."
|
47
|
+
start-stop-daemon -c $DUSER:$DGROUP --stop --quiet --pidfile $PIDFILE \
|
48
|
+
|| log_end_msg 1
|
49
|
+
log_end_msg 0
|
50
|
+
}
|
51
|
+
|
52
|
+
case "$1" in
|
53
|
+
start)
|
54
|
+
d_start
|
55
|
+
;;
|
56
|
+
stop)
|
57
|
+
d_stop
|
58
|
+
;;
|
59
|
+
restart|force-reload|reload)
|
60
|
+
d_stop
|
61
|
+
sleep 2
|
62
|
+
d_start
|
63
|
+
;;
|
64
|
+
*)
|
65
|
+
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
66
|
+
exit 3
|
67
|
+
;;
|
68
|
+
esac
|
69
|
+
|
70
|
+
exit 0
|
71
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<VirtualHost *:80>
|
2
|
+
ServerName <%= @username %>.svn.engineyard.com
|
3
|
+
ServerAdmin admin@engineyard.com
|
4
|
+
|
5
|
+
<Location />
|
6
|
+
DAV svn
|
7
|
+
|
8
|
+
Satisfy Any
|
9
|
+
Require valid-user
|
10
|
+
|
11
|
+
AuthType Basic
|
12
|
+
AuthName "Engine Yard SVN Cluster: <%= @username %>"
|
13
|
+
AuthUserFile /data/svn/<%= @username %>/users
|
14
|
+
|
15
|
+
AuthzSVNAccessFile /data/svn/<%= @username %>/access
|
16
|
+
|
17
|
+
SVNPath /data/svn/<%= @username %>/repo
|
18
|
+
</Location>
|
19
|
+
</VirtualHost>
|
20
|
+
|
21
|
+
<VirtualHost *:443>
|
22
|
+
ServerName <%= @username %>.svn.engineyard.com
|
23
|
+
ServerAdmin admin@engineyard.com
|
24
|
+
|
25
|
+
<Location />
|
26
|
+
DAV svn
|
27
|
+
|
28
|
+
Satisfy Any
|
29
|
+
Require valid-user
|
30
|
+
|
31
|
+
AuthType Basic
|
32
|
+
AuthName "Engine Yard SVN Cluster: <%= @username %>"
|
33
|
+
AuthUserFile /data/svn/<%= @username %>/users
|
34
|
+
|
35
|
+
AuthzSVNAccessFile /data/svn/<%= @username %>/access
|
36
|
+
|
37
|
+
SVNPath /data/svn/<%= @username %>/repo
|
38
|
+
</Location>
|
39
|
+
|
40
|
+
SSLEngine on
|
41
|
+
SSLProtocol all
|
42
|
+
SSLCipherSuite HIGH:MEDIUM
|
43
|
+
</VirtualHost>
|