deprec 1.9.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +280 -0
- data/COPYING +19 -0
- data/LICENSE +339 -0
- data/README +152 -0
- data/THANKS +17 -0
- data/bin/depify +128 -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/{README.quickstart → deprec-1.x/deprec-1.x.quickstart} +4 -1
- data/docs/{building_edge_capistrano.txt → deprec-1.x/notes.txt} +6 -3
- 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 +8 -1
- data/lib/deprec/capistrano_extensions.rb +442 -0
- data/lib/deprec/recipes.rb +50 -233
- data/lib/deprec/recipes/aoe.rb +79 -0
- data/lib/deprec/recipes/app/mongrel.rb +213 -0
- data/lib/deprec/recipes/app/passenger.rb +197 -0
- data/lib/deprec/recipes/apt_mirror.rb +99 -0
- data/lib/deprec/recipes/ar_sendmail.rb +67 -0
- data/lib/deprec/recipes/canonical.rb +68 -0
- data/lib/deprec/recipes/db/mysql.rb +144 -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 +199 -0
- data/lib/deprec/recipes/deprecated.rb +71 -0
- data/lib/deprec/recipes/example.rb +115 -0
- data/lib/deprec/recipes/git.rb +97 -0
- data/lib/deprec/recipes/gitosis.rb +48 -0
- data/lib/deprec/recipes/heartbeat.rb +138 -0
- data/lib/deprec/recipes/logrotate.rb +54 -0
- data/lib/deprec/recipes/lvm.rb +20 -0
- data/lib/deprec/recipes/memcache.rb +6 -2
- data/lib/deprec/recipes/monit.rb +143 -0
- data/lib/deprec/recipes/nagios.rb +305 -0
- data/lib/deprec/recipes/network.rb +93 -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/rails.rb +300 -55
- data/lib/deprec/recipes/ruby/mri.rb +55 -0
- data/lib/deprec/recipes/ruby/ree.rb +41 -0
- data/lib/deprec/recipes/sphinx.rb +86 -0
- data/lib/deprec/recipes/ssh.rb +85 -18
- data/lib/deprec/recipes/ssl.rb +55 -0
- data/lib/deprec/recipes/starling.rb +119 -0
- data/lib/deprec/recipes/svn.rb +163 -183
- data/lib/deprec/recipes/trac.rb +239 -62
- data/lib/deprec/recipes/ubuntu.rb +18 -100
- 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 +119 -0
- data/lib/deprec/recipes/web/nginx.rb +172 -0
- data/lib/deprec/recipes/wordpress.rb +96 -0
- data/lib/deprec/recipes/wpmu.rb +103 -0
- data/lib/deprec/recipes/xen.rb +267 -0
- data/lib/deprec/recipes/xentools.rb +75 -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/apt/sources.list +18 -0
- data/lib/deprec/templates/apt_mirror/apt-mirror-cron +4 -0
- data/lib/deprec/templates/apt_mirror/mirror.list +33 -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/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/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/logrotate/logrotate.conf.erb +32 -0
- data/lib/deprec/templates/mongrel/apache_vhost.erb +148 -0
- data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
- data/lib/deprec/{third_party/mongrel_cluster/resources/mongrel_cluster → templates/mongrel/mongrel_cluster-init-script} +19 -6
- 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.erb +41 -0
- data/lib/deprec/templates/monit/monit-init-script +104 -0
- data/lib/deprec/templates/monit/monitrc.erb +227 -0
- data/lib/deprec/templates/monit/nothing +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/nagios/cgi.cfg.erb +321 -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/commands.cfg.erb +240 -0
- data/lib/deprec/templates/nagios/contacts.cfg.erb +57 -0
- data/lib/deprec/templates/nagios/hosts.cfg.erb +143 -0
- data/lib/deprec/templates/nagios/htpasswd.users +1 -0
- data/lib/deprec/templates/nagios/localhost.cfg.erb +157 -0
- data/lib/deprec/templates/nagios/nagios.cfg.erb +1274 -0
- data/lib/deprec/templates/nagios/nagios_apache_vhost.conf.erb +45 -0
- data/lib/deprec/templates/nagios/nrpe.cfg.erb +210 -0
- data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
- data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
- data/lib/deprec/templates/nagios/services.cfg.erb +79 -0
- data/lib/deprec/templates/nagios/templates.cfg.erb +9 -0
- data/lib/deprec/templates/nagios/timeperiods.cfg.erb +94 -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 +21 -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.conf → postfix/main.cf.erb} +6 -8
- data/lib/deprec/templates/postfix/master.cf.erb +77 -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/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/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/15-disable-hwclock +40 -0
- data/lib/deprec/templates/xentools/40-setup-networking +145 -0
- data/lib/deprec/templates/xentools/xen-tools.conf.erb +276 -0
- data/lib/deprec/templates/xentools/xm.tmpl.erb +138 -0
- data/lib/deprec_cmd_completion.sh +26 -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/{deprec/third_party/vmbuilder/plugins → vmbuilder_plugins}/gem.rb +10 -17
- data/lib/{deprec/third_party/vmbuilder/plugins → vmbuilder_plugins}/std.rb +69 -19
- metadata +204 -55
- data/bin/deprec +0 -35
- data/docs/README.slicehost +0 -14
- data/docs/README.svn_trac +0 -19
- data/lib/deprec/capistrano_extensions/actor_extensions.rb +0 -89
- data/lib/deprec/capistrano_extensions/cli_extensions.rb +0 -38
- data/lib/deprec/capistrano_extensions/deprec_extensions.rb +0 -137
- data/lib/deprec/generators/deprec/USAGE +0 -11
- data/lib/deprec/generators/deprec/deprec_generator.rb +0 -24
- data/lib/deprec/generators/deprec/templates/deploy.rb +0 -90
- data/lib/deprec/generators/loader.rb +0 -20
- data/lib/deprec/recipes/apache.rb +0 -91
- data/lib/deprec/recipes/cache_svn.rb +0 -74
- data/lib/deprec/recipes/vmware.rb +0 -114
- data/lib/deprec/templates/trac.ini.erb +0 -106
- data/lib/deprec/third_party/THIRD_PARTY_README +0 -12
- data/lib/deprec/third_party/mongrel_cluster/LICENSE +0 -506
- data/lib/deprec/third_party/mongrel_cluster/recipes.rb +0 -96
- data/lib/deprec/third_party/railsmachine/LICENSE +0 -506
- data/lib/deprec/third_party/railsmachine/recipes/apache.rb +0 -92
- data/lib/deprec/third_party/railsmachine/recipes/mysql.rb +0 -73
- data/lib/deprec/third_party/railsmachine/recipes/templates/httpd-ssl.conf +0 -80
- data/lib/deprec/third_party/railsmachine/recipes/templates/httpd.conf +0 -57
- data/lib/deprec/third_party/vmbuilder/plugins.rb +0 -8
- data/lib/deprec/third_party/vmbuilder/plugins/apt.rb +0 -144
- data/resources/capistrano_include_dotfiles.patch +0 -17
@@ -0,0 +1,8 @@
|
|
1
|
+
# Postfix dynamic maps configuration file.
|
2
|
+
#
|
3
|
+
# The first match found is the one that is used. Wildcards are not supported
|
4
|
+
# as of postfix 2.0.2
|
5
|
+
#
|
6
|
+
#type location of .so file open function (mkmap func)
|
7
|
+
#==== ================================ ============= ============
|
8
|
+
tcp /usr/lib/postfix/dict_tcp.so dict_tcp_open
|
@@ -1,11 +1,10 @@
|
|
1
1
|
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
|
2
|
-
|
3
|
-
# MODIFICATIONS WILL BE OVERWRITTEN IF YOU RUN THIS SCRIPT AGAIN
|
2
|
+
|
4
3
|
|
5
4
|
# Debian specific: Specifying a file name will cause the first
|
6
5
|
# line of that file to be used as the name. The Debian default
|
7
6
|
# is /etc/mailname.
|
8
|
-
|
7
|
+
myorigin = /etc/mailname
|
9
8
|
|
10
9
|
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
|
11
10
|
biff = no
|
@@ -26,13 +25,12 @@ smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
|
|
26
25
|
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
|
27
26
|
# information on enabling SSL in the smtp client.
|
28
27
|
|
29
|
-
myhostname =
|
28
|
+
# myhostname =
|
30
29
|
alias_maps = hash:/etc/aliases
|
31
30
|
alias_database = hash:/etc/aliases
|
32
|
-
|
33
|
-
|
34
|
-
relayhost =
|
31
|
+
mydestination = $myhostname localhost.$mydomain $myorigin
|
32
|
+
relayhost = <%= postfix_relayhost %>
|
35
33
|
mynetworks = 127.0.0.0/8
|
36
34
|
mailbox_size_limit = 0
|
37
35
|
recipient_delimiter = +
|
38
|
-
inet_interfaces =
|
36
|
+
inet_interfaces = loopback-only
|
@@ -0,0 +1,77 @@
|
|
1
|
+
#
|
2
|
+
# Postfix master process configuration file. For details on the format
|
3
|
+
# of the file, see the master(5) manual page (command: "man 5 master").
|
4
|
+
#
|
5
|
+
# ==========================================================================
|
6
|
+
# service type private unpriv chroot wakeup maxproc command + args
|
7
|
+
# (yes) (yes) (yes) (never) (100)
|
8
|
+
# ==========================================================================
|
9
|
+
smtp inet n - - - - smtpd
|
10
|
+
#submission inet n - - - - smtpd
|
11
|
+
# -o smtpd_enforce_tls=yes
|
12
|
+
# -o smtpd_sasl_auth_enable=yes
|
13
|
+
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
14
|
+
#smtps inet n - - - - smtpd
|
15
|
+
# -o smtpd_tls_wrappermode=yes
|
16
|
+
# -o smtpd_sasl_auth_enable=yes
|
17
|
+
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
18
|
+
#628 inet n - - - - qmqpd
|
19
|
+
pickup fifo n - - 60 1 pickup
|
20
|
+
cleanup unix n - - - 0 cleanup
|
21
|
+
qmgr fifo n - n 300 1 qmgr
|
22
|
+
#qmgr fifo n - - 300 1 oqmgr
|
23
|
+
tlsmgr unix - - - 1000? 1 tlsmgr
|
24
|
+
rewrite unix - - - - - trivial-rewrite
|
25
|
+
bounce unix - - - - 0 bounce
|
26
|
+
defer unix - - - - 0 bounce
|
27
|
+
trace unix - - - - 0 bounce
|
28
|
+
verify unix - - - - 1 verify
|
29
|
+
flush unix n - - 1000? 0 flush
|
30
|
+
proxymap unix - - n - - proxymap
|
31
|
+
smtp unix - - - - - smtp
|
32
|
+
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
|
33
|
+
relay unix - - - - - smtp
|
34
|
+
-o smtp_fallback_relay=
|
35
|
+
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
|
36
|
+
showq unix n - - - - showq
|
37
|
+
error unix - - - - - error
|
38
|
+
retry unix - - - - - error
|
39
|
+
discard unix - - - - - discard
|
40
|
+
local unix - n n - - local
|
41
|
+
virtual unix - n n - - virtual
|
42
|
+
lmtp unix - - - - - lmtp
|
43
|
+
anvil unix - - - - 1 anvil
|
44
|
+
scache unix - - - - 1 scache
|
45
|
+
#
|
46
|
+
# ====================================================================
|
47
|
+
# Interfaces to non-Postfix software. Be sure to examine the manual
|
48
|
+
# pages of the non-Postfix software to find out what options it wants.
|
49
|
+
#
|
50
|
+
# Many of the following services use the Postfix pipe(8) delivery
|
51
|
+
# agent. See the pipe(8) man page for information about ${recipient}
|
52
|
+
# and other message envelope options.
|
53
|
+
# ====================================================================
|
54
|
+
#
|
55
|
+
# maildrop. See the Postfix MAILDROP_README file for details.
|
56
|
+
# Also specify in main.cf: maildrop_destination_recipient_limit=1
|
57
|
+
#
|
58
|
+
maildrop unix - n n - - pipe
|
59
|
+
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
|
60
|
+
#
|
61
|
+
# See the Postfix UUCP_README file for configuration details.
|
62
|
+
#
|
63
|
+
uucp unix - n n - - pipe
|
64
|
+
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
|
65
|
+
#
|
66
|
+
# Other external delivery methods.
|
67
|
+
#
|
68
|
+
ifmail unix - n n - - pipe
|
69
|
+
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
|
70
|
+
bsmtp unix - n n - - pipe
|
71
|
+
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
|
72
|
+
scalemail-backend unix - n n - 2 pipe
|
73
|
+
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
|
74
|
+
mailman unix - n n - - pipe
|
75
|
+
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
|
76
|
+
${nexthop} ${user}
|
77
|
+
|
@@ -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 RS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+
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
|