rubber 2.6.5 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG +37 -0
- data/lib/rubber/cloud/vsphere.rb +4 -0
- data/lib/rubber/generator.rb +37 -19
- data/lib/rubber/recipes/rubber/security_groups.rb +1 -1
- data/lib/rubber/recipes/rubber/volumes.rb +1 -1
- data/lib/rubber/version.rb +1 -1
- data/templates/delayed_job/config/rubber/deploy-delayed_job.rb +44 -0
- data/templates/delayed_job/config/rubber/role/delayed_job/monit-delayed_job.conf +18 -0
- data/templates/delayed_job/config/rubber/rubber-delayed_job.yml +1 -0
- data/templates/delayed_job/templates.yml +1 -0
- data/templates/discourse/config/rubber/deploy-discourse.rb +16 -0
- data/templates/discourse/config/rubber/role/nginx/nginx.conf +43 -0
- data/templates/discourse/config/rubber/role/nginx/unicorn_nginx.conf +102 -0
- data/templates/discourse/config/rubber/role/unicorn/unicorn.rb +99 -0
- data/templates/discourse/config/rubber/rubber-discourse.yml +3 -0
- data/templates/discourse/templates.yml +5 -0
- data/templates/elasticsearch/config/rubber/deploy-elasticsearch.rb +7 -7
- data/templates/elasticsearch/config/rubber/role/elasticsearch/elasticsearch-default.conf +47 -0
- data/templates/elasticsearch/config/rubber/role/elasticsearch/elasticsearch.yml +49 -30
- data/templates/elasticsearch/config/rubber/role/elasticsearch/logging.yml +14 -3
- data/templates/elasticsearch/config/rubber/role/elasticsearch/monit-elasticsearch.conf +8 -0
- data/templates/elasticsearch/config/rubber/rubber-elasticsearch.yml +1 -4
- data/templates/ffmpeg/config/rubber/deploy-ffmpeg.rb +13 -0
- data/templates/ffmpeg/config/rubber/rubber-ffmpeg.yml +5 -0
- data/templates/ffmpeg/templates.yml +1 -0
- data/templates/graylog/config/rubber/deploy-graylog.rb +17 -20
- data/templates/graylog/config/rubber/role/graylog_server/graylog2.conf +157 -43
- data/templates/graylog/config/rubber/role/graylog_server/monit-graylog_server.conf +8 -0
- data/templates/graylog/config/rubber/role/graylog_web/graylog2-web-interface.conf +19 -0
- data/templates/graylog/config/rubber/role/graylog_web/graylog_web-upstart.conf +1 -1
- data/templates/graylog/config/rubber/role/graylog_web/monit-graylog_web.conf +8 -0
- data/templates/graylog/config/rubber/rubber-graylog.yml +5 -12
- data/templates/graylog/templates.rb +13 -5
- data/templates/memcached/config/rubber/deploy-memcached.rb +16 -0
- data/templates/memcached/config/rubber/role/memcached/dalli.rb +20 -0
- data/templates/memcached/config/rubber/role/memcached/memcached.conf +17 -8
- data/templates/memcached/config/rubber/rubber-memcached.yml +25 -1
- data/templates/monit/config/rubber/role/memcached/monit-memcached.conf +9 -0
- data/templates/monit/config/rubber/role/mongodb/monit-mongodb.conf +1 -0
- data/templates/mysql/config/rubber/deploy-mysql.rb +1 -2
- data/templates/newrelic/config/rubber/deploy-newrelic.rb +49 -0
- data/templates/newrelic/config/rubber/role/newrelic/monit-newrelic.conf +9 -0
- data/templates/newrelic/config/rubber/rubber-newrelic.yml +5 -0
- data/templates/newrelic/templates.yml +1 -0
- data/templates/passenger_nginx/config/rubber/deploy-passenger_nginx.rb +7 -4
- data/templates/passenger_nginx/config/rubber/rubber-passenger_nginx.yml +1 -0
- data/templates/redis/config/rubber/role/redis/redis.conf +120 -16
- data/templates/redis/config/rubber/rubber-redis.yml +1 -1
- data/templates/solr/config/rubber/deploy-solr.rb +8 -8
- data/templates/solr/config/rubber/rubber-solr.yml +6 -6
- data/templates/solr/templates.yml +1 -3
- data/templates/solr_sunspot/config/rubber/common/solr_sunspot.yml +10 -0
- data/templates/solr_sunspot/config/rubber/deploy-solr_sunspot.rb +30 -0
- data/templates/solr_sunspot/config/rubber/rubber-solr_sunspot.yml +5 -0
- data/templates/solr_sunspot/templates.yml +1 -0
- data/templates/unicorn/config/rubber/deploy-unicorn.rb +16 -11
- data/templates/unicorn/config/rubber/role/unicorn/unicorn +91 -0
- data/test/generator_test.rb +54 -0
- data/test/test_helper.rb +2 -0
- metadata +31 -11
- data/templates/elasticsearch/config/rubber/role/elasticsearch/elasticsearch-upstart.conf +0 -23
- data/templates/graylog/config/initializers/graylog.rb +0 -53
- data/templates/graylog/config/rubber/role/graylog_web/crontab +0 -9
- data/templates/graylog/config/rubber/role/graylog_web/email.yml +0 -16
- data/templates/graylog/config/rubber/role/graylog_web/general.yml +0 -27
- data/templates/graylog/config/rubber/role/graylog_web/mongoid.yml +0 -28
- data/templates/memcached/config/memcached.yml +0 -28
- data/templates/memcached/config/rubber/common/memcached.yml +0 -14
- data/templates/unicorn/config/rubber/role/unicorn/unicorn-upstart.conf +0 -13
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@path = "/etc/init/elasticsearch.conf"
|
|
3
|
-
@backup = false
|
|
4
|
-
%>
|
|
5
|
-
description "elasticsearch server"
|
|
6
|
-
|
|
7
|
-
start on runlevel [2345]
|
|
8
|
-
stop on runlevel [016]
|
|
9
|
-
|
|
10
|
-
script
|
|
11
|
-
cd <%= rubber_env.elasticsearch_dir %>
|
|
12
|
-
ulimit -n 65536
|
|
13
|
-
exec ./bin/elasticsearch -f
|
|
14
|
-
end script
|
|
15
|
-
|
|
16
|
-
post-start script
|
|
17
|
-
status elasticsearch | head -n1 | awk '{print $NF}' > <%= rubber_env.elasticsearch_pid_file %>
|
|
18
|
-
while ! curl -s 'http://localhost:<%= rubber_env.elasticsearch_http_port %>/_status' > /dev/null 2>&1; do sleep 1 ; done
|
|
19
|
-
end script
|
|
20
|
-
|
|
21
|
-
post-stop script
|
|
22
|
-
rm -f <%= rubber_env.elasticsearch_pid_file %>
|
|
23
|
-
end script
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
require 'gelf'
|
|
2
|
-
|
|
3
|
-
graylog_server = Rubber.instances.for_role('graylog_server').first
|
|
4
|
-
|
|
5
|
-
if graylog_server
|
|
6
|
-
|
|
7
|
-
class MultiLogger
|
|
8
|
-
def initialize(*objects)
|
|
9
|
-
@objects = objects
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def method_missing(*args)
|
|
13
|
-
@objects.each {|o| o.send(*args) }
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
gelf_logger = GELF::Logger.new(graylog_server.full_name,
|
|
18
|
-
Rubber.config.graylog_server_port,
|
|
19
|
-
'LAN',
|
|
20
|
-
'facility' => 'rails',
|
|
21
|
-
'host' => Rubber.config.host)
|
|
22
|
-
Rails.logger = MultiLogger.new(Rails.logger, gelf_logger)
|
|
23
|
-
|
|
24
|
-
# See https://github.com/Graylog2/graylog2_exceptions/wiki
|
|
25
|
-
Rails.application.config.middleware.use "Graylog2Exceptions",
|
|
26
|
-
{
|
|
27
|
-
:hostname => graylog_server.full_name,
|
|
28
|
-
:port => Rubber.config.graylog_server_port,
|
|
29
|
-
:facility => "rails_exceptions",
|
|
30
|
-
:local_app_name => Rubber.config.host,
|
|
31
|
-
:level => GELF::FATAL,
|
|
32
|
-
:max_chunk_size => 'LAN'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
# Setup logging unhandled resque exceptions to graylog
|
|
36
|
-
Graylog2::Resque::FailureHandler.configure do |config|
|
|
37
|
-
config.gelf_server = graylog_server.full_name
|
|
38
|
-
config.gelf_port = Rubber.config.graylog_server_port
|
|
39
|
-
config.host = Rubber.config.host
|
|
40
|
-
config.facility = "resque_exceptions"
|
|
41
|
-
config.level = GELF::FATAL
|
|
42
|
-
config.max_chunk_size = 'LAN'
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
require 'resque/failure/multiple'
|
|
46
|
-
require 'resque/failure/redis'
|
|
47
|
-
Resque::Failure::Multiple.classes = [
|
|
48
|
-
Graylog2::Resque::FailureHandler,
|
|
49
|
-
Resque::Failure::Redis
|
|
50
|
-
]
|
|
51
|
-
Resque::Failure.backend = Resque::Failure::Multiple
|
|
52
|
-
|
|
53
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@read_cmd = 'crontab -l'
|
|
3
|
-
@write_cmd = 'crontab -'
|
|
4
|
-
@additive = ['# start-graylog-web-crontab', '# end-graylog-web-crontab']
|
|
5
|
-
%>
|
|
6
|
-
|
|
7
|
-
# use sudo/bash to unset bundle env vars since we are running a different
|
|
8
|
-
# rails app and redirect output to null to prevent bash-login from complaining about tty
|
|
9
|
-
*/15 * * * * sudo -u root bash -l -c "<%= Rubber.root %>/script/rubber cron -r <%= rubber_env.graylog_web_dir %> bundle exec rake subscriptions:send" &> /dev/null
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@path = "#{rubber_env.graylog_web_dir}/config/email.yml"
|
|
3
|
-
%>
|
|
4
|
-
|
|
5
|
-
# Config for pony email gem
|
|
6
|
-
|
|
7
|
-
production:
|
|
8
|
-
via: sendmail
|
|
9
|
-
# via: smtp # via: sendmail
|
|
10
|
-
# host: smtp.example.org
|
|
11
|
-
# enable_starttls_auto: true
|
|
12
|
-
# port: 25
|
|
13
|
-
# auth: plain # plain, login, cram_md5 - Comment out or remove to use no auth
|
|
14
|
-
# user: somebody
|
|
15
|
-
# password: yourpass
|
|
16
|
-
# domain: example.org # the HELO domain provided by the client to the server
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@path = "#{rubber_env.graylog_web_dir}/config/general.yml"
|
|
3
|
-
graylog_server = rubber_instances.for_role("graylog_server").first
|
|
4
|
-
webtools_server = rubber_instances.for_role("web_tools").first
|
|
5
|
-
%>
|
|
6
|
-
|
|
7
|
-
general:
|
|
8
|
-
external_hostname: "<%= webtools_server.full_name %>:<%= rubber_env.web_tools_port %>" # Used for example to generate permalinks. Don't add 'http://' or trailing slashes.
|
|
9
|
-
date_format: "%d.%m.%Y - %H:%M:%S" # http://ruby-doc.org/core/classes/Time.html#M000298 (strftime syntax)
|
|
10
|
-
allow_deleting: false # Allowing deleting of messages negatively impacts performance
|
|
11
|
-
allow_version_check: true # Enables manual (/versioncheck/index) and automatic (every 30min from overview page) version checking against graylog2.org via HTTP.
|
|
12
|
-
# custom_cookie_name: graylog2_staging1 # Set an own cookie name - Useful for multiple deployments on same host like example.org/staging1/graylog2, example.org/staging2/graylog2
|
|
13
|
-
|
|
14
|
-
# Settings for stream subscription emails.
|
|
15
|
-
subscriptions:
|
|
16
|
-
from: graylog2subscriptions@<%= rubber_env.domain %>
|
|
17
|
-
subject: "[graylog2] Subscription"
|
|
18
|
-
|
|
19
|
-
# Settings for stream alarm emails.
|
|
20
|
-
streamalarms:
|
|
21
|
-
from: graylog2alarms@<%= rubber_env.domain %>
|
|
22
|
-
subject: "[graylog2] Stream alarm!"
|
|
23
|
-
|
|
24
|
-
hoptoad:
|
|
25
|
-
enabled: false
|
|
26
|
-
ssl: false
|
|
27
|
-
api_key: 123
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@path = "#{rubber_env.graylog_web_dir}/config/mongoid.yml"
|
|
3
|
-
graylog_server = rubber_instances.for_role("graylog_server").first
|
|
4
|
-
%>
|
|
5
|
-
defaults: &defaults
|
|
6
|
-
host: localhost
|
|
7
|
-
allow_dynamic_fields: true
|
|
8
|
-
# slaves:
|
|
9
|
-
# - host: slave1.local
|
|
10
|
-
# port: 27018
|
|
11
|
-
# - host: slave2.local
|
|
12
|
-
# port: 27019
|
|
13
|
-
|
|
14
|
-
development:
|
|
15
|
-
<<: *defaults
|
|
16
|
-
database: graylog2_development
|
|
17
|
-
|
|
18
|
-
test:
|
|
19
|
-
<<: *defaults
|
|
20
|
-
database: graylog2_test
|
|
21
|
-
|
|
22
|
-
# set these environment variables on your prod server
|
|
23
|
-
production:
|
|
24
|
-
host: <%= graylog_server.full_name %>
|
|
25
|
-
port: 27017
|
|
26
|
-
username:
|
|
27
|
-
password:
|
|
28
|
-
database: <%= rubber_env.graylog_mongo_database %>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
defaults:
|
|
2
|
-
ttl: 1800
|
|
3
|
-
readonly: false
|
|
4
|
-
urlencode: false
|
|
5
|
-
c_threshold: 10000
|
|
6
|
-
compression: true
|
|
7
|
-
debug: false
|
|
8
|
-
namespace: app
|
|
9
|
-
sessions: false
|
|
10
|
-
session_servers: false
|
|
11
|
-
fragments: false
|
|
12
|
-
memory: 64
|
|
13
|
-
servers: localhost:11211
|
|
14
|
-
benchmarking: true
|
|
15
|
-
raise_errors: true
|
|
16
|
-
fast_hash: false
|
|
17
|
-
fastest_hash: false
|
|
18
|
-
|
|
19
|
-
development:
|
|
20
|
-
sessions: false
|
|
21
|
-
fragments: true
|
|
22
|
-
servers: localhost:11211
|
|
23
|
-
|
|
24
|
-
# turn off caching
|
|
25
|
-
test:
|
|
26
|
-
disabled: true
|
|
27
|
-
fragments: true
|
|
28
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@path = "#{Rubber.root}/config/memcached.yml"
|
|
3
|
-
@additive = ["# rubber-memcached-start", "# rubber-memcached-end"]
|
|
4
|
-
%>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<%= Rubber.env %>:
|
|
8
|
-
memory: 256
|
|
9
|
-
fragments: true
|
|
10
|
-
benchmarking: false
|
|
11
|
-
servers:
|
|
12
|
-
<% rubber_instances.for_role('memcached').each do |ic| %>
|
|
13
|
-
- <%= ic.full_name %>:11211
|
|
14
|
-
<% end %>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@path = "/etc/init/unicorn.conf"
|
|
3
|
-
current_path = "/mnt/#{rubber_env.app_name}-#{Rubber.env}/current"
|
|
4
|
-
@backup = false
|
|
5
|
-
%>
|
|
6
|
-
description "unicorn daemon"
|
|
7
|
-
|
|
8
|
-
start on runlevel [2345]
|
|
9
|
-
stop on runlevel [016]
|
|
10
|
-
|
|
11
|
-
script
|
|
12
|
-
exec /bin/bash -l -c 'cd <%= current_path %> && exec bundle exec unicorn_rails -c <%= current_path %>/config/unicorn.rb -E <%= Rubber.env %> -D >> log/unicorn_upstart.log 2>&1'
|
|
13
|
-
end script
|