hennk-hennk-ec2onrails 0.9.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. data/CHANGELOG +0 -0
  2. data/COPYING +339 -0
  3. data/Manifest +148 -0
  4. data/README.textile +214 -0
  5. data/Rakefile +36 -0
  6. data/TODO +5 -0
  7. data/ec2onrails.gemspec +44 -0
  8. data/lib/ec2onrails/capistrano_utils.rb +33 -0
  9. data/lib/ec2onrails/recipes.rb +460 -0
  10. data/lib/ec2onrails/version.rb +32 -0
  11. data/lib/ec2onrails.rb +20 -0
  12. data/server/build-ec2onrails.sh +44 -0
  13. data/server/files/etc/aliases +6 -0
  14. data/server/files/etc/aliases.db +0 -0
  15. data/server/files/etc/apache2/apache2.conf +295 -0
  16. data/server/files/etc/apache2/conf.d/app.proxy_cluster.conf +7 -0
  17. data/server/files/etc/apache2/conf.d/app.proxy_frontend.conf +10 -0
  18. data/server/files/etc/apache2/mods-available/proxy.conf +18 -0
  19. data/server/files/etc/apache2/sites-available/app.common +58 -0
  20. data/server/files/etc/apache2/sites-available/app.custom +0 -0
  21. data/server/files/etc/apache2/sites-available/default +17 -0
  22. data/server/files/etc/apache2/sites-available/default-ssl +18 -0
  23. data/server/files/etc/cron.d/backup_app_db_to_s3 +6 -0
  24. data/server/files/etc/cron.daily/app +5 -0
  25. data/server/files/etc/cron.daily/logrotate_post +27 -0
  26. data/server/files/etc/cron.hourly/app +5 -0
  27. data/server/files/etc/cron.monthly/app +5 -0
  28. data/server/files/etc/cron.weekly/app +5 -0
  29. data/server/files/etc/denyhosts.conf +628 -0
  30. data/server/files/etc/dpkg/dpkg.cfg +13 -0
  31. data/server/files/etc/ec2onrails/balancer_members +6 -0
  32. data/server/files/etc/ec2onrails/roles.yml +5 -0
  33. data/server/files/etc/environment +2 -0
  34. data/server/files/etc/event.d/monit +13 -0
  35. data/server/files/etc/init.d/ec2-every-startup +29 -0
  36. data/server/files/etc/init.d/ec2-first-startup +36 -0
  37. data/server/files/etc/init.d/mongrel +91 -0
  38. data/server/files/etc/init.d/set_roles +3 -0
  39. data/server/files/etc/logrotate.d/apache2 +13 -0
  40. data/server/files/etc/logrotate.d/mysql-server +23 -0
  41. data/server/files/etc/logrotate.d/rails +7 -0
  42. data/server/files/etc/memcached.conf +47 -0
  43. data/server/files/etc/mongrel_cluster/app.yml +9 -0
  44. data/server/files/etc/monit/app.monitrc +71 -0
  45. data/server/files/etc/monit/db_primary.monitrc +10 -0
  46. data/server/files/etc/monit/memcache.monitrc +8 -0
  47. data/server/files/etc/monit/monitrc +13 -0
  48. data/server/files/etc/monit/system.monitrc +15 -0
  49. data/server/files/etc/monit/web.monitrc +10 -0
  50. data/server/files/etc/motd.tail +13 -0
  51. data/server/files/etc/mysql/my.cnf +149 -0
  52. data/server/files/etc/postfix/main.cf +4 -0
  53. data/server/files/etc/rc0.d/K10mongrel +91 -0
  54. data/server/files/etc/rc1.d/K10mongrel +91 -0
  55. data/server/files/etc/rc2.d/S90mongrel +91 -0
  56. data/server/files/etc/rc3.d/S90mongrel +91 -0
  57. data/server/files/etc/rc4.d/S90mongrel +91 -0
  58. data/server/files/etc/rc5.d/S90mongrel +91 -0
  59. data/server/files/etc/rc6.d/K10mongrel +91 -0
  60. data/server/files/etc/rcS.d/S91ec2-first-startup +36 -0
  61. data/server/files/etc/rcS.d/S92ec2-every-startup +29 -0
  62. data/server/files/etc/rcS.d/S99set_roles +3 -0
  63. data/server/files/etc/ssh/sshd_config +94 -0
  64. data/server/files/etc/sudoers +24 -0
  65. data/server/files/etc/syslog.conf +69 -0
  66. data/server/files/usr/local/ec2onrails/COPYING +339 -0
  67. data/server/files/usr/local/ec2onrails/bin/archive_file.rb +44 -0
  68. data/server/files/usr/local/ec2onrails/bin/backup_app_db.rb +83 -0
  69. data/server/files/usr/local/ec2onrails/bin/backup_files.rb +51 -0
  70. data/server/files/usr/local/ec2onrails/bin/mongrel_start +8 -0
  71. data/server/files/usr/local/ec2onrails/bin/mongrel_stop +8 -0
  72. data/server/files/usr/local/ec2onrails/bin/rails_env +35 -0
  73. data/server/files/usr/local/ec2onrails/bin/rebundle.sh +70 -0
  74. data/server/files/usr/local/ec2onrails/bin/restore_app_db.rb +58 -0
  75. data/server/files/usr/local/ec2onrails/bin/restore_files.rb +59 -0
  76. data/server/files/usr/local/ec2onrails/bin/set_rails_env +40 -0
  77. data/server/files/usr/local/ec2onrails/bin/set_roles.rb +156 -0
  78. data/server/files/usr/local/ec2onrails/config +30 -0
  79. data/server/files/usr/local/ec2onrails/lib/mysql_helper.rb +101 -0
  80. data/server/files/usr/local/ec2onrails/lib/s3_helper.rb +126 -0
  81. data/server/files/usr/local/ec2onrails/lib/utils.rb +16 -0
  82. data/server/files/usr/local/ec2onrails/startup-scripts/every-startup/get-hostname.sh +25 -0
  83. data/server/files/usr/local/ec2onrails/startup-scripts/first-startup/create-dirs.sh +39 -0
  84. data/server/files/usr/local/ec2onrails/startup-scripts/first-startup/generate-default-web-cert-and-key.sh +49 -0
  85. data/server/files/usr/local/ec2onrails/startup-scripts/first-startup/misc.sh +30 -0
  86. data/server/files/usr/local/ec2onrails/startup-scripts/first-startup/prepare-mysql-data-dir.sh +24 -0
  87. data/server/files/usr/local/ec2onrails/startup-scripts/first-startup/setup_credentials.sh +33 -0
  88. data/server/rakefile.rb +245 -0
  89. data/setup.rb +1585 -0
  90. data/test/autobench.conf +60 -0
  91. data/test/spec/lib/s3_helper_spec.rb +134 -0
  92. data/test/spec/lib/s3_old.yml +3 -0
  93. data/test/spec/test_files/test1 +0 -0
  94. data/test/spec/test_files/test2 +0 -0
  95. data/test/test_app/Capfile +3 -0
  96. data/test/test_app/README +182 -0
  97. data/test/test_app/Rakefile +10 -0
  98. data/test/test_app/app/controllers/application.rb +7 -0
  99. data/test/test_app/app/controllers/db_fast_controller.rb +6 -0
  100. data/test/test_app/app/controllers/fast_controller.rb +5 -0
  101. data/test/test_app/app/controllers/slow_controller.rb +6 -0
  102. data/test/test_app/app/controllers/very_slow_controller.rb +6 -0
  103. data/test/test_app/app/helpers/application_helper.rb +3 -0
  104. data/test/test_app/app/helpers/db_fast_helper.rb +2 -0
  105. data/test/test_app/app/helpers/fast_helper.rb +2 -0
  106. data/test/test_app/app/helpers/slow_helper.rb +2 -0
  107. data/test/test_app/app/helpers/very_slow_helper.rb +2 -0
  108. data/test/test_app/config/boot.rb +109 -0
  109. data/test/test_app/config/database.yml +36 -0
  110. data/test/test_app/config/deploy.rb +21 -0
  111. data/test/test_app/config/environment.rb +60 -0
  112. data/test/test_app/config/environments/development.rb +21 -0
  113. data/test/test_app/config/environments/production.rb +18 -0
  114. data/test/test_app/config/environments/test.rb +19 -0
  115. data/test/test_app/config/routes.rb +27 -0
  116. data/test/test_app/db/schema.rb +7 -0
  117. data/test/test_app/doc/README_FOR_APP +2 -0
  118. data/test/test_app/public/404.html +30 -0
  119. data/test/test_app/public/500.html +30 -0
  120. data/test/test_app/public/dispatch.cgi +10 -0
  121. data/test/test_app/public/dispatch.fcgi +24 -0
  122. data/test/test_app/public/dispatch.rb +10 -0
  123. data/test/test_app/public/favicon.ico +0 -0
  124. data/test/test_app/public/images/rails.png +0 -0
  125. data/test/test_app/public/javascripts/application.js +2 -0
  126. data/test/test_app/public/javascripts/controls.js +963 -0
  127. data/test/test_app/public/javascripts/dragdrop.js +972 -0
  128. data/test/test_app/public/javascripts/effects.js +1120 -0
  129. data/test/test_app/public/javascripts/prototype.js +4225 -0
  130. data/test/test_app/public/robots.txt +1 -0
  131. data/test/test_app/script/about +3 -0
  132. data/test/test_app/script/breakpointer +3 -0
  133. data/test/test_app/script/console +3 -0
  134. data/test/test_app/script/destroy +3 -0
  135. data/test/test_app/script/generate +3 -0
  136. data/test/test_app/script/performance/benchmarker +3 -0
  137. data/test/test_app/script/performance/profiler +3 -0
  138. data/test/test_app/script/performance/request +3 -0
  139. data/test/test_app/script/plugin +3 -0
  140. data/test/test_app/script/process/inspector +3 -0
  141. data/test/test_app/script/process/reaper +3 -0
  142. data/test/test_app/script/process/spawner +3 -0
  143. data/test/test_app/script/runner +3 -0
  144. data/test/test_app/script/server +3 -0
  145. data/test/test_app/test/functional/db_fast_controller_test.rb +18 -0
  146. data/test/test_app/test/functional/fast_controller_test.rb +18 -0
  147. data/test/test_app/test/functional/slow_controller_test.rb +18 -0
  148. data/test/test_app/test/functional/very_slow_controller_test.rb +18 -0
  149. data/test/test_app/test/test_helper.rb +28 -0
  150. metadata +263 -0
