centostrano 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. data/CHANGELOG +215 -0
  2. data/COPYING +19 -0
  3. data/LICENSE +339 -0
  4. data/README +166 -0
  5. data/THANKS +5 -0
  6. data/bin/centify +137 -0
  7. data/docs/ANNOUNCE.deprec2 +47 -0
  8. data/docs/README.install +88 -0
  9. data/docs/README.nagios +28 -0
  10. data/docs/README.rails +20 -0
  11. data/docs/README.svn +31 -0
  12. data/docs/ROADMAP.txt +74 -0
  13. data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
  14. data/docs/deprec-1.x/notes.txt +12 -0
  15. data/docs/deprec_banner.gif +0 -0
  16. data/lib/centostrano.rb +9 -0
  17. data/lib/deprec/capistrano_extensions.rb +391 -0
  18. data/lib/deprec/centostrano.rb +46 -0
  19. data/lib/deprec/recipes/apache.rb +188 -0
  20. data/lib/deprec/recipes/canonical.rb +57 -0
  21. data/lib/deprec/recipes/deprec.rb +188 -0
  22. data/lib/deprec/recipes/deprecated.rb +71 -0
  23. data/lib/deprec/recipes/example.rb +115 -0
  24. data/lib/deprec/recipes/git.rb +106 -0
  25. data/lib/deprec/recipes/gitosis.rb +134 -0
  26. data/lib/deprec/recipes/logrotate.rb +54 -0
  27. data/lib/deprec/recipes/memcache.rb +53 -0
  28. data/lib/deprec/recipes/merb.rb +57 -0
  29. data/lib/deprec/recipes/mongrel.rb +220 -0
  30. data/lib/deprec/recipes/monit.rb +139 -0
  31. data/lib/deprec/recipes/mysql.rb +147 -0
  32. data/lib/deprec/recipes/nginx.rb +172 -0
  33. data/lib/deprec/recipes/postgresql.rb +132 -0
  34. data/lib/deprec/recipes/rails.rb +297 -0
  35. data/lib/deprec/recipes/ruby.rb +71 -0
  36. data/lib/deprec/recipes/sphinx.rb +89 -0
  37. data/lib/deprec/recipes/ssh.rb +93 -0
  38. data/lib/deprec/recipes/svn.rb +167 -0
  39. data/lib/deprec/recipes/users.rb +90 -0
  40. data/lib/deprec/recipes.rb +33 -0
  41. data/lib/deprec/templates/aoe/aoe-init +55 -0
  42. data/lib/deprec/templates/aoe/fence_aoemask +351 -0
  43. data/lib/deprec/templates/apache/httpd-vhost-app.conf.erb +144 -0
  44. data/lib/deprec/templates/apache/httpd.conf +465 -0
  45. data/lib/deprec/templates/apache/index.html.erb +37 -0
  46. data/lib/deprec/templates/apache/master.css +72 -0
  47. data/lib/deprec/templates/centos/repository.erb +6 -0
  48. data/lib/deprec/templates/coraid/aoe-init +55 -0
  49. data/lib/deprec/templates/deprec/caprc.erb +14 -0
  50. data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
  51. data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
  52. data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
  53. data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
  54. data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
  55. data/lib/deprec/templates/mongrel/logrotate.erb +0 -0
  56. data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
  57. data/lib/deprec/templates/mongrel/mongrel_cluster.logrotate.d +14 -0
  58. data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
  59. data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
  60. data/lib/deprec/templates/monit/monit-init-script +104 -0
  61. data/lib/deprec/templates/monit/monitrc.erb +227 -0
  62. data/lib/deprec/templates/monit/nothing +0 -0
  63. data/lib/deprec/templates/mysql/create_databases.sql +20 -0
  64. data/lib/deprec/templates/mysql/database.yml.prod +6 -0
  65. data/lib/deprec/templates/mysql/database.yml.stage +6 -0
  66. data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
  67. data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
  68. data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
  69. data/lib/deprec/templates/nagios/cgi.cfg.erb +321 -0
  70. data/lib/deprec/templates/nagios/commands.cfg.erb +240 -0
  71. data/lib/deprec/templates/nagios/contacts.cfg.erb +57 -0
  72. data/lib/deprec/templates/nagios/hosts.cfg.erb +143 -0
  73. data/lib/deprec/templates/nagios/htpasswd.users +1 -0
  74. data/lib/deprec/templates/nagios/localhost.cfg.erb +157 -0
  75. data/lib/deprec/templates/nagios/nagios.cfg.erb +1274 -0
  76. data/lib/deprec/templates/nagios/nagios_apache_vhost.conf.erb +45 -0
  77. data/lib/deprec/templates/nagios/nrpe.cfg.erb +210 -0
  78. data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
  79. data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
  80. data/lib/deprec/templates/nagios/services.cfg.erb +79 -0
  81. data/lib/deprec/templates/nagios/templates.cfg.erb +9 -0
  82. data/lib/deprec/templates/nagios/timeperiods.cfg.erb +94 -0
  83. data/lib/deprec/templates/network/hostname.erb +1 -0
  84. data/lib/deprec/templates/network/hosts.erb +2 -0
  85. data/lib/deprec/templates/network/interfaces.erb +22 -0
  86. data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
  87. data/lib/deprec/templates/nginx/logrotate.erb +0 -0
  88. data/lib/deprec/templates/nginx/mime.types.erb +70 -0
  89. data/lib/deprec/templates/nginx/nginx-init-script +109 -0
  90. data/lib/deprec/templates/nginx/nginx.conf.erb +120 -0
  91. data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
  92. data/lib/deprec/templates/nginx/nothing.conf +1 -0
  93. data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +41 -0
  94. data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
  95. data/lib/deprec/templates/postfix/aliases.erb +3 -0
  96. data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
  97. data/lib/deprec/templates/postfix/main.cf.erb +41 -0
  98. data/lib/deprec/templates/postfix/master.cf.erb +77 -0
  99. data/lib/deprec/templates/postgresql/pg_hba.conf.erb +76 -0
  100. data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
  101. data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
  102. data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
  103. data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
  104. data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
  105. data/lib/deprec/templates/trac/trac.ini.erb +106 -0
  106. data/lib/deprec/templates/trac/trac_deprec.png +0 -0
  107. data/lib/deprec/templates/trac/tracd-init.erb +43 -0
  108. data/lib/deprec/templates/xen/15-disable-hwclock +40 -0
  109. data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
  110. data/lib/deprec/templates/xen/xen-tools.conf.erb +220 -0
  111. data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
  112. data/lib/deprec/templates/xen/xend-init.erb +69 -0
  113. data/lib/deprec/templates/xen/xendomains.erb +137 -0
  114. data/lib/deprec/templates/xen/xm.tmpl.erb +85 -0
  115. data/lib/deprec_cmd_completion.sh +26 -0
  116. data/lib/vmbuilder_plugins/all.rb +20 -0
  117. data/lib/vmbuilder_plugins/apt.rb +93 -0
  118. data/lib/vmbuilder_plugins/emerge.rb +76 -0
  119. data/lib/vmbuilder_plugins/gem.rb +90 -0
  120. data/lib/vmbuilder_plugins/std.rb +203 -0
  121. metadata +207 -0
