rubber 2.12.2 → 2.13.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/CHANGELOG +27 -0
- data/lib/rubber/cli.rb +0 -1
- data/lib/rubber/cloud/aws_table_store.rb +1 -1
- data/lib/rubber/cloud/fog_storage.rb +1 -1
- data/lib/rubber/cloud/vsphere.rb +23 -1
- data/lib/rubber/commands/vulcanize.rb +1 -1
- data/lib/rubber/dns/aws.rb +4 -3
- data/lib/rubber/generator.rb +6 -2
- data/lib/rubber/instance.rb +48 -6
- data/lib/rubber/recipes/rubber.rb +8 -0
- data/lib/rubber/recipes/rubber/deploy.rb +9 -3
- data/lib/rubber/recipes/rubber/instances.rb +1 -0
- data/lib/rubber/recipes/rubber/setup.rb +10 -2
- data/lib/rubber/recipes/rubber/static_ips.rb +1 -1
- data/lib/rubber/recipes/rubber/utils.rb +8 -2
- data/lib/rubber/version.rb +1 -1
- data/templates/apache/config/rubber/deploy-apache.rb +1 -1
- data/templates/apache/config/rubber/role/web_tools/tools-apache-vhost.conf +8 -0
- data/templates/apache/config/rubber/rubber-apache.yml +2 -2
- data/templates/base/config/rubber/deploy-util.rb +3 -3
- data/templates/base/config/rubber/rubber.yml +8 -3
- data/templates/cassandra/config/rubber/deploy-cassandra.rb +2 -2
- data/templates/collectd/config/rubber/role/collectd/collectd-ping.conf +11 -2
- data/templates/collectd/config/rubber/role/collectd/thresholds.conf +1 -1
- data/templates/collectd/script/collectd/role/redis/redis_info.rb +0 -1
- data/templates/cruise/config/rubber/role/cruise/my.cnf +1 -1
- data/templates/graphite/config/rubber/deploy-graphite.rb +125 -69
- data/templates/graphite/config/rubber/role/graphite_server/carbon.conf +150 -26
- data/templates/graphite/config/rubber/role/graphite_server/graphite-carbon-default.conf +8 -0
- data/templates/graphite/config/rubber/role/graphite_server/graphite_server-upstart.conf +3 -0
- data/templates/graphite/config/rubber/role/graphite_server/storage-schemas.conf +2 -1
- data/templates/graphite/config/rubber/role/graphite_web/crontab +1 -1
- data/templates/graphite/config/rubber/role/graphite_web/dashboard.conf +1 -1
- data/templates/graphite/config/rubber/role/graphite_web/dashboard.html +1 -1
- data/templates/graphite/config/rubber/role/graphite_web/graphite.wsgi +4 -1
- data/templates/graphite/config/rubber/role/graphite_web/local_settings.py +171 -41
- data/templates/graphite/config/rubber/role/graphite_web/uwsgi.ini +6 -3
- data/templates/graphite/config/rubber/rubber-graphite.yml +7 -1
- data/templates/graphite/templates.rb +9 -0
- data/templates/graylog/config/rubber/common/graylog-rsyslog.conf +1 -1
- data/templates/graylog/config/rubber/role/graylog_server/graylog2.conf +2 -2
- data/templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf +5 -0
- data/templates/memcached/config/rubber/role/memcached/memcached.conf +1 -1
- data/templates/mysql/config/rubber/deploy-mysql.rb +2 -2
- data/templates/mysql/config/rubber/role/db/my.cnf +1 -1
- data/templates/mysql_cluster/config/rubber/deploy-mysql_cluster.rb +3 -3
- data/templates/mysql_cluster/config/rubber/role/mysql_sql/my.cnf +1 -1
- data/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf +12 -0
- data/templates/passenger/config/rubber/rubber-passenger.yml +1 -1
- data/templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf +1 -1
- data/templates/percona/config/rubber/deploy-percona.rb +2 -2
- data/templates/percona/config/rubber/role/db/my.cnf +1 -1
- data/templates/postgresql/config/rubber/deploy-postgresql.rb +4 -8
- data/templates/postgresql/config/rubber/role/postgresql/pg_hba.conf +1 -1
- data/templates/postgresql/config/rubber/role/postgresql/postgresql.conf +1 -1
- data/templates/redis/config/rubber/role/redis/redis.conf +1 -1
- data/templates/torquebox/config/rubber/role/app/torquebox-apache-vhost.conf +12 -0
- metadata +4 -2
@@ -1,5 +1,6 @@
|
|
1
1
|
<%
|
2
|
-
|
2
|
+
is_old_ubuntu = %w[10.04 12.04].include?(rubber_instance.os_version)
|
3
|
+
@path = is_old_ubuntu ? "#{rubber_env.graphite_dir}/conf/storage-schemas.conf" : '/etc/carbon/storage-schemas.conf'
|
3
4
|
%>
|
4
5
|
|
5
6
|
# Schema definitions for whisper files. Entries are scanned in order,
|
@@ -5,4 +5,4 @@
|
|
5
5
|
%>
|
6
6
|
|
7
7
|
# Backup graphite web UI db every day
|
8
|
-
0 1 * * * <%= Rubber.root %>/script/rubber cron --task util:backup --directory /mnt/graphite_backups --name graphite --command "nice zip
|
8
|
+
0 1 * * * <%= Rubber.root %>/script/rubber cron --task util:backup --directory /mnt/graphite_backups --name graphite --command "nice zip #{dir}/#{name}_<%= rubber_env.host %>_#{time_stamp}.zip <%= rubber_env.graphite_storage_dir %>/*.db"
|
@@ -1,5 +1,8 @@
|
|
1
1
|
<%
|
2
|
-
|
2
|
+
is_old_ubuntu = %w[10.04 12.04].include?(rubber_instance.os_version)
|
3
|
+
|
4
|
+
@path = "#{rubber_env.graphite_dir}/conf/graphite.wsgi"
|
5
|
+
@skip = ! is_old_ubuntu
|
3
6
|
%>
|
4
7
|
import os, sys
|
5
8
|
sys.path.append('/opt/graphite/webapp')
|
@@ -1,31 +1,128 @@
|
|
1
1
|
<%
|
2
|
-
|
2
|
+
is_old_ubuntu = %w[10.04 12.04].include?(rubber_instance.os_version)
|
3
|
+
|
4
|
+
@path = is_old_ubuntu ? "#{rubber_env.graphite_dir}/webapp/graphite/local_settings.py" : '/etc/graphite/local_settings.py'
|
3
5
|
%>
|
4
|
-
|
6
|
+
## Graphite local_settings.py
|
7
|
+
# Edit this file to customize the default Graphite webapp settings
|
8
|
+
#
|
9
|
+
# Additional customizations to Django settings can be added to this file as well
|
10
|
+
|
11
|
+
#####################################
|
12
|
+
# General Configuration #
|
13
|
+
#####################################
|
14
|
+
<% unless is_old_ubuntu %>
|
15
|
+
# Set this to a long, random unique string to use as a secret key for this
|
16
|
+
# install. This key is used for salting of hashes used in auth tokens,
|
17
|
+
# CRSF middleware, cookie storage, etc. This should be set identically among
|
18
|
+
# instances if used behind a load balancer.
|
19
|
+
SECRET_KEY = '<%= rubber_env.graphite_web_secret %>'
|
20
|
+
<% end %>
|
5
21
|
|
6
|
-
#
|
7
|
-
#
|
22
|
+
# In Django 1.5+ set this to the list of hosts your graphite instances is
|
23
|
+
# accessible as. See:
|
24
|
+
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-ALLOWED_HOSTS
|
25
|
+
ALLOWED_HOSTS = [ '*' ]
|
8
26
|
|
9
|
-
# Set your local timezone (
|
27
|
+
# Set your local timezone (Django's default is America/Chicago)
|
10
28
|
# If your graphs appear to be offset by a couple hours then this probably
|
11
29
|
# needs to be explicitly set to your local timezone.
|
12
30
|
TIME_ZONE = 'America/New_York'
|
13
31
|
|
14
|
-
#
|
15
|
-
#
|
16
|
-
|
32
|
+
# Override this to provide documentation specific to your Graphite deployment
|
33
|
+
#DOCUMENTATION_URL = "http://graphite.readthedocs.org/"
|
34
|
+
|
35
|
+
# Logging
|
36
|
+
# True see: https://answers.launchpad.net/graphite/+question/159731
|
37
|
+
LOG_RENDERING_PERFORMANCE = True
|
38
|
+
LOG_CACHE_PERFORMANCE = True
|
39
|
+
LOG_METRIC_ACCESS = True
|
40
|
+
|
41
|
+
# Enable full debug page display on exceptions (Internal Server Error pages)
|
42
|
+
DEBUG = True
|
43
|
+
|
44
|
+
# If using RRD files and rrdcached, set to the address or socket of the daemon
|
45
|
+
#FLUSHRRDCACHED = 'unix:/var/run/rrdcached.sock'
|
46
|
+
|
47
|
+
# This lists the memcached servers that will be used by this webapp.
|
48
|
+
# If you have a cluster of webapps you should ensure all of them
|
49
|
+
# have the *exact* same value for this setting. That will maximize cache
|
50
|
+
# efficiency. Setting MEMCACHE_HOSTS to be empty will turn off use of
|
51
|
+
# memcached entirely.
|
52
|
+
#
|
53
|
+
# You should not use the loopback address (127.0.0.1) here if using clustering
|
54
|
+
# as every webapp in the cluster should use the exact same values to prevent
|
55
|
+
# unneeded cache misses. Set to [] to disable caching of images and fetched data
|
56
|
+
#MEMCACHE_HOSTS = ['10.10.10.10:11211', '10.10.10.11:11211', '10.10.10.12:11211']
|
57
|
+
#DEFAULT_CACHE_DURATION = 60 # Cache images and data for 1 minute
|
58
|
+
|
59
|
+
|
60
|
+
#####################################
|
61
|
+
# Filesystem Paths #
|
62
|
+
#####################################
|
63
|
+
# Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite
|
64
|
+
# to somewhere else
|
65
|
+
<% if is_old_ubuntu %>
|
66
|
+
#GRAPHITE_ROOT = '/opt/graphite'
|
67
|
+
<% else %>
|
68
|
+
GRAPHITE_ROOT = '/usr/share/graphite-web'
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
# Most installs done outside of a separate tree such as /opt/graphite will only
|
72
|
+
# need to change these three settings. Note that the default settings for each
|
73
|
+
# of these is relative to GRAPHITE_ROOT
|
74
|
+
<% if is_old_ubuntu %>
|
75
|
+
#CONF_DIR = '/opt/graphite/conf'
|
76
|
+
#STORAGE_DIR = '/opt/graphite/storage'
|
77
|
+
#CONTENT_DIR = '/opt/graphite/webapp/content'
|
78
|
+
<% else %>
|
79
|
+
CONF_DIR = '/etc/graphite'
|
80
|
+
STORAGE_DIR = '<%= rubber_env.graphite_storage_dir %>'
|
81
|
+
CONTENT_DIR = '/usr/share/graphite-web/static'
|
82
|
+
<% end %>
|
17
83
|
|
18
|
-
#
|
19
|
-
#
|
84
|
+
# To further or fully customize the paths, modify the following. Note that the
|
85
|
+
# default settings for each of these are relative to CONF_DIR and STORAGE_DIR
|
86
|
+
#
|
87
|
+
## Webapp config files
|
88
|
+
#DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf'
|
89
|
+
#GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf'
|
20
90
|
|
21
|
-
|
22
|
-
#
|
91
|
+
## Data directories
|
92
|
+
# NOTE: If any directory is unreadable in DATA_DIRS it will break metric browsing
|
93
|
+
<% if is_old_ubuntu %>
|
94
|
+
#WHISPER_DIR = '/opt/graphite/storage/whisper'
|
95
|
+
#RRD_DIR = '/opt/graphite/storage/rrd'
|
96
|
+
#DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
|
97
|
+
#LOG_DIR = '/opt/graphite/storage/log/webapp'
|
98
|
+
#INDEX_FILE = '/opt/graphite/storage/index' # Search index file
|
99
|
+
<% else %>
|
100
|
+
#WHISPER_DIR = '/var/lib/graphite/whisper'
|
101
|
+
#RRD_DIR = '/opt/graphite/storage/rrd'
|
102
|
+
#DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
|
103
|
+
LOG_DIR = '/var/log/graphite'
|
104
|
+
#INDEX_FILE = '/var/lib/graphite/search_index' # Search index file
|
105
|
+
<% end %>
|
106
|
+
|
107
|
+
#####################################
|
108
|
+
# Email Configuration #
|
109
|
+
#####################################
|
110
|
+
# This is used for emailing rendered Graphs
|
111
|
+
# Default backend is SMTP
|
112
|
+
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
113
|
+
#EMAIL_HOST = 'localhost'
|
114
|
+
#EMAIL_PORT = 25
|
115
|
+
#EMAIL_HOST_USER = ''
|
116
|
+
#EMAIL_HOST_PASSWORD = ''
|
117
|
+
#EMAIL_USE_TLS = False
|
118
|
+
# To drop emails on the floor, enable the Dummy backend:
|
119
|
+
#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
|
23
120
|
|
24
121
|
|
25
122
|
#####################################
|
26
|
-
#
|
123
|
+
# Authentication Configuration #
|
27
124
|
#####################################
|
28
|
-
|
125
|
+
## LDAP / ActiveDirectory authentication setup
|
29
126
|
#USE_LDAP_AUTH = True
|
30
127
|
#LDAP_SERVER = "ldap.mycompany.com"
|
31
128
|
#LDAP_PORT = 389
|
@@ -47,24 +144,45 @@ TIME_ZONE = 'America/New_York'
|
|
47
144
|
#ldap.set_option(ldap.OPT_X_TLS_KEYFILE, "/etc/ssl/mykey.pem")
|
48
145
|
# See http://www.python-ldap.org/ for further details on these options.
|
49
146
|
|
147
|
+
## REMOTE_USER authentication. See: https://docs.djangoproject.com/en/dev/howto/auth-remote-user/
|
148
|
+
#USE_REMOTE_USER_AUTHENTICATION = True
|
149
|
+
|
150
|
+
# Override the URL for the login link (e.g. for django_openid_auth)
|
151
|
+
#LOGIN_URL = '/account/login'
|
152
|
+
|
50
153
|
|
51
154
|
##########################
|
52
155
|
# Database Configuration #
|
53
156
|
##########################
|
54
157
|
# By default sqlite is used. If you cluster multiple webapps you will need
|
55
|
-
# to setup an external database (
|
56
|
-
# to use the same database. Note that this database is only used to store
|
57
|
-
#
|
58
|
-
# data is not stored here.
|
158
|
+
# to setup an external database (such as MySQL) and configure all of the webapp
|
159
|
+
# instances to use the same database. Note that this database is only used to store
|
160
|
+
# Django models such as saved graphs, dashboards, user preferences, etc.
|
161
|
+
# Metric data is not stored here.
|
162
|
+
#
|
163
|
+
# DO NOT FORGET TO RUN 'manage.py syncdb' AFTER SETTING UP A NEW DATABASE
|
164
|
+
#
|
165
|
+
# The following built-in database engines are available:
|
166
|
+
# django.db.backends.postgresql # Removed in Django 1.4
|
167
|
+
# django.db.backends.postgresql_psycopg2
|
168
|
+
# django.db.backends.mysql
|
169
|
+
# django.db.backends.sqlite3
|
170
|
+
# django.db.backends.oracle
|
59
171
|
#
|
60
|
-
#
|
172
|
+
# The default is 'django.db.backends.sqlite3' with file 'graphite.db'
|
173
|
+
# located in STORAGE_DIR
|
61
174
|
#
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
175
|
+
DATABASES = {
|
176
|
+
'default': {
|
177
|
+
'NAME': '<%= rubber_env.graphite_storage_dir %>/graphite.db',
|
178
|
+
'ENGINE': 'django.db.backends.sqlite3',
|
179
|
+
'USER': '',
|
180
|
+
'PASSWORD': '',
|
181
|
+
'HOST': '',
|
182
|
+
'PORT': ''
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
68
186
|
|
69
187
|
|
70
188
|
#########################
|
@@ -72,27 +190,39 @@ TIME_ZONE = 'America/New_York'
|
|
72
190
|
#########################
|
73
191
|
# (To avoid excessive DNS lookups you want to stick to using IP addresses only in this entire section)
|
74
192
|
#
|
75
|
-
# This should list the IP address (and optionally port) of
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#CLUSTER_SERVERS = []
|
193
|
+
# This should list the IP address (and optionally port) of the webapp on each
|
194
|
+
# remote server in the cluster. These servers must each have local access to
|
195
|
+
# metric data. Note that the first server to return a match for a query will be
|
196
|
+
# used.
|
197
|
+
#CLUSTER_SERVERS = ["10.0.2.2:80", "10.0.2.3:80"]
|
80
198
|
|
81
|
-
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
|
87
|
-
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
199
|
+
## These are timeout values (in seconds) for requests to remote webapps
|
200
|
+
#REMOTE_STORE_FETCH_TIMEOUT = 6 # Timeout to fetch series data
|
201
|
+
#REMOTE_STORE_FIND_TIMEOUT = 2.5 # Timeout for metric find requests
|
202
|
+
#REMOTE_STORE_RETRY_DELAY = 60 # Time before retrying a failed remote webapp
|
203
|
+
#REMOTE_FIND_CACHE_DURATION = 300 # Time to cache remote metric find results
|
204
|
+
|
205
|
+
## Remote rendering settings
|
206
|
+
# Set to True to enable rendering of Graphs on a remote webapp
|
207
|
+
#REMOTE_RENDERING = True
|
208
|
+
# List of IP (and optionally port) of the webapp on each remote server that
|
209
|
+
# will be used for rendering. Note that each rendering host should have local
|
210
|
+
# access to metric data or should have CLUSTER_SERVERS configured
|
211
|
+
#RENDERING_HOSTS = []
|
212
|
+
#REMOTE_RENDER_CONNECT_TIMEOUT = 1.0
|
91
213
|
|
92
214
|
# If you are running multiple carbon-caches on this machine (typically behind a relay using
|
93
215
|
# consistent hashing), you'll need to list the ip address, cache query port, and instance name of each carbon-cache
|
94
216
|
# instance on the local machine (NOT every carbon-cache in the entire cluster). The default cache query port is 7002
|
95
217
|
# and a common scheme is to use 7102 for instance b, 7202 for instance c, etc.
|
96
218
|
#
|
97
|
-
# You *should* use 127.0.0.1 here
|
219
|
+
# You *should* use 127.0.0.1 here in most cases
|
98
220
|
#CARBONLINK_HOSTS = ["127.0.0.1:7002:a", "127.0.0.1:7102:b", "127.0.0.1:7202:c"]
|
221
|
+
#CARBONLINK_TIMEOUT = 1.0
|
222
|
+
|
223
|
+
#####################################
|
224
|
+
# Additional Django Settings #
|
225
|
+
#####################################
|
226
|
+
# Uncomment the following line for direct access to Django settings such as
|
227
|
+
# MIDDLEWARE_CLASSES or APPS
|
228
|
+
#from graphite.app_settings import *
|
@@ -1,16 +1,19 @@
|
|
1
1
|
<%
|
2
|
-
@path =
|
2
|
+
@path = "#{rubber_env.graphite_dir}/conf/uwsgi.ini"
|
3
|
+
|
4
|
+
is_old_ubuntu = %w[10.04 12.04].include?(rubber_instance.os_version)
|
5
|
+
log_dir = is_old_ubuntu ? "#{rubber_env.graphite_storage_dir}/log/webapp" : '/var/log/graphite'
|
3
6
|
%>
|
4
7
|
|
5
8
|
[uwsgi]
|
6
9
|
http=:<%= rubber_env.graphite_web_port %>
|
7
10
|
chdir=/opt/graphite/webapp
|
8
|
-
wsgi-file
|
11
|
+
wsgi-file=<%= is_old_ubuntu ? '/opt/graphite/conf/graphite.wsgi' : '/usr/share/graphite-web/graphite.wsgi' %>
|
9
12
|
master=True
|
10
13
|
pidfile=/var/run/graphite-web.pid
|
11
14
|
processes=4
|
12
15
|
die-on-term=True
|
13
16
|
vacuum=True
|
14
17
|
max-requests=5000
|
15
|
-
daemonize
|
18
|
+
daemonize=<%= log_dir %>/webapp.log
|
16
19
|
plugins=python,http
|
@@ -20,6 +20,12 @@ web_tools_proxies:
|
|
20
20
|
|
21
21
|
roles:
|
22
22
|
graphite_web:
|
23
|
-
|
23
|
+
os_packages:
|
24
|
+
'10.04': [python-django, python-django-tagging, python-cairo, python-memcache, memcached, uwsgi, uwsgi-plugin-python, uwsgi-plugin-http, sqlite3, bzr, zip]
|
25
|
+
'12.04': [python-django, python-django-tagging, python-cairo, python-memcache, memcached, uwsgi, uwsgi-plugin-python, uwsgi-plugin-http, sqlite3, bzr, zip]
|
26
|
+
'14.04': [uwsgi, uwsgi-plugin-python, graphite-web]
|
27
|
+
graphite_server:
|
28
|
+
os_packages:
|
29
|
+
'14.04': [graphite-carbon]
|
24
30
|
collectd:
|
25
31
|
packages: [libperl-dev]
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
|
3
|
+
extra_config = <<-EXTRA
|
4
|
+
# This was auto-generated by Rubber and is unique to your machine. Feel free to regenerate if you'd like.
|
5
|
+
# You may want to move this to your rubber-secret.yml to keep it out of version control.
|
6
|
+
graphite_web_secret: #{SecureRandom.hex(96)}
|
7
|
+
EXTRA
|
8
|
+
|
9
|
+
append_to_file 'config/rubber/rubber-graphite.yml', "\n#{extra_config}"
|
@@ -3,7 +3,7 @@
|
|
3
3
|
@post = "/usr/sbin/service rsyslog restart"
|
4
4
|
|
5
5
|
graylog_server = rubber_instances.for_role("graylog_server").first
|
6
|
-
is_graylog_instance =
|
6
|
+
is_graylog_instance = rubber_instance.role_names.include?('graylog_server')
|
7
7
|
%>
|
8
8
|
|
9
9
|
<% if graylog_server %>
|
@@ -34,12 +34,12 @@ root_password_sha2 = <%= root_password_sha2 %>
|
|
34
34
|
plugin_dir = plugin
|
35
35
|
|
36
36
|
# REST API listen URI. Must be reachable by other graylog2-server nodes if you run a cluster.
|
37
|
-
rest_listen_uri = http://<%=
|
37
|
+
rest_listen_uri = http://<%= rubber_instance.internal_ip %>:12900/
|
38
38
|
|
39
39
|
# REST API transport address. Defaults to first non-loopback IPv4 system address and port 12900.
|
40
40
|
# This will be promoted in the cluster discovery APIs and other nodes may try to connect on this
|
41
41
|
# address. (see rest_listen_uri)
|
42
|
-
rest_transport_uri = http://<%=
|
42
|
+
rest_transport_uri = http://<%= rubber_instance.internal_ip %>:12900/
|
43
43
|
|
44
44
|
# Enable CORS headers for REST api. This is necessary for JS-clients accessing the server directly.
|
45
45
|
# If these are disabled, modern browsers will not be able to retrieve resources from the server.
|
@@ -1,5 +1,10 @@
|
|
1
1
|
<%
|
2
|
+
is_old_ubuntu = %w[10.04 12.04].include?(rubber_instance.os_version)
|
3
|
+
|
4
|
+
# Apache 2.2 requires no extension while Apache 2.4 requires the '.conf' extension.
|
2
5
|
@path = "/etc/apache2/sites-available/#{rubber_env.app_name}-jenkins"
|
6
|
+
@path << '.conf' unless is_old_ubuntu
|
7
|
+
|
3
8
|
@post = "a2enmod rewrite && a2enmod ssl && a2enmod proxy_http && a2ensite #{rubber_env.app_name}-jenkins"
|
4
9
|
%>
|
5
10
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%
|
2
2
|
@path = "/etc/memcached.conf"
|
3
3
|
max_mem = rubber_env.memcached_max_mem
|
4
|
-
max_mem = max_mem[
|
4
|
+
max_mem = max_mem[rubber_instance.image_type.split('.')[1]] if max_mem.is_a?(Hash)
|
5
5
|
%>
|
6
6
|
|
7
7
|
# memcached default config file
|
@@ -29,7 +29,7 @@ namespace :rubber do
|
|
29
29
|
|
30
30
|
master_instances = rubber_instances.for_role("mysql_master") & rubber_instances.filtered
|
31
31
|
master_instances.each do |ic|
|
32
|
-
task_name = "_bootstrap_mysql_master_#{ic.full_name}".to_sym
|
32
|
+
task_name = "_bootstrap_mysql_master_#{ic.full_name}".to_sym
|
33
33
|
task task_name, :hosts => ic.full_name do
|
34
34
|
env = rubber_cfg.environment.bind("mysql_master", ic.name)
|
35
35
|
exists = capture("echo $(ls #{env.db_data_dir}/ 2> /dev/null)")
|
@@ -52,7 +52,7 @@ namespace :rubber do
|
|
52
52
|
|
53
53
|
slave_instances = rubber_instances.for_role("mysql_slave") & rubber_instances.filtered
|
54
54
|
slave_instances.each do |ic|
|
55
|
-
task_name = "_bootstrap_mysql_slave_#{ic.full_name}".to_sym
|
55
|
+
task_name = "_bootstrap_mysql_slave_#{ic.full_name}".to_sym
|
56
56
|
task task_name, :hosts => ic.full_name do
|
57
57
|
env = rubber_cfg.environment.bind("mysql_slave", ic.name)
|
58
58
|
exists = capture("echo $(ls #{env.db_data_dir}/ 2> /dev/null)")
|
@@ -6,7 +6,7 @@
|
|
6
6
|
@post = "mkdir -p #{log_dir}; chown mysql:adm #{log_dir}; chmod 2750 #{log_dir}"
|
7
7
|
%>
|
8
8
|
|
9
|
-
# Generated by rubber for host <%=
|
9
|
+
# Generated by rubber for host <%= rubber_instance.external_ip %>
|
10
10
|
#
|
11
11
|
# The MySQL database server configuration file.
|
12
12
|
#
|
@@ -56,7 +56,7 @@ namespace :rubber do
|
|
56
56
|
# been boostrapped for that role before
|
57
57
|
|
58
58
|
rubber_instances.for_role("mysql_mgm").each do |ic|
|
59
|
-
task_name = "_bootstrap_mysql_mgm_#{ic.full_name}".to_sym
|
59
|
+
task_name = "_bootstrap_mysql_mgm_#{ic.full_name}".to_sym
|
60
60
|
task task_name, :hosts => ic.full_name do
|
61
61
|
exists = capture("if grep -c rubber.*mysql_mgm /etc/mysql/ndb_mgmd.cnf &> /dev/null; then echo exists; fi")
|
62
62
|
if exists.strip.size == 0
|
@@ -68,7 +68,7 @@ namespace :rubber do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
rubber_instances.for_role("mysql_data").each do |ic|
|
71
|
-
task_name = "_bootstrap_mysql_data_#{ic.full_name}".to_sym
|
71
|
+
task_name = "_bootstrap_mysql_data_#{ic.full_name}".to_sym
|
72
72
|
task task_name, :hosts => ic.full_name do
|
73
73
|
exists = capture("if grep -c rubber.*mysql_data /etc/mysql/my.cnf &> /dev/null; then echo exists; fi")
|
74
74
|
if exists.strip.size == 0
|
@@ -80,7 +80,7 @@ namespace :rubber do
|
|
80
80
|
end
|
81
81
|
|
82
82
|
rubber_instances.for_role("mysql_sql").each do |ic|
|
83
|
-
task_name = "_bootstrap_mysql_sql_#{ic.full_name}".to_sym
|
83
|
+
task_name = "_bootstrap_mysql_sql_#{ic.full_name}".to_sym
|
84
84
|
task task_name, :hosts => ic.full_name do
|
85
85
|
exists = capture("if grep -c rubber.*mysql_sql /etc/mysql/my.cnf &> /dev/null; then echo exists; fi")
|
86
86
|
if exists.strip.size == 0
|