@@ -0,0 +1,628 @@
1
+ # Ec2onRails NOTE: this file is only used if the :harden_server ec2onrails
2
+ # configuration is set to true
3
+ #
4
+
5
+
6
+ ############ THESE SETTINGS ARE REQUIRED ############
7
+
8
+ ########################################################################
9
+ #
10
+ # SECURE_LOG: the log file that contains sshd logging info
11
+ # if you are not sure, grep "sshd:" /var/log/*
12
+ #
13
+ # The file to process can be overridden with the --file command line
14
+ # argument
15
+ #
16
+ # Redhat or Fedora Core:
17
+ #SECURE_LOG = /var/log/secure
18
+ #
19
+ # Mandrake, FreeBSD or OpenBSD:
20
+ #SECURE_LOG = /var/log/auth.log
21
+ #
22
+ # SuSE:
23
+ #SECURE_LOG = /var/log/messages
24
+ #
25
+ # Mac OS X (v10.4 or greater -
26
+ # also refer to: http://www.denyhosts.net/faq.html#macos
27
+ #SECURE_LOG = /private/var/log/asl.log
28
+ #
29
+ # Mac OS X (v10.3 or earlier):
30
+ #SECURE_LOG=/private/var/log/system.log
31
+ #
32
+ # Debian:
33
+ SECURE_LOG = /var/log/auth.log
34
+ ########################################################################
35
+
36
+ ########################################################################
37
+ #
38
+ # HOSTS_DENY: the file which contains restricted host access information
39
+ #
40
+ # Most operating systems:
41
+ HOSTS_DENY = /etc/hosts.deny
42
+ #
43
+ # Some BSD (FreeBSD) Unixes:
44
+ #HOSTS_DENY = /etc/hosts.allow
45
+ #
46
+ # Another possibility (also see the next option):
47
+ #HOSTS_DENY = /etc/hosts.evil
48
+ #######################################################################
49
+
50
+
51
+ ########################################################################
52
+ #
53
+ # PURGE_DENY: removed HOSTS_DENY entries that are older than this time
54
+ # when DenyHosts is invoked with the --purge flag
55
+ #
56
+ # format is: i[dhwmy]
57
+ # Where 'i' is an integer (eg. 7)
58
+ # 'm' = minutes
59
+ # 'h' = hours
60
+ # 'd' = days
61
+ # 'w' = weeks
62
+ # 'y' = years
63
+ #
64
+ PURGE_DENY = 12w
65
+ # never purge:
66
+ #PURGE_DENY =
67
+ #
68
+ # purge entries older than 1 week
69
+ #PURGE_DENY = 1w
70
+ #
71
+ # purge entries older than 5 days
72
+ #PURGE_DENY = 5d
73
+ #######################################################################
74
+
75
+ #######################################################################
76
+ #
77
+ # PURGE_THRESHOLD: defines the maximum times a host will be purged.
78
+ # Once this value has been exceeded then this host will not be purged.
79
+ # Setting this parameter to 0 (the default) disables this feature.
80
+ #
81
+ # default: a denied host can be purged/re-added indefinitely
82
+ #PURGE_THRESHOLD = 0
83
+ #
84
+ # a denied host will be purged at most 2 times.
85
+ #PURGE_THRESHOLD = 2
86
+ #
87
+ #######################################################################
88
+
89
+
90
+ #######################################################################
91
+ #
92
+ # BLOCK_SERVICE: the service name that should be blocked in HOSTS_DENY
93
+ #
94
+ # man 5 hosts_access for details
95
+ #
96
+ # eg. sshd: 127.0.0.1 # will block sshd logins from 127.0.0.1
97
+ #
98
+ # To block all services for the offending host:
99
+ #BLOCK_SERVICE = ALL
100
+ # To block only sshd:
101
+ BLOCK_SERVICE = sshd
102
+ # To only record the offending host and nothing else (if using
103
+ # an auxilary file to list the hosts). Refer to:
104
+ # http://denyhosts.sourceforge.net/faq.html#aux
105
+ #BLOCK_SERVICE =
106
+ #
107
+ #######################################################################
108
+
109
+
110
+ #######################################################################
111
+ #
112
+ # DENY_THRESHOLD_INVALID: block each host after the number of failed login
113
+ # attempts has exceeded this value. This value applies to invalid
114
+ # user login attempts (eg. non-existent user accounts)
115
+ #
116
+ DENY_THRESHOLD_INVALID = 3
117
+ #
118
+ #######################################################################
119
+
120
+ #######################################################################
121
+ #
122
+ # DENY_THRESHOLD_VALID: block each host after the number of failed
123
+ # login attempts has exceeded this value. This value applies to valid
124
+ # user login attempts (eg. user accounts that exist in /etc/passwd) except
125
+ # for the "root" user
126
+ #
127
+ DENY_THRESHOLD_VALID = 3
128
+ #
129
+ #######################################################################
130
+
131
+ #######################################################################
132
+ #
133
+ # DENY_THRESHOLD_ROOT: block each host after the number of failed
134
+ # login attempts has exceeded this value. This value applies to
135
+ # "root" user login attempts only.
136
+ #
137
+ DENY_THRESHOLD_ROOT = 2
138
+ #
139
+ #######################################################################
140
+
141
+
142
+ #######################################################################
143
+ #
144
+ # DENY_THRESHOLD_RESTRICTED: block each host after the number of failed
145
+ # login attempts has exceeded this value. This value applies to
146
+ # usernames that appear in the WORK_DIR/restricted-usernames file only.
147
+ #
148
+ DENY_THRESHOLD_RESTRICTED = 1
149
+ #
150
+ #######################################################################
151
+
152
+
153
+ #######################################################################
154
+ #
155
+ # WORK_DIR: the path that DenyHosts will use for writing data to
156
+ # (it will be created if it does not already exist).
157
+ #
158
+ # Note: it is recommended that you use an absolute pathname
159
+ # for this value (eg. /home/foo/denyhosts/data)
160
+ #
161
+ WORK_DIR = /var/lib/denyhosts
162
+ #
163
+ #######################################################################
164
+
165
+ #######################################################################
166
+ #
167
+ # SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS
168
+ #
169
+ # SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES|NO
170
+ # If set to YES, if a suspicious login attempt results from an allowed-host
171
+ # then it is considered suspicious. If this is NO, then suspicious logins
172
+ # from allowed-hosts will not be reported. All suspicious logins from
173
+ # ip addresses that are not in allowed-hosts will always be reported.
174
+ #
175
+ SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES
176
+ ######################################################################
177
+
178
+ ######################################################################
179
+ #
180
+ # HOSTNAME_LOOKUP
181
+ #
182
+ # HOSTNAME_LOOKUP=YES|NO
183
+ # If set to YES, for each IP address that is reported by Denyhosts,
184
+ # the corresponding hostname will be looked up and reported as well
185
+ # (if available).
186
+ #
187
+ HOSTNAME_LOOKUP=YES
188
+ #
189
+ ######################################################################
190
+
191
+
192
+ ######################################################################
193
+ #
194
+ # LOCK_FILE
195
+ #
196
+ # LOCK_FILE=/path/denyhosts
197
+ # If this file exists when DenyHosts is run, then DenyHosts will exit
198
+ # immediately. Otherwise, this file will be created upon invocation
199
+ # and deleted upon exit. This ensures that only one instance is
200
+ # running at a time.
201
+ #
202
+ # Redhat/Fedora:
203
+ #LOCK_FILE = /var/lock/subsys/denyhosts
204
+ #
205
+ # Debian
206
+ LOCK_FILE = /var/run/denyhosts.pid
207
+ #
208
+ # Misc
209
+ #LOCK_FILE = /tmp/denyhosts.lock
210
+ #
211
+ ######################################################################
212
+
213
+
214
+ ############ THESE SETTINGS ARE OPTIONAL ############
215
+
216
+
217
+ #######################################################################
218
+ #
219
+ # ADMIN_EMAIL: if you would like to receive emails regarding newly
220
+ # restricted hosts and suspicious logins, set this address to
221
+ # match your email address. If you do not want to receive these reports
222
+ # leave this field blank (or run with the --noemail option)
223
+ #
224
+ # Multiple email addresses can be delimited by a comma, eg:
225
+ # ADMIN_EMAIL = foo@bar.com, bar@foo.com, etc@foobar.com
226
+ #
227
+ ADMIN_EMAIL = admin@localhost
228
+ #
229
+ #######################################################################
230
+
231
+ #######################################################################
232
+ #
233
+ # SMTP_HOST and SMTP_PORT: if DenyHosts is configured to email
234
+ # reports (see ADMIN_EMAIL) then these settings specify the
235
+ # email server address (SMTP_HOST) and the server port (SMTP_PORT)
236
+ #
237
+ #
238
+ SMTP_HOST = localhost
239
+ SMTP_PORT = 25
240
+ #
241
+ #######################################################################
242
+
243
+ #######################################################################
244
+ #
245
+ # SMTP_USERNAME and SMTP_PASSWORD: set these parameters if your
246
+ # smtp email server requires authentication
247
+ #
248
+ #SMTP_USERNAME=foo
249
+ #SMTP_PASSWORD=bar
250
+ #
251
+ ######################################################################
252
+
253
+ #######################################################################
254
+ #
255
+ # SMTP_FROM: you can specify the "From:" address in messages sent
256
+ # from DenyHosts when it reports thwarted abuse attempts
257
+ #
258
+ SMTP_FROM = DenyHosts <nobody@localhost>
259
+ #
260
+ #######################################################################
261
+
262
+ #######################################################################
263
+ #
264
+ # SMTP_SUBJECT: you can specify the "Subject:" of messages sent
265
+ # by DenyHosts when it reports thwarted abuse attempts
266
+ SMTP_SUBJECT = DenyHosts Report
267
+ #
268
+ ######################################################################
269
+
270
+ ######################################################################
271
+ #
272
+ # SMTP_DATE_FORMAT: specifies the format used for the "Date:" header
273
+ # when sending email messages.
274
+ #
275
+ # for possible values for this parameter refer to: man strftime
276
+ #
277
+ # the default:
278
+ #
279
+ #SMTP_DATE_FORMAT = %a, %d %b %Y %H:%M:%S %z
280
+ #
281
+ ######################################################################
282
+
283
+ ######################################################################
284
+ #
285
+ # SYSLOG_REPORT
286
+ #
287
+ # SYSLOG_REPORT=YES|NO
288
+ # If set to yes, when denied hosts are recorded the report data
289
+ # will be sent to syslog (syslog must be present on your system).
290
+ # The default is: NO
291
+ #
292
+ #SYSLOG_REPORT=NO
293
+ #
294
+ #SYSLOG_REPORT=YES
295
+ #
296
+ ######################################################################
297
+
298
+ ######################################################################
299
+ #
300
+ # ALLOWED_HOSTS_HOSTNAME_LOOKUP
301
+ #
302
+ # ALLOWED_HOSTS_HOSTNAME_LOOKUP=YES|NO
303
+ # If set to YES, for each entry in the WORK_DIR/allowed-hosts file,
304
+ # the hostname will be looked up. If your versions of tcp_wrappers
305
+ # and sshd sometimes log hostnames in addition to ip addresses
306
+ # then you may wish to specify this option.
307
+ #
308
+ #ALLOWED_HOSTS_HOSTNAME_LOOKUP=NO
309
+ #
310
+ ######################################################################
311
+
312
+ ######################################################################
313
+ #
314
+ # AGE_RESET_VALID: Specifies the period of time between failed login
315
+ # attempts that, when exceeded will result in the failed count for
316
+ # this host to be reset to 0. This value applies to login attempts
317
+ # to all valid users (those within /etc/passwd) with the
318
+ # exception of root. If not defined, this count will never
319
+ # be reset.
320
+ #
321
+ # See the comments in the PURGE_DENY section (above)
322
+ # for details on specifying this value or for complete details
323
+ # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
324
+ #
325
+ AGE_RESET_VALID=5d
326
+ #
327
+ ######################################################################
328
+
329
+ ######################################################################
330
+ #
331
+ # AGE_RESET_ROOT: Specifies the period of time between failed login
332
+ # attempts that, when exceeded will result in the failed count for
333
+ # this host to be reset to 0. This value applies to all login
334
+ # attempts to the "root" user account. If not defined,
335
+ # this count will never be reset.
336
+ #
337
+ # See the comments in the PURGE_DENY section (above)
338
+ # for details on specifying this value or for complete details
339
+ # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
340
+ #
341
+ AGE_RESET_ROOT=25d
342
+ #
343
+ ######################################################################
344
+
345
+ ######################################################################
346
+ #
347
+ # AGE_RESET_RESTRICTED: Specifies the period of time between failed login
348
+ # attempts that, when exceeded will result in the failed count for
349
+ # this host to be reset to 0. This value applies to all login
350
+ # attempts to entries found in the WORK_DIR/restricted-usernames file.
351
+ # If not defined, the count will never be reset.
352
+ #
353
+ # See the comments in the PURGE_DENY section (above)
354
+ # for details on specifying this value or for complete details
355
+ # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
356
+ #
357
+ AGE_RESET_RESTRICTED=25d
358
+ #
359
+ ######################################################################
360
+
361
+
362
+ ######################################################################
363
+ #
364
+ # AGE_RESET_INVALID: Specifies the period of time between failed login
365
+ # attempts that, when exceeded will result in the failed count for
366
+ # this host to be reset to 0. This value applies to login attempts
367
+ # made to any invalid username (those that do not appear
368
+ # in /etc/passwd). If not defined, count will never be reset.
369
+ #
370
+ # See the comments in the PURGE_DENY section (above)
371
+ # for details on specifying this value or for complete details
372
+ # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
373
+ #
374
+ AGE_RESET_INVALID=10d
375
+ #
376
+ ######################################################################
377
+
378
+
379
+ ######################################################################
380
+ #
381
+ # RESET_ON_SUCCESS: If this parameter is set to "yes" then the
382
+ # failed count for the respective ip address will be reset to 0
383
+ # if the login is successful.
384
+ #
385
+ # The default is RESET_ON_SUCCESS = no
386
+ #
387
+ RESET_ON_SUCCESS = yes
388
+ #
389
+ #####################################################################
390
+
391
+
392
+ ######################################################################
393
+ #
394
+ # PLUGIN_DENY: If set, this value should point to an executable
395
+ # program that will be invoked when a host is added to the
396
+ # HOSTS_DENY file. This executable will be passed the host
397
+ # that will be added as its only argument.
398
+ #
399
+ #PLUGIN_DENY=/usr/bin/true
400
+ #
401
+ ######################################################################
402
+
403
+
404
+ ######################################################################
405
+ #
406
+ # PLUGIN_PURGE: If set, this value should point to an executable
407
+ # program that will be invoked when a host is removed from the
408
+ # HOSTS_DENY file. This executable will be passed the host
409
+ # that is to be purged as its only argument.
410
+ #
411
+ #PLUGIN_PURGE=/usr/bin/true
412
+ #
413
+ ######################################################################
414
+
415
+ ######################################################################
416
+ #
417
+ # USERDEF_FAILED_ENTRY_REGEX: if set, this value should contain
418
+ # a regular expression that can be used to identify additional
419
+ # hackers for your particular ssh configuration. This functionality
420
+ # extends the built-in regular expressions that DenyHosts uses.
421
+ # This parameter can be specified multiple times.
422
+ # See this faq entry for more details:
423
+ # http://denyhosts.sf.net/faq.html#userdef_regex
424
+ #
425
+ #USERDEF_FAILED_ENTRY_REGEX=
426
+ #
427
+ #
428
+ ######################################################################
429
+
430
+
431
+
432
+
433
+ ######### THESE SETTINGS ARE SPECIFIC TO DAEMON MODE ##########
434
+
435
+
436
+
437
+ #######################################################################
438
+ #
439
+ # DAEMON_LOG: when DenyHosts is run in daemon mode (--daemon flag)
440
+ # this is the logfile that DenyHosts uses to report its status.
441
+ # To disable logging, leave blank. (default is: /var/log/denyhosts)
442
+ #
443
+ DAEMON_LOG = /var/log/denyhosts
444
+ #
445
+ # disable logging:
446
+ #DAEMON_LOG =
447
+ #
448
+ ######################################################################
449
+
450
+ #######################################################################
451
+ #
452
+ # DAEMON_LOG_TIME_FORMAT: when DenyHosts is run in daemon mode
453
+ # (--daemon flag) this specifies the timestamp format of
454
+ # the DAEMON_LOG messages (default is the ISO8061 format:
455
+ # ie. 2005-07-22 10:38:01,745)
456
+ #
457
+ # for possible values for this parameter refer to: man strftime
458
+ #
459
+ # Jan 1 13:05:59
460
+ #DAEMON_LOG_TIME_FORMAT = %b %d %H:%M:%S
461
+ #
462
+ # Jan 1 01:05:59
463
+ #DAEMON_LOG_TIME_FORMAT = %b %d %I:%M:%S
464
+ #
465
+ ######################################################################
466
+
467
+ #######################################################################
468
+ #
469
+ # DAEMON_LOG_MESSAGE_FORMAT: when DenyHosts is run in daemon mode
470
+ # (--daemon flag) this specifies the message format of each logged
471
+ # entry. By default the following format is used:
472
+ #
473
+ # %(asctime)s - %(name)-12s: %(levelname)-8s %(message)s
474
+ #
475
+ # Where the "%(asctime)s" portion is expanded to the format
476
+ # defined by DAEMON_LOG_TIME_FORMAT
477
+ #
478
+ # This string is passed to python's logging.Formatter contstuctor.
479
+ # For details on the possible format types please refer to:
480
+ # http://docs.python.org/lib/node357.html
481
+ #
482
+ # This is the default:
483
+ #DAEMON_LOG_MESSAGE_FORMAT = %(asctime)s - %(name)-12s: %(levelname)-8s %(message)s
484
+ #
485
+ #
486
+ ######################################################################
487
+
488
+
489
+ #######################################################################
490
+ #
491
+ # DAEMON_SLEEP: when DenyHosts is run in daemon mode (--daemon flag)
492
+ # this is the amount of time DenyHosts will sleep between polling
493
+ # the SECURE_LOG. See the comments in the PURGE_DENY section (above)
494
+ # for details on specifying this value or for complete details
495
+ # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
496
+ #
497
+ #
498
+ DAEMON_SLEEP = 1m
499
+ #
500
+ #######################################################################
501
+
502
+ #######################################################################
503
+ #
504
+ # DAEMON_PURGE: How often should DenyHosts, when run in daemon mode,
505
+ # run the purge mechanism to expire old entries in HOSTS_DENY
506
+ # This has no effect if PURGE_DENY is blank.
507
+ #
508
+ DAEMON_PURGE = 1h
509
+ #
510
+ #######################################################################
511
+
512
+
513
+ ######### THESE SETTINGS ARE SPECIFIC TO ##########
514
+ ######### DAEMON SYNCHRONIZATION ##########
515
+
516
+
517
+ #######################################################################
518
+ #
519
+ # Synchronization mode allows the DenyHosts daemon the ability
520
+ # to periodically send and receive denied host data such that
521
+ # DenyHosts daemons worldwide can automatically inform one
522
+ # another regarding banned hosts. This mode is disabled by
523
+ # default, you must uncomment SYNC_SERVER to enable this mode.
524
+ #
525
+ # for more information, please refer to:
526
+ # http:/denyhosts.sourceforge.net/faq.html#sync
527
+ #
528
+ #######################################################################
529
+
530
+
531
+ #######################################################################
532
+ #
533
+ # SYNC_SERVER: The central server that communicates with DenyHost
534
+ # daemons. Currently, denyhosts.net is the only available server
535
+ # however, in the future, it may be possible for organizations to
536
+ # install their own server for internal network synchronization
537
+ #
538
+ # To disable synchronization (the default), do nothing.
539
+ #
540
+ # To enable synchronization, you must uncomment the following line:
541
+ #SYNC_SERVER = http://xmlrpc.denyhosts.net:9911
542
+ #
543
+ #######################################################################
544
+
545
+ #######################################################################
546
+ #
547
+ # SYNC_INTERVAL: the interval of time to perform synchronizations if
548
+ # SYNC_SERVER has been uncommented. The default is 1 hour.
549
+ #
550
+ #SYNC_INTERVAL = 1h
551
+ #
552
+ #######################################################################
553
+
554
+
555
+ #######################################################################
556
+ #
557
+ # SYNC_UPLOAD: allow your DenyHosts daemon to transmit hosts that have
558
+ # been denied? This option only applies if SYNC_SERVER has
559
+ # been uncommented.
560
+ # The default is SYNC_UPLOAD = yes
561
+ #
562
+ #SYNC_UPLOAD = no
563
+ #SYNC_UPLOAD = yes
564
+ #
565
+ #######################################################################
566
+
567
+
568
+ #######################################################################
569
+ #
570
+ # SYNC_DOWNLOAD: allow your DenyHosts daemon to receive hosts that have
571
+ # been denied by others? This option only applies if SYNC_SERVER has
572
+ # been uncommented.
573
+ # The default is SYNC_DOWNLOAD = yes
574
+ #
575
+ #SYNC_DOWNLOAD = no
576
+ #SYNC_DOWNLOAD = yes
577
+ #
578
+ #
579
+ #
580
+ #######################################################################
581
+
582
+ #######################################################################
583
+ #
584
+ # SYNC_DOWNLOAD_THRESHOLD: If SYNC_DOWNLOAD is enabled this parameter
585
+ # filters the returned hosts to those that have been blocked this many
586
+ # times by others. That is, if set to 1, then if a single DenyHosts
587
+ # server has denied an ip address then you will receive the denied host.
588
+ #
589
+ # See also SYNC_DOWNLOAD_RESILIENCY
590
+ #
591
+ #SYNC_DOWNLOAD_THRESHOLD = 10
592
+ #
593
+ # The default is SYNC_DOWNLOAD_THRESHOLD = 3
594
+ #
595
+ #SYNC_DOWNLOAD_THRESHOLD = 3
596
+ #
597
+ #######################################################################
598
+
599
+ #######################################################################
600
+ #
601
+ # SYNC_DOWNLOAD_RESILIENCY: If SYNC_DOWNLOAD is enabled then the
602
+ # value specified for this option limits the downloaded data
603
+ # to this resiliency period or greater.
604
+ #
605
+ # Resiliency is defined as the timespan between a hackers first known
606
+ # attack and its most recent attack. Example:
607
+ #
608
+ # If the centralized denyhosts.net server records an attack at 2 PM
609
+ # and then again at 5 PM, specifying a SYNC_DOWNLOAD_RESILIENCY = 4h
610
+ # will not download this ip address.
611
+ #
612
+ # However, if the attacker is recorded again at 6:15 PM then the
613
+ # ip address will be downloaded by your DenyHosts instance.
614
+ #
615
+ # This value is used in conjunction with the SYNC_DOWNLOAD_THRESHOLD
616
+ # and only hosts that satisfy both values will be downloaded.
617
+ # This value has no effect if SYNC_DOWNLOAD_THRESHOLD = 1
618
+ #
619
+ # The default is SYNC_DOWNLOAD_RESILIENCY = 5h (5 hours)
620
+ #
621
+ # Only obtain hackers that have been at it for 2 days or more:
622
+ #SYNC_DOWNLOAD_RESILIENCY = 2d
623
+ #
624
+ # Only obtain hackers that have been at it for 5 hours or more:
625
+ #SYNC_DOWNLOAD_RESILIENCY = 5h
626
+ #
627
+ #######################################################################
628
+
@@ -0,0 +1,13 @@
1
+ # dpkg configuration file
2
+ #
3
+ # This file can contain default options for dpkg. All command-line
4
+ # options are allowed. Values can be specified by putting them after
5
+ # the option, separated by whitespace and/or an `=' sign.
6
+ #
7
+
8
+ # ec2onrails note: if we have a config file already up here, we want to use
9
+ # that over the packages default.
10
+ force-confold
11
+
12
+ # Log status changes and actions to a file.
13
+ log /var/log/dpkg.log
@@ -0,0 +1,6 @@
1
+ BalancerMember http://127.0.0.1:8000
2
+ BalancerMember http://127.0.0.1:8001
3
+ BalancerMember http://127.0.0.1:8002
4
+ BalancerMember http://127.0.0.1:8003
5
+ BalancerMember http://127.0.0.1:8004
6
+ BalancerMember http://127.0.0.1:8005
@@ -0,0 +1,5 @@
1
+ ---
2
+ :memcache:
3
+ :db_primary:
4
+ :app:
5
+ :web:
@@ -0,0 +1,2 @@
1
+ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ec2onrails/bin"
2
+ RUBYLIB=/usr/lib/ruby/1.8:/usr/local/lib/1.8/i486-linux:/usr/lib/site_ruby
@@ -0,0 +1,13 @@
1
+ description "monit daemon"
2
+ author "Paul Dowman <paul@pauldowman.com>"
3
+
4
+ start on runlevel 2
5
+ start on runlevel 3
6
+ start on runlevel 4
7
+ start on runlevel 5
8
+
9
+ stop on runlevel 0
10
+ stop on runlevel 6
11
+
12
+ exec /usr/local/bin/monit -I
13
+ respawn
@@ -0,0 +1,29 @@
1
+ #!/bin/sh
2
+
3
+ # This file is part of EC2 on Rails.
4
+ # http://rubyforge.org/projects/ec2onrails/
5
+ #
6
+ # Copyright 2007 Paul Dowman, http://pauldowman.com/
7
+ #
8
+ # EC2 on Rails is free software; you can redistribute it and/or modify
9
+ # it under the terms of the GNU General Public License as published by
10
+ # the Free Software Foundation; either version 2 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # EC2 on Rails is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+
21
+
22
+ # This script runs the ec2 startup scripts
23
+
24
+ # this is an ugly hack to make sure DHCP initialization is finished:
25
+ sleep 15
26
+
27
+ for SCRIPT in `ls -I README /usr/local/ec2onrails/startup-scripts/every-startup` ; do
28
+ "/usr/local/ec2onrails/startup-scripts/every-startup/$SCRIPT"
29
+ done