le1t0-deprec 2.1.6.001

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. data/CHANGELOG +444 -0
  2. data/COPYING +19 -0
  3. data/LICENSE +339 -0
  4. data/README +154 -0
  5. data/THANKS +17 -0
  6. data/bin/depify +139 -0
  7. data/docs/EXAMPLE-installing_tracks.txt +41 -0
  8. data/docs/README.nagios +22 -0
  9. data/docs/README.rails +17 -0
  10. data/docs/config_gen_explained.txt +39 -0
  11. data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
  12. data/docs/deprec-1.x/notes.txt +12 -0
  13. data/docs/old/deprec_banner.gif +0 -0
  14. data/docs/windows_linux.txt +350 -0
  15. data/docs/xen/traffic_monitoring_with_vnstat.txt +95 -0
  16. data/docs/xen/xen-tools-notes.txt +31 -0
  17. data/docs/xen/xen_on_hardy.txt +39 -0
  18. data/lib/deprec.rb +42 -0
  19. data/lib/deprec/capistrano_extensions.rb +446 -0
  20. data/lib/deprec/recipes.rb +7 -0
  21. data/lib/deprec/recipes/aoe.rb +79 -0
  22. data/lib/deprec/recipes/app/mongrel.rb +213 -0
  23. data/lib/deprec/recipes/app/passenger.rb +190 -0
  24. data/lib/deprec/recipes/ar_sendmail.rb +67 -0
  25. data/lib/deprec/recipes/aspell.rb +22 -0
  26. data/lib/deprec/recipes/canonical.rb +68 -0
  27. data/lib/deprec/recipes/cap.rb +39 -0
  28. data/lib/deprec/recipes/chef.rb +68 -0
  29. data/lib/deprec/recipes/collectd.rb +112 -0
  30. data/lib/deprec/recipes/db/couchdb.rb +107 -0
  31. data/lib/deprec/recipes/db/mysql.rb +194 -0
  32. data/lib/deprec/recipes/db/postgresql.rb +104 -0
  33. data/lib/deprec/recipes/db/sqlite.rb +37 -0
  34. data/lib/deprec/recipes/ddclient.rb +51 -0
  35. data/lib/deprec/recipes/deprec.rb +167 -0
  36. data/lib/deprec/recipes/deprecated.rb +71 -0
  37. data/lib/deprec/recipes/drbd.rb +137 -0
  38. data/lib/deprec/recipes/dummy.rb +22 -0
  39. data/lib/deprec/recipes/example.rb +115 -0
  40. data/lib/deprec/recipes/git.rb +97 -0
  41. data/lib/deprec/recipes/gitosis.rb.disabled +55 -0
  42. data/lib/deprec/recipes/glusterfs.rb +176 -0
  43. data/lib/deprec/recipes/god.rb +70 -0
  44. data/lib/deprec/recipes/haproxy.rb +115 -0
  45. data/lib/deprec/recipes/heartbeat.rb +138 -0
  46. data/lib/deprec/recipes/imagemagick/imagemagick_bin.rb +24 -0
  47. data/lib/deprec/recipes/imagemagick/imagemagick_src.rb +39 -0
  48. data/lib/deprec/recipes/integrity.rb +108 -0
  49. data/lib/deprec/recipes/iptables.rb +94 -0
  50. data/lib/deprec/recipes/java.rb +23 -0
  51. data/lib/deprec/recipes/keepalived.rb +78 -0
  52. data/lib/deprec/recipes/ldap.rb +52 -0
  53. data/lib/deprec/recipes/logrotate.rb +56 -0
  54. data/lib/deprec/recipes/lvm.rb +20 -0
  55. data/lib/deprec/recipes/memcache.rb +49 -0
  56. data/lib/deprec/recipes/mongodb.rb +94 -0
  57. data/lib/deprec/recipes/monit.rb +135 -0
  58. data/lib/deprec/recipes/mysql_proxy.rb +67 -0
  59. data/lib/deprec/recipes/nagios.rb +361 -0
  60. data/lib/deprec/recipes/network.rb +116 -0
  61. data/lib/deprec/recipes/ntp.rb +103 -0
  62. data/lib/deprec/recipes/php.rb +58 -0
  63. data/lib/deprec/recipes/postfix.rb +115 -0
  64. data/lib/deprec/recipes/profiles.rb +125 -0
  65. data/lib/deprec/recipes/raid/amcc_3ware.rb +21 -0
  66. data/lib/deprec/recipes/rails.rb +330 -0
  67. data/lib/deprec/recipes/redhat_cluster.rb +228 -0
  68. data/lib/deprec/recipes/redis.rb +90 -0
  69. data/lib/deprec/recipes/ruby/mri.rb +55 -0
  70. data/lib/deprec/recipes/ruby/ree.rb +40 -0
  71. data/lib/deprec/recipes/rvm.rb +32 -0
  72. data/lib/deprec/recipes/s3utils.rb +63 -0
  73. data/lib/deprec/recipes/sphinx/thinking_sphinx.rb +105 -0
  74. data/lib/deprec/recipes/sphinx/ultrasphinx.rb +86 -0
  75. data/lib/deprec/recipes/ssh.rb +147 -0
  76. data/lib/deprec/recipes/ssl.rb +56 -0
  77. data/lib/deprec/recipes/starling.rb +119 -0
  78. data/lib/deprec/recipes/svn.rb +171 -0
  79. data/lib/deprec/recipes/syslog.rb +63 -0
  80. data/lib/deprec/recipes/trac.rb.disabled +277 -0
  81. data/lib/deprec/recipes/tsung.rb +74 -0
  82. data/lib/deprec/recipes/ubuntu.rb +90 -0
  83. data/lib/deprec/recipes/users.rb +90 -0
  84. data/lib/deprec/recipes/utils.rb +58 -0
  85. data/lib/deprec/recipes/vnstat.rb +85 -0
  86. data/lib/deprec/recipes/web/apache.rb +143 -0
  87. data/lib/deprec/recipes/web/nginx.rb +172 -0
  88. data/lib/deprec/recipes/wordpress.rb.notworking +96 -0
  89. data/lib/deprec/recipes/wpmu.rb +103 -0
  90. data/lib/deprec/recipes/xen.rb +364 -0
  91. data/lib/deprec/recipes/xentools.rb +101 -0
  92. data/lib/deprec/recipes_minus_rails.rb +125 -0
  93. data/lib/deprec/templates/aoe/aoe-init +55 -0
  94. data/lib/deprec/templates/aoe/fence_aoemask +351 -0
  95. data/lib/deprec/templates/apache/namevirtualhosts.conf +5 -0
  96. data/lib/deprec/templates/apache/ports.conf.erb +5 -0
  97. data/lib/deprec/templates/apache/status.conf.erb +17 -0
  98. data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
  99. data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
  100. data/lib/deprec/templates/chef/chef.json.erb +1 -0
  101. data/lib/deprec/templates/chef/solo.rb +2 -0
  102. data/lib/deprec/templates/collectd/collectd-init.d +153 -0
  103. data/lib/deprec/templates/collectd/collectd.conf.erb +686 -0
  104. data/lib/deprec/templates/ddclient/ddclient.conf.erb +11 -0
  105. data/lib/deprec/templates/ddclient/ddclient.erb +15 -0
  106. data/lib/deprec/templates/deprec/caprc.erb +14 -0
  107. data/lib/deprec/templates/drbd/drbd.conf.erb +531 -0
  108. data/lib/deprec/templates/glusterfs/glusterfsd-init.erb +95 -0
  109. data/lib/deprec/templates/gnbd_client/cluster.conf.erb +21 -0
  110. data/lib/deprec/templates/gnbd_client/clvm-default.erb +3 -0
  111. data/lib/deprec/templates/gnbd_client/cman-default.erb +6 -0
  112. data/lib/deprec/templates/gnbd_client/gnbdimports.conf.erb +1 -0
  113. data/lib/deprec/templates/gnbd_server/cluster.conf.erb +20 -0
  114. data/lib/deprec/templates/gnbd_server/clvm-default.erb +3 -0
  115. data/lib/deprec/templates/gnbd_server/cman-default.erb +6 -0
  116. data/lib/deprec/templates/gnbd_server/gnbd-server-default.erb +1 -0
  117. data/lib/deprec/templates/gnbd_server/gnbdexports.conf.erb +1 -0
  118. data/lib/deprec/templates/god/god-conf.erb +2 -0
  119. data/lib/deprec/templates/god/god-init.erb +47 -0
  120. data/lib/deprec/templates/haproxy/haproxy-init.d +120 -0
  121. data/lib/deprec/templates/haproxy/haproxy.cfg.erb +31 -0
  122. data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
  123. data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
  124. data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
  125. data/lib/deprec/templates/integrity/apache_vhost.erb +4 -0
  126. data/lib/deprec/templates/integrity/config.ru.erb +21 -0
  127. data/lib/deprec/templates/integrity/config.yml.erb +43 -0
  128. data/lib/deprec/templates/iptables/firewall-default.erb +13 -0
  129. data/lib/deprec/templates/iptables/firewall-init.erb +171 -0
  130. data/lib/deprec/templates/keepalived/keepalived.conf.erb +18 -0
  131. data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
  132. data/lib/deprec/templates/mongodb/mongodb-init.d +88 -0
  133. data/lib/deprec/templates/mongrel/apache_vhost.conf.erb +148 -0
  134. data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
  135. data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
  136. data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
  137. data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
  138. data/lib/deprec/templates/mongrel/nginx_vhost.conf.erb +41 -0
  139. data/lib/deprec/templates/monit/monit-init-script +104 -0
  140. data/lib/deprec/templates/monit/monitrc.erb +250 -0
  141. data/lib/deprec/templates/monit/nothing.monitrc +0 -0
  142. data/lib/deprec/templates/mysql/create_databases.sql +20 -0
  143. data/lib/deprec/templates/mysql/database.yml.prod +6 -0
  144. data/lib/deprec/templates/mysql/database.yml.stage +6 -0
  145. data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
  146. data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
  147. data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
  148. data/lib/deprec/templates/mysql_proxy/mysql-proxy-default.erb +4 -0
  149. data/lib/deprec/templates/nagios/README +32 -0
  150. data/lib/deprec/templates/nagios/cgi.cfg.erb +357 -0
  151. data/lib/deprec/templates/nagios/check_linux_free_memory.pl +118 -0
  152. data/lib/deprec/templates/nagios/check_mongrel_cluster.rb +82 -0
  153. data/lib/deprec/templates/nagios/htpasswd.users +1 -0
  154. data/lib/deprec/templates/nagios/mrtg.cfg +180 -0
  155. data/lib/deprec/templates/nagios/nagios.cfg.erb +1325 -0
  156. data/lib/deprec/templates/nagios/nrpe.cfg.erb +222 -0
  157. data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
  158. data/lib/deprec/templates/nagios/objects/commands.cfg.erb +265 -0
  159. data/lib/deprec/templates/nagios/objects/contacts.cfg.erb +89 -0
  160. data/lib/deprec/templates/nagios/objects/hosts.cfg.erb +114 -0
  161. data/lib/deprec/templates/nagios/objects/localhost.cfg.erb +116 -0
  162. data/lib/deprec/templates/nagios/objects/services.cfg.erb +165 -0
  163. data/lib/deprec/templates/nagios/objects/timeperiods.cfg.erb +94 -0
  164. data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
  165. data/lib/deprec/templates/network/hostname.erb +1 -0
  166. data/lib/deprec/templates/network/hosts.erb +2 -0
  167. data/lib/deprec/templates/network/interfaces.erb +18 -0
  168. data/lib/deprec/templates/network/resolv.conf.erb +6 -0
  169. data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
  170. data/lib/deprec/templates/nginx/mime.types.erb +70 -0
  171. data/lib/deprec/templates/nginx/nginx-init-script +62 -0
  172. data/lib/deprec/templates/nginx/nginx.conf.erb +125 -0
  173. data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
  174. data/lib/deprec/templates/nginx/nothing.conf +1 -0
  175. data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +41 -0
  176. data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
  177. data/lib/deprec/templates/passenger/apache_vhost.erb +29 -0
  178. data/lib/deprec/templates/passenger/logrotate.conf.erb +12 -0
  179. data/lib/deprec/templates/passenger/passenger.conf.erb +21 -0
  180. data/lib/deprec/templates/passenger/passenger.load.erb +3 -0
  181. data/lib/deprec/templates/postfix/aliases.erb +3 -0
  182. data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
  183. data/lib/deprec/templates/postfix/main.cf.erb +36 -0
  184. data/lib/deprec/templates/postfix/master.cf.erb +77 -0
  185. data/lib/deprec/templates/redis/redis-conf.erb +132 -0
  186. data/lib/deprec/templates/redis/redis-init.erb +50 -0
  187. data/lib/deprec/templates/s3utils/s3cfg +35 -0
  188. data/lib/deprec/templates/s3utils/s3config.yml +3 -0
  189. data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
  190. data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
  191. data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
  192. data/lib/deprec/templates/ssl/make-ssl-cert +138 -0
  193. data/lib/deprec/templates/ssl/ssl-cert-snakeoil.key +15 -0
  194. data/lib/deprec/templates/ssl/ssl-cert-snakeoil.pem +19 -0
  195. data/lib/deprec/templates/starling/monit.conf.erb +14 -0
  196. data/lib/deprec/templates/starling/starling-init-script.erb +71 -0
  197. data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
  198. data/lib/deprec/templates/syslog/syslog.conf.erb +71 -0
  199. data/lib/deprec/templates/syslog/syslogd.erb +13 -0
  200. data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
  201. data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
  202. data/lib/deprec/templates/trac/trac.ini.erb +169 -0
  203. data/lib/deprec/templates/trac/trac_deprec.png +0 -0
  204. data/lib/deprec/templates/trac/tracd-init.erb +43 -0
  205. data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
  206. data/lib/deprec/templates/tsung/tsung.xml.erb +47 -0
  207. data/lib/deprec/templates/vnstat/config.php +57 -0
  208. data/lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb +31 -0
  209. data/lib/deprec/templates/wordpress/wp-config.php.erb +31 -0
  210. data/lib/deprec/templates/wpmu/apache_vhost.conf.erb +13 -0
  211. data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
  212. data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
  213. data/lib/deprec/templates/xen/xend-init.erb +57 -0
  214. data/lib/deprec/templates/xen/xendomains.erb +137 -0
  215. data/lib/deprec/templates/xentools/100-ubuntu-setup +26 -0
  216. data/lib/deprec/templates/xentools/15-disable-hwclock +40 -0
  217. data/lib/deprec/templates/xentools/30-disable-gettys +57 -0
  218. data/lib/deprec/templates/xentools/31-ubuntu-setup +32 -0
  219. data/lib/deprec/templates/xentools/40-setup-networking +145 -0
  220. data/lib/deprec/templates/xentools/98-custom +17 -0
  221. data/lib/deprec/templates/xentools/xen-tools.conf.erb +278 -0
  222. data/lib/deprec/templates/xentools/xm.tmpl.erb +138 -0
  223. data/lib/deprec_cmd_completion.sh +26 -0
  224. data/lib/deprec_minus_rails.rb +12 -0
  225. data/lib/vmbuilder_plugins/all.rb +20 -0
  226. data/lib/vmbuilder_plugins/apt.rb +93 -0
  227. data/lib/vmbuilder_plugins/emerge.rb +76 -0
  228. data/lib/vmbuilder_plugins/gem.rb +100 -0
  229. data/lib/vmbuilder_plugins/std.rb +203 -0
  230. metadata +304 -0