@@ -0,0 +1 @@
1
+ <%= hostname %>
@@ -0,0 +1,2 @@
1
+ 127.0.0.1 localhost
2
+ 127.0.1.1 <%= hostname %>
@@ -0,0 +1,22 @@
1
+ # This file describes the network interfaces available on your system
2
+ # and how to activate them. For more information, see interfaces(5).
3
+
4
+ # The loopback network interface
5
+ auto lo
6
+ iface lo inet loopback
7
+
8
+ # The primary network interface
9
+ auto eth0
10
+ iface eth0 inet static
11
+ address <%= eth0_ip %>
12
+ netmask 255.255.254.0
13
+ broadcast 192.168.1.255
14
+ gateway 192.168.0.1
15
+ dns-nameservers 203.8.183.1 4.2.2.1
16
+
17
+ auto eth1
18
+ iface eth1 inet static
19
+ address <%= eth1_ip %>
20
+ netmask 255.255.255.0
21
+ broadcast 192.168.1.255
22
+ dns-nameservers 203.8.183.1 4.2.2.1
@@ -0,0 +1,13 @@
1
+ /var/www/apps/<%= application %>/shared/log/*access.log /var/www/apps/<%= application %>/shared/log/*error.log{
2
+ daily
3
+ missingok
4
+ compress
5
+ rotate 21
6
+ dateext
7
+ notifempty
8
+ sharedscripts
9
+ extension gz
10
+ postrotate
11
+ [ ! -f /usr/local/nginx/logs/nginx.pid ] || kill -USR1 `cat /usr/local/nginx/logs/nginx.pid`
12
+ endscript
13
+ }
File without changes
@@ -0,0 +1,70 @@
1
+
2
+ types {
3
+ text/html html htm shtml;
4
+ text/css css;
5
+ text/xml xml rss;
6
+ image/gif gif;
7
+ image/jpeg jpeg jpg;
8
+ application/x-javascript js;
9
+ application/atom+xml atom;
10
+
11
+ text/mathml mml;
12
+ text/plain txt;
13
+ text/vnd.sun.j2me.app-descriptor jad;
14
+ text/vnd.wap.wml wml;
15
+ text/x-component htc;
16
+
17
+ image/png png;
18
+ image/tiff tif tiff;
19
+ image/vnd.wap.wbmp wbmp;
20
+ image/x-icon ico;
21
+ image/x-jng jng;
22
+ image/x-ms-bmp bmp;
23
+ image/svg+xml svg;
24
+
25
+ application/java-archive jar war ear;
26
+ application/mac-binhex40 hqx;
27
+ application/msword doc;
28
+ application/pdf pdf;
29
+ application/postscript ps eps ai;
30
+ application/rtf rtf;
31
+ application/vnd.ms-excel xls;
32
+ application/vnd.ms-powerpoint ppt;
33
+ application/vnd.wap.wmlc wmlc;
34
+ application/vnd.wap.xhtml+xml xhtml;
35
+ application/x-cocoa cco;
36
+ application/x-java-archive-diff jardiff;
37
+ application/x-java-jnlp-file jnlp;
38
+ application/x-makeself run;
39
+ application/x-perl pl pm;
40
+ application/x-pilot prc pdb;
41
+ application/x-rar-compressed rar;
42
+ application/x-redhat-package-manager rpm;
43
+ application/x-sea sea;
44
+ application/x-shockwave-flash swf;
45
+ application/x-stuffit sit;
46
+ application/x-tcl tcl tk;
47
+ application/x-x509-ca-cert der pem crt;
48
+ application/x-xpinstall xpi;
49
+ application/zip zip;
50
+
51
+ application/octet-stream bin exe dll;
52
+ application/octet-stream deb;
53
+ application/octet-stream dmg;
54
+ application/octet-stream eot;
55
+ application/octet-stream iso img;
56
+ application/octet-stream msi msp msm;
57
+
58
+ audio/midi mid midi kar;
59
+ audio/mpeg mp3;
60
+ audio/x-realaudio ra;
61
+
62
+ video/3gpp 3gpp 3gp;
63
+ video/mpeg mpeg mpg;
64
+ video/quicktime mov;
65
+ video/x-flv flv;
66
+ video/x-mng mng;
67
+ video/x-ms-asf asx asf;
68
+ video/x-ms-wmv wmv;
69
+ video/x-msvideo avi;
70
+ }
@@ -0,0 +1,109 @@
1
+ #!/bin/sh
2
+ #
3
+ # this startup script was taken from nginx package in EPEL repository
4
+ #
5
+ # nginx - this script starts and stops the nginx daemin
6
+ #
7
+ # chkconfig: - 85 15
8
+ # description: Nginx is an HTTP(S) server, HTTP(S) reverse \
9
+ # proxy and IMAP/POP3 proxy server
10
+ # processname: nginx
11
+ # config: /etc/nginx/nginx.conf
12
+ # config: /etc/sysconfig/nginx
13
+ # pidfile: /var/run/nginx.pid
14
+
15
+ # Source function library.
16
+ . /etc/rc.d/init.d/functions
17
+
18
+ # Source networking configuration.
19
+ . /etc/sysconfig/network
20
+
21
+ # Check that networking is up.
22
+ [ "$NETWORKING" = "no" ] && exit 0
23
+
24
+ nginx="/usr/local/sbin/nginx"
25
+ prog=$(basename $nginx)
26
+
27
+ NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"
28
+
29
+ lockfile=/var/lock/subsys/nginx
30
+
31
+ start() {
32
+ [ -x $nginx ] || exit 5
33
+ [ -f $NGINX_CONF_FILE ] || exit 6
34
+ echo -n $"Starting $prog: "
35
+ daemon $nginx -c $NGINX_CONF_FILE
36
+ retval=$?
37
+ echo
38
+ [ $retval -eq 0 ] && touch $lockfile
39
+ return $retval
40
+ }
41
+
42
+ stop() {
43
+ echo -n $"Stopping $prog: "
44
+ killproc $prog -QUIT
45
+ retval=$?
46
+ echo
47
+ [ $retval -eq 0 ] && rm -f $lockfile
48
+ return $retval
49
+ }
50
+
51
+ restart() {
52
+ configtest || return $?
53
+ stop
54
+ start
55
+ }
56
+
57
+ reload() {
58
+ configtest || return $?
59
+ echo -n $"Reloading $prog: "
60
+ killproc $nginx -HUP
61
+ RETVAL=$?
62
+ echo
63
+ }
64
+
65
+ force_reload() {
66
+ restart
67
+ }
68
+
69
+ configtest() {
70
+ $nginx -t -c $NGINX_CONF_FILE
71
+ }
72
+
73
+ rh_status() {
74
+ status $prog
75
+ }
76
+
77
+ rh_status_q() {
78
+ rh_status >/dev/null 2>&1
79
+ }
80
+
81
+ case "$1" in
82
+ start)
83
+ rh_status_q && exit 0
84
+ $1
85
+ ;;
86
+ stop)
87
+ rh_status_q || exit 0
88
+ $1
89
+ ;;
90
+ restart|configtest)
91
+ $1
92
+ ;;
93
+ reload)
94
+ rh_status_q || exit 7
95
+ $1
96
+ ;;
97
+ force-reload)
98
+ force_reload
99
+ ;;
100
+ status)
101
+ rh_status
102
+ ;;
103
+ condrestart|try-restart)
104
+ rh_status_q || exit 0
105
+ ;;
106
+ *)
107
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
108
+ exit 2
109
+ esac
@@ -0,0 +1,120 @@
1
+
2
+ user <%= nginx_user %>;
3
+ worker_processes 1;
4
+
5
+ #error_log logs/error.log;
6
+ #error_log logs/error.log notice;
7
+ #error_log logs/error.log info;
8
+
9
+ #pid logs/nginx.pid;
10
+
11
+
12
+ events {
13
+ worker_connections 1024;
14
+ }
15
+
16
+
17
+ http {
18
+ include /usr/local/nginx/conf/vhosts/*.conf;
19
+ include mime.types;
20
+ default_type application/octet-stream;
21
+
22
+ #log_format main '$remote_addr - $remote_user [$time_local] $request '
23
+ # '"$status" $body_bytes_sent "$http_referer" '
24
+ # '"$http_user_agent" "$http_x_forwarded_for"';
25
+
26
+ #access_log logs/access.log main;
27
+
28
+ sendfile on;
29
+ #tcp_nopush on;
30
+
31
+ #keepalive_timeout 0;
32
+ keepalive_timeout 65;
33
+
34
+ #gzip on;
35
+
36
+ server {
37
+ listen 80;
38
+ server_name _;
39
+
40
+ #charset koi8-r;
41
+
42
+ #access_log logs/host.access.log main;
43
+
44
+ server_name_in_redirect off;
45
+
46
+ location / {
47
+ root html;
48
+ index index.html index.htm;
49
+ }
50
+
51
+ #error_page 404 /404.html;
52
+
53
+ # redirect server error pages to the static page /50x.html
54
+ #
55
+ error_page 500 502 503 504 /50x.html;
56
+ location = /50x.html {
57
+ root html;
58
+ }
59
+
60
+ # proxy the PHP scripts to Apache listening on 127.0.0.1:80
61
+ #
62
+ #location ~ \.php$ {
63
+ # proxy_pass http://127.0.0.1;
64
+ #}
65
+
66
+ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
67
+ #
68
+ #location ~ \.php$ {
69
+ # fastcgi_pass 127.0.0.1:9000;
70
+ # fastcgi_index index.php;
71
+ # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
72
+ # include conf/fastcgi_params;
73
+ #}
74
+
75
+ # deny access to .htaccess files, if Apache's document root
76
+ # concurs with nginx's one
77
+ #
78
+ #location ~ /\.ht {
79
+ # deny all;
80
+ #}
81
+ }
82
+
83
+
84
+ # another virtual host using mix of IP-, name-, and port-based configuration
85
+ #
86
+ #server {
87
+ # listen 8000;
88
+ # listen somename:8080;
89
+ # server_name somename alias another.alias;
90
+
91
+ # location / {
92
+ # root html;
93
+ # index index.html index.htm;
94
+ # }
95
+ #}
96
+
97
+
98
+ # HTTPS server
99
+ #
100
+ #server {
101
+ # listen 443;
102
+ # server_name localhost;
103
+
104
+ # ssl on;
105
+ # ssl_certificate cert.pem;
106
+ # ssl_certificate_key cert.key;
107
+
108
+ # ssl_session_timeout 5m;
109
+
110
+ # ssl_protocols SSLv2 SSLv3 TLSv1;
111
+ # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
112
+ # ssl_prefer_server_ciphers on;
113
+
114
+ # location / {
115
+ # root html;
116
+ # index index.html index.htm;
117
+ # }
118
+ #}
119
+
120
+ }
@@ -0,0 +1,12 @@
1
+ /var/log/engineyard/nginx/*.log {
2
+ daily
3
+ missingok
4
+ rotate 28
5
+ compress
6
+ notifempty
7
+ sharedscripts
8
+ extension gz
9
+ postrotate
10
+ [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
11
+ endscript
12
+ }
@@ -0,0 +1 @@
1
+ # This dir is for vhost config files
@@ -0,0 +1,41 @@
1
+ upstream <%= application %> {
2
+ <% mongrel_servers.times do |counter| -%>
3
+ <%= "server 127.0.0.1:#{8000+counter};" %>
4
+ <% end -%>
5
+ }
6
+
7
+ server {
8
+ listen 80;
9
+ server_name <%= domain %> <% 4.times do |counter| %> <%= domain.sub(/.*?\./, "assets#{counter}.") %><% end %>;
10
+ root <%= deploy_to %>/current/public;
11
+ access_log <%= deploy_to %>/shared/log/<%= domain %>-access.log;
12
+ error_log <%= deploy_to %>/shared/log/<%= domain %>-error.log;
13
+ client_max_body_size <%= nginx_client_max_body_size %>;
14
+
15
+ if (-f $document_root/system/maintenance.html){
16
+ rewrite ^(.*)$ /system/maintenance.html last;
17
+ break;
18
+ }
19
+ location / {
20
+ proxy_set_header X-Real-IP $remote_addr;
21
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
22
+ proxy_set_header Host $http_host;
23
+ proxy_redirect false;
24
+
25
+ if (-f $request_filename/index.html) {
26
+ rewrite (.*) $1/index.html break;
27
+ }
28
+ if (-f $request_filename.html) {
29
+ rewrite (.*) $1.html break;
30
+ }
31
+ if (!-f $request_filename) {
32
+ proxy_pass http://<%= application %>;
33
+ break;
34
+ }
35
+ }
36
+
37
+ error_page 500 502 503 504 /50x.html;
38
+ location = /50x.html {
39
+ root html;
40
+ }
41
+ }
@@ -0,0 +1,42 @@
1
+ # /etc/ntp.conf, configuration for ntpd
2
+
3
+ driftfile /var/lib/ntp/ntp.drift
4
+
5
+ # Enable this if you want statistics to be logged.
6
+ #statsdir /var/log/ntpstats/
7
+
8
+ statistics loopstats peerstats clockstats
9
+ filegen loopstats file loopstats type day enable
10
+ filegen peerstats file peerstats type day enable
11
+ filegen clockstats file clockstats type day enable
12
+
13
+
14
+ # You do need to talk to an NTP server or two (or three).
15
+ server ntp.ubuntu.com
16
+ server 0.pool.ntp.org
17
+ server 1.pool.ntp.org
18
+ server 2.pool.ntp.org
19
+ server pool.ntp.org
20
+
21
+ # By default, exchange time with everybody, but don't allow configuration.
22
+ # See /usr/share/doc/ntp-doc/html/accopt.html for details.
23
+ restrict -4 default kod notrap nomodify nopeer noquery
24
+ restrict -6 default kod notrap nomodify nopeer noquery
25
+
26
+ # Local users may interrogate the ntp server more closely.
27
+ restrict 127.0.0.1
28
+ restrict ::1
29
+
30
+ # Clients from this (example!) subnet have unlimited access,
31
+ # but only if cryptographically authenticated
32
+ #restrict 192.168.123.0 mask 255.255.255.0 notrust
33
+
34
+ # If you want to provide time to your local subnet, change the next line.
35
+ # (Again, the address is an example only.)
36
+ #broadcast 192.168.123.255
37
+
38
+ # If you want to listen to time broadcasts on your local subnet,
39
+ # de-comment the next lines. Please do this only if you trust everybody
40
+ # on the network!
41
+ #disable auth
42
+ #broadcastclient