@@ -0,0 +1,31 @@
1
+ <VirtualHost *:80>
2
+ ServerName <%= wordpress_domain %>
3
+ DocumentRoot <%= "#{wordpress_install_dir}" %>
4
+
5
+ <Directory <%= "#{wordpress_install_dir}" %>>
6
+ DirectoryIndex index.html index.htm index.php
7
+ Options FollowSymLinks
8
+ AllowOverride None
9
+ Order allow,deny
10
+ Allow from all
11
+ </Directory>
12
+
13
+ RewriteEngine On
14
+
15
+ # Prevent access to .svn directories
16
+ RewriteRule ^(.*/)?\.svn/ - [F,L]
17
+ ErrorDocument 403 "Access Forbidden"
18
+
19
+ # Prevent access to .git directories
20
+ RewriteRule ^(.*/)?\.git/ - [F,L]
21
+ ErrorDocument 403 "Access Forbidden"
22
+
23
+ # Deflate
24
+ AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
25
+ BrowserMatch ^Mozilla/4 gzip-only-text/html
26
+ BrowserMatch ^Mozilla/4\.0[678] no-gzip
27
+ BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
28
+
29
+ ErrorLog logs/<%= wordpress_domain %>-error_log
30
+ CustomLog logs/<%= wordpress_domain %>-access_log combined
31
+ </VirtualHost>
@@ -0,0 +1,31 @@
1
+ <?php
2
+ // ** MySQL settings ** //
3
+ define('DB_NAME', '<%= db_name %>'); // The name of the database
4
+ define('DB_USER', '<%= db_user %>'); // Your MySQL username
5
+ define('DB_PASSWORD', '<%= db_pass %>'); // ...and password
6
+ define('DB_HOST', '<%= db_host %>'); // 99% chance you won't need to change this value
7
+ define('DB_CHARSET', '<%= db_charset %>');
8
+ define('DB_COLLATE', '<%= db_collate %>');
9
+
10
+ // Change each KEY to a different unique phrase. You won't have to remember the phrases later,
11
+ // so make them long and complicated. You can visit http://api.wordpress.org/secret-key/1.1/
12
+ // to get keys generated for you, or just make something up. Each key should have a different phrase.
13
+ define('AUTH_KEY', '<%= auth_key %>'); // Change this to a unique phrase.
14
+ define('SECURE_AUTH_KEY', '<%= secure_auth_key %>'); // Change this to a unique phrase.
15
+ define('LOGGED_IN_KEY', '<%= logged_in_key %>'); // Change this to a unique phrase.
16
+
17
+ // You can have multiple installations in one database if you give each a unique prefix
18
+ $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!
19
+
20
+ // Change this to localize WordPress. A corresponding MO file for the
21
+ // chosen language must be installed to wp-content/languages.
22
+ // For example, install de.mo to wp-content/languages and set WPLANG to 'de'
23
+ // to enable German language support.
24
+ define ('WPLANG', '');
25
+
26
+ /* That's all, stop editing! Happy blogging. */
27
+
28
+ if ( !defined('ABSPATH') )
29
+ define('ABSPATH', dirname(__FILE__) . '/');
30
+ require_once(ABSPATH . 'wp-settings.php');
31
+ ?>
@@ -0,0 +1,13 @@
1
+ NameVirtualHost *
2
+ <VirtualHost *>
3
+ ServerName <%= wpmu_domain %>
4
+ DocumentRoot <%= wpmu_root %>
5
+ <Directory <%= wpmu_root %>>
6
+ Options Indexes FollowSymLinks MultiViews
7
+ AllowOverride FileInfo Options
8
+ Order allow,deny
9
+ allow from all
10
+ </Directory>
11
+ ErrorLog <%= apache_log_dir %>/wpmu-error.log
12
+ CustomLog <%= apache_log_dir %>/wpmu-access.log combined
13
+ </VirtualHost>
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+ /etc/xen/scripts/network-bridge $1 netdev=eth0 bridge=xenbr0 vifnum=0 antispoof=no
3
+ /etc/xen/scripts/network-bridge $1 netdev=eth1 bridge=xenbr1 vifnum=1 antispoof=no
@@ -0,0 +1,195 @@
1
+ # -*- sh -*-
2
+
3
+ #
4
+ # Xend configuration file.
5
+ #
6
+
7
+ # This example configuration is appropriate for an installation that
8
+ # utilizes a bridged network configuration. Access to xend via http
9
+ # is disabled.
10
+
11
+ # Commented out entries show the default for that entry, unless otherwise
12
+ # specified.
13
+
14
+ #(logfile /var/log/xen/xend.log)
15
+ #(loglevel DEBUG)
16
+
17
+
18
+ # The Xen-API server configuration. (Please note that this server is
19
+ # available as an UNSUPPORTED PREVIEW in Xen 3.0.4, and should not be relied
20
+ # upon).
21
+ #
22
+ # This value configures the ports, interfaces, and access controls for the
23
+ # Xen-API server. Each entry in the list starts with either unix, a port
24
+ # number, or an address:port pair. If this is "unix", then a UDP socket is
25
+ # opened, and this entry applies to that. If it is a port, then Xend will
26
+ # listen on all interfaces on that TCP port, and if it is an address:port
27
+ # pair, then Xend will listen on the specified port, using the interface with
28
+ # the specified address.
29
+ #
30
+ # The subsequent string configures the user-based access control for the
31
+ # listener in question. This can be one of "none" or "pam", indicating either
32
+ # that users should be allowed access unconditionally, or that the local
33
+ # Pluggable Authentication Modules configuration should be used. If this
34
+ # string is missing or empty, then "pam" is used.
35
+ #
36
+ # The final string gives the host-based access control for that listener. If
37
+ # this is missing or empty, then all connections are accepted. Otherwise,
38
+ # this should be a space-separated sequence of regular expressions; any host
39
+ # with a fully-qualified domain name or an IP address that matches one of
40
+ # these regular expressions will be accepted.
41
+ #
42
+ # Example: listen on TCP port 9363 on all interfaces, accepting connections
43
+ # only from machines in example.com or localhost, and allow access through
44
+ # the unix domain socket unconditionally:
45
+ #
46
+ # (xen-api-server ((9363 pam '^localhost$ example\\.com$')
47
+ # (unix none)))
48
+ #
49
+ # Optionally, the TCP Xen-API server can use SSL by specifying the private
50
+ # key and certificate location:
51
+ #
52
+ # (9367 pam '' /etc/xen/xen-api.key /etc/xen/xen-api.crt)
53
+ #
54
+ # Default:
55
+ # (xen-api-server ((unix)))
56
+
57
+
58
+ #(xend-http-server no)
59
+ #(xend-unix-server no)
60
+ #(xend-tcp-xmlrpc-server no)
61
+ #(xend-unix-xmlrpc-server yes)
62
+ #(xend-relocation-server no)
63
+ (xend-relocation-server no)
64
+
65
+ #(xend-unix-path /var/lib/xend/xend-socket)
66
+
67
+
68
+ # Address and port xend should use for the legacy TCP XMLRPC interface,
69
+ # if xen-tcp-xmlrpc-server is set.
70
+ #(xen-tcp-xmlrpc-server-address 'localhost')
71
+ #(xen-tcp-xmlrpc-server-port 8006)
72
+
73
+ # SSL key and certificate to use for the legacy TCP XMLRPC interface.
74
+ # Setting these will mean that this port serves only SSL connections as
75
+ # opposed to plaintext ones.
76
+ #(xend-tcp-xmlrpc-server-ssl-key-file /etc/xen/xmlrpc.key)
77
+ #(xend-tcp-xmlrpc-server-ssl-cert-file /etc/xen/xmlrpc.crt)
78
+
79
+
80
+ # Port xend should use for the HTTP interface, if xend-http-server is set.
81
+ #(xend-port 8000)
82
+
83
+ # Port xend should use for the relocation interface, if xend-relocation-server
84
+ # is set.
85
+ #(xend-relocation-port 8002)
86
+
87
+ # Address xend should listen on for HTTP connections, if xend-http-server is
88
+ # set.
89
+ # Specifying 'localhost' prevents remote connections.
90
+ # Specifying the empty string '' (the default) allows all connections.
91
+ #(xend-address '')
92
+ #(xend-address localhost)
93
+
94
+ # Address xend should listen on for relocation-socket connections, if
95
+ # xend-relocation-server is set.
96
+ # Meaning and default as for xend-address above.
97
+ #(xend-relocation-address '')
98
+
99
+ # The hosts allowed to talk to the relocation port. If this is empty (the
100
+ # default), then all connections are allowed (assuming that the connection
101
+ # arrives on a port and interface on which we are listening; see
102
+ # xend-relocation-port and xend-relocation-address above). Otherwise, this
103
+ # should be a space-separated sequence of regular expressions. Any host with
104
+ # a fully-qualified domain name or an IP address that matches one of these
105
+ # regular expressions will be accepted.
106
+ #
107
+ # For example:
108
+ # (xend-relocation-hosts-allow '^localhost$ ^.*\\.example\\.org$')
109
+ #
110
+ #(xend-relocation-hosts-allow '')
111
+ (xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$')
112
+
113
+ # The limit (in kilobytes) on the size of the console buffer
114
+ #(console-limit 1024)
115
+
116
+ ##
117
+ # To bridge network traffic, like this:
118
+ #
119
+ # dom0: fake eth0 -> vif0.0 -+
120
+ # |
121
+ # bridge -> real eth0 -> the network
122
+ # |
123
+ # domU: fake eth0 -> vifN.0 -+
124
+ #
125
+ # use
126
+ #
127
+ (network-script network-bridge-wrapper)
128
+ #
129
+ # Your default ethernet device is used as the outgoing interface, by default.
130
+ # To use a different one (e.g. eth1) use
131
+ #
132
+ # (network-script 'network-bridge netdev=eth1')
133
+ #
134
+ # The bridge is named xenbr0, by default. To rename the bridge, use
135
+ #
136
+ # (network-script 'network-bridge bridge=<name>')
137
+ #
138
+ # It is possible to use the network-bridge script in more complicated
139
+ # scenarios, such as having two outgoing interfaces, with two bridges, and
140
+ # two fake interfaces per guest domain. To do things like this, write
141
+ # yourself a wrapper script, and call network-bridge from it, as appropriate.
142
+ #
143
+ # (network-script network-dummy)
144
+
145
+ # The script used to control virtual interfaces. This can be overridden on a
146
+ # per-vif basis when creating a domain or a configuring a new vif. The
147
+ # vif-bridge script is designed for use with the network-bridge script, or
148
+ # similar configurations.
149
+ #
150
+ # If you have overridden the bridge name using
151
+ # (network-script 'network-bridge bridge=<name>') then you may wish to do the
152
+ # same here. The bridge name can also be set when creating a domain or
153
+ # configuring a new vif, but a value specified here would act as a default.
154
+ #
155
+ # If you are using only one bridge, the vif-bridge script will discover that,
156
+ # so there is no need to specify it explicitly.
157
+ #
158
+ (vif-script vif-bridge)
159
+
160
+
161
+ ## Use the following if network traffic is routed, as an alternative to the
162
+ # settings for bridged networking given above.
163
+ #(network-script network-route)
164
+ #(vif-script vif-route)
165
+
166
+
167
+ ## Use the following if network traffic is routed with NAT, as an alternative
168
+ # to the settings for bridged networking given above.
169
+ #(network-script network-nat)
170
+ #(vif-script vif-nat)
171
+
172
+
173
+ # Dom0 will balloon out when needed to free memory for domU.
174
+ # dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
175
+ # If dom0-min-mem=0, dom0 will never balloon out.
176
+ (dom0-min-mem 196)
177
+
178
+ # In SMP system, dom0 will use dom0-cpus # of CPUS
179
+ # If dom0-cpus = 0, dom0 will take all cpus available
180
+ (dom0-cpus 0)
181
+
182
+ # Whether to enable core-dumps when domains crash.
183
+ #(enable-dump no)
184
+
185
+ # The tool used for initiating virtual TPM migration
186
+ #(external-migration-tool '')
187
+
188
+ # The interface for VNC servers to listen on. Defaults
189
+ # to 127.0.0.1 To restore old 'listen everywhere' behaviour
190
+ # set this to 0.0.0.0
191
+ #(vnc-listen '127.0.0.1')
192
+
193
+ # The default password for VNC console on HVM domain.
194
+ # Empty string is no authentication.
195
+ (vncpasswd '')
@@ -0,0 +1,57 @@
1
+ #!/bin/bash
2
+ ### BEGIN INIT INFO
3
+ # Provides: xend
4
+ # Required-Start: $local_fs
5
+ # Required-Stop: $local_fs
6
+ # Default-Start: 2 3 4 5
7
+ # Default-Stop: S 0 1 6
8
+ # Short-Description: XEN control daemon
9
+ # Description: XEN control daemon
10
+ ### END INIT INFO
11
+
12
+ if ! grep -q "control_d" /proc/xen/capabilities ; then
13
+ exit 0
14
+ fi
15
+
16
+ # Wait for Xend to be up
17
+ function await_daemons_up
18
+ {
19
+ i=1
20
+ rets=10
21
+ xend status
22
+ while [ $? -ne 0 -a $i -lt $rets ]; do
23
+ sleep 1
24
+ echo -n .
25
+ i=$(($i + 1))
26
+ xend status
27
+ done
28
+ }
29
+
30
+ case "$1" in
31
+ start)
32
+ xend start
33
+ await_daemons_up
34
+ ;;
35
+ stop)
36
+ /etc/init.d/xendomains stop # make sure domains are shut down
37
+ xend stop
38
+ ;;
39
+ status)
40
+ xend status
41
+ ;;
42
+ reload)
43
+ xend reload
44
+ ;;
45
+ restart|force-reload)
46
+ xend restart
47
+ await_daemons_up
48
+ ;;
49
+ *)
50
+ # do not advertise unreasonable commands that there is no reason
51
+ # to use with this device
52
+ echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
53
+ exit 1
54
+ esac
55
+
56
+ exit $?
57
+
@@ -0,0 +1,137 @@
1
+ ## Path: System/xen
2
+ ## Description: xen domain start/stop on boot
3
+ ## Type: string
4
+ ## Default:
5
+ #
6
+ # The xendomains script can send SysRq requests to domains on shutdown.
7
+ # If you don't want to MIGRATE, SAVE, or SHUTDOWN, this may be a possibility
8
+ # to do a quick and dirty shutdown ("s e i u o") or at least sync the disks
9
+ # of the domains ("s").
10
+ #
11
+ XENDOMAINS_SYSRQ=""
12
+
13
+ ## Type: integer
14
+ ## Default: 100000
15
+ #
16
+ # If XENDOMAINS_SYSRQ is set, this variable determines how long to wait
17
+ # (in microseconds) after each SysRq, so the domain has a chance to react.
18
+ # If you want to a quick'n'dirty shutdown via SysRq, you may want to set
19
+ # it to a relatively high value (1200000).
20
+ #
21
+ XENDOMAINS_USLEEP=100000
22
+
23
+ ## Type: integer
24
+ ## Default: 5000000
25
+ #
26
+ # When creating a guest domain, it is sensible to allow a little time for it
27
+ # to get started before creating another domain or proceeding through the
28
+ # boot process. Without this, the booting guests will thrash the disk as they
29
+ # start up. This timeout (in microseconds) specifies the delay after guest
30
+ # domain creation.
31
+ #
32
+ XENDOMAINS_CREATE_USLEEP=5000000
33
+
34
+ ## Type: string
35
+ ## Default: ""
36
+ #
37
+ # Set this to a non-empty string if you want to migrate virtual machines
38
+ # on shutdown. The string will be passed to the xm migrate DOMID command
39
+ # as is: It should contain the target IP address of the physical machine
40
+ # to migrate to and optionally parameters like --live. Leave empty if
41
+ # you don't want to try virtual machine relocation on shutdown.
42
+ # If migration succeeds, neither SAVE nor SHUTDOWN will be executed for
43
+ # that domain.
44
+ #
45
+ XENDOMAINS_MIGRATE=""
46
+
47
+ ## Type: string
48
+ ## Default: /var/lib/xen/save
49
+ #
50
+ # Directory to save running domains to when the system (dom0) is
51
+ # shut down. Will also be used to restore domains from if # XENDOMAINS_RESTORE
52
+ # is set (see below). Leave empty to disable domain saving on shutdown
53
+ # (e.g. because you rather shut domains down).
54
+ # If domain saving does succeed, SHUTDOWN will not be executed.
55
+ #
56
+ # XENDOMAINS_SAVE=/var/lib/xen/save
57
+
58
+ ## Type: string
59
+ ## Default: "--halt --wait"
60
+ #
61
+ # If neither MIGRATE nor SAVE were enabled or if they failed, you can
62
+ # try to shut down a domain by sending it a shutdown request. To do this,
63
+ # set this to "--halt --wait". Omit the "--wait" flag to avoid waiting
64
+ # for the domain to be really down. Leave empty to skip domain shutdown.
65
+ #
66
+ XENDOMAINS_SHUTDOWN="--halt --wait"
67
+
68
+ ## Type: string
69
+ ## Default: "--all --halt --wait"
70
+ #
71
+ # After we have gone over all virtual machines (resp. all automatically
72
+ # started ones, see XENDOMAINS_AUTO_ONLY below) in a loop and sent SysRq,
73
+ # migrated, saved and/or shutdown according to the settings above, we
74
+ # might want to shutdown the virtual machines that are still running
75
+ # for some reason or another. To do this, set this variable to
76
+ # "--all --halt --wait", it will be passed to xm shutdown.
77
+ # Leave it empty not to do anything special here.
78
+ # (Note: This will hit all virtual machines, even if XENDOMAINS_AUTO_ONLY
79
+ # is set.)
80
+ #
81
+ XENDOMAINS_SHUTDOWN_ALL="--all --halt --wait"
82
+
83
+ ## Type: boolean
84
+ ## Default: true
85
+ #
86
+ # This variable determines whether saved domains from XENDOMAINS_SAVE
87
+ # will be restored on system startup.
88
+ #
89
+ XENDOMAINS_RESTORE=true
90
+
91
+ ## Type: string
92
+ ## Default: /etc/xen/auto
93
+ #
94
+ # This variable sets the directory where domains configurations
95
+ # are stored that should be started on system startup automatically.
96
+ # Leave empty if you don't want to start domains automatically
97
+ # (or just don't place any xen domain config files in that dir).
98
+ # Note that the script tries to be clever if both RESTORE and AUTO are
99
+ # set: It will first restore saved domains and then only start domains
100
+ # in AUTO which are not running yet.
101
+ # Note that the name matching is somewhat fuzzy.
102
+ #
103
+ XENDOMAINS_AUTO=/etc/xen/auto
104
+
105
+ ## Type: boolean
106
+ ## Default: false
107
+ #
108
+ # If this variable is set to "true", only the domains started via config
109
+ # files in XENDOMAINS_AUTO will be treated according to XENDOMAINS_SYSRQ,
110
+ # XENDOMAINS_MIGRATE, XENDOMAINS_SAVE, XENDMAINS_SHUTDOWN; otherwise
111
+ # all running domains will be.
112
+ # Note that the name matching is somewhat fuzzy.
113
+ #
114
+ XENDOMAINS_AUTO_ONLY=false
115
+
116
+ ## Type: integer
117
+ ## Default: 300
118
+ #
119
+ # On xendomains stop, a number of xm commands (xm migrate, save, shutdown,
120
+ # shutdown --all) may be executed. In the worst case, these commands may
121
+ # stall forever, which will prevent a successful shutdown of the machine.
122
+ # If this variable is non-zero, the script will set up a watchdog timer
123
+ # for every of these xm commands and time it out after the number of seconds
124
+ # specified by this variable.
125
+ # Note that SHUTDOWN_ALL will not be called if no virtual machines or only
126
+ # zombies are still running, so you don't need to enable this timeout just
127
+ # for the zombie case.
128
+ # The setting should be large enough to make sure that migrate/save/shutdown
129
+ # can succeed. If you do live migrations, keep in mind that live migration
130
+ # of a 1GB machine over Gigabit ethernet may actually take something like
131
+ # 100s (assuming that live migration uses 10% of the network # bandwidth).
132
+ # Depending on the virtual machine, a shutdown may also require a significant
133
+ # amount of time. So better setup this variable to a huge number and hope the
134
+ # watchdog never fires.
135
+ #
136
+ XENDOMAINS_STOP_MAXWAIT=300
137
+