subspace 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -1
- data/ansible/roles/collectd/handlers/main.yml +1 -1
- data/ansible/roles/collectd/tasks/main.yml +17 -1
- data/ansible/roles/collectd/templates/nginx.conf +4 -0
- data/ansible/roles/collectd/templates/puma-process.conf +3 -0
- data/ansible/roles/collectd/templates/rails_lograge.conf +1 -0
- data/ansible/roles/delayed_job/tasks/main.yml +1 -1
- data/ansible/roles/nginx-rails/defaults/main.yml +2 -0
- data/ansible/roles/nginx-rails/templates/_rails.conf +1 -1
- data/ansible/roles/nginx/defaults/main.yml +1 -0
- data/ansible/roles/nginx/tasks/main.yml +13 -0
- data/ansible/roles/nginx/templates/status +10 -0
- data/ansible/roles/passenger/files/sudoers-passenger +1 -0
- data/ansible/roles/passenger/tasks/main.yml +5 -0
- data/ansible/roles/puma/defaults/main.yml +5 -0
- data/ansible/roles/puma/tasks/main.yml +3 -0
- data/ansible/roles/puma/templates/puma.rb +2 -4
- data/lib/subspace/version.rb +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5df2a1343e51341e96380ee4011b182a8970ef6
|
4
|
+
data.tar.gz: bcb4a135d9c459ab06eec7b892c6d695ab5fc36b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92cdf7edb1a970a973a3134fed38d2405307e59dae8713408a33e2514d573633c4c625a5bbb6e7c5bd2e0541bb3172c847b77cdfe9dc7f2c4b693ee95ffe6799
|
7
|
+
data.tar.gz: 3aff151c039fb156a764d34d153e12e4a43ecf2fbc48406db5298b0495e112532c3b43d6031262cb85cb81742c473d768dd5fe82671a361c72fb3be32bff029c
|
data/README.md
CHANGED
@@ -109,6 +109,21 @@ Apache also support canonicalizing the domain now, so if you alwyas want to redi
|
|
109
109
|
|
110
110
|
## collectd
|
111
111
|
|
112
|
+
Collectd is a super useful daemon that grabs and reports statistics about a server's health. Adding this role will make your server start reporting to a [graphite](https://graphiteapp.org/) server that you specify, and you can make cool graphs and data feeds after that using something like [Grafana](https://grafana.com/)
|
113
|
+
|
114
|
+
graphite_host: graphite.example.com
|
115
|
+
graphite_port: "2003"
|
116
|
+
|
117
|
+
Aside from basic statistics like free memory, disk, load averages, etc, we have some custom things:
|
118
|
+
|
119
|
+
1. If Postgres and delayed job are installed, it will collect stats on number of outstanding delayed jobs.
|
120
|
+
2. If apache is installed, it will collect stats from the /server-status page
|
121
|
+
3. (TODO) add something for nginx
|
122
|
+
4. (TODO) add something for pumas
|
123
|
+
5. (TODO) add something for sidekiq
|
124
|
+
6. (TODO) add something for memcache
|
125
|
+
|
126
|
+
|
112
127
|
## common
|
113
128
|
|
114
129
|
## delayed_job
|
@@ -172,7 +187,15 @@ Installs logrotate and lets you configure logs for automatic rotation. Example
|
|
172
187
|
|
173
188
|
## newrelic
|
174
189
|
|
175
|
-
## nginx
|
190
|
+
## nginx-rails
|
191
|
+
|
192
|
+
Configurs nginx to look at localhost:9292 for the socket/backend connection. If you need to do fancy stuff you should simply override this role
|
193
|
+
|
194
|
+
subspace override nginx-rails
|
195
|
+
|
196
|
+
defaults are here, we'll probably add more:
|
197
|
+
|
198
|
+
client_max_body_size: 4G
|
176
199
|
|
177
200
|
## papertrail
|
178
201
|
|
@@ -189,6 +212,10 @@ Installs logrotate and lets you configure logs for automatic rotation. Example
|
|
189
212
|
|
190
213
|
## puma
|
191
214
|
|
215
|
+
add puma gem to gemfile
|
216
|
+
add config/puma to symlinks in deploy.rb
|
217
|
+
|
218
|
+
|
192
219
|
## rails
|
193
220
|
|
194
221
|
Provisions for a rails app. This one is probably pretty important.
|
@@ -39,7 +39,7 @@
|
|
39
39
|
dest: /etc/collectd/collectd.conf.d/delayed_job_postgres.conf
|
40
40
|
become: true
|
41
41
|
notify: restart collectd
|
42
|
-
when: postgresql_installed is defined and delayed_job_installed is defined
|
42
|
+
when: (collectd_pgdj is defined) or (postgresql_installed is defined and delayed_job_installed is defined)
|
43
43
|
|
44
44
|
- name: create apache2 config
|
45
45
|
template:
|
@@ -49,3 +49,19 @@
|
|
49
49
|
notify: restart collectd
|
50
50
|
when: apache2_installed is defined
|
51
51
|
|
52
|
+
- name: create puma config
|
53
|
+
template:
|
54
|
+
src: puma-process.conf
|
55
|
+
dest: /etc/collectd/collectd.conf.d/puma-process.conf
|
56
|
+
sudo: true
|
57
|
+
notify: restart collectd
|
58
|
+
when: puma_installed is defined
|
59
|
+
|
60
|
+
- name: create nginx config
|
61
|
+
template:
|
62
|
+
src: nginx.conf
|
63
|
+
dest: /etc/collectd/collectd.conf.d/nginx.conf
|
64
|
+
sudo: true
|
65
|
+
notify: restart collectd
|
66
|
+
when: nginx_installed is defined
|
67
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
rails_lograge.conf
|
@@ -13,6 +13,19 @@
|
|
13
13
|
include_role:
|
14
14
|
name: nginx-rails
|
15
15
|
|
16
|
+
- name: create nginx status config
|
17
|
+
template:
|
18
|
+
src: status
|
19
|
+
dest: /etc/nginx/sites-available/status
|
20
|
+
become: true
|
21
|
+
|
22
|
+
- name: enable nginx status
|
23
|
+
file:
|
24
|
+
src: /etc/nginx/sites-available/status
|
25
|
+
dest: /etc/nginx/sites-enabled/status
|
26
|
+
state: link
|
27
|
+
become: true
|
28
|
+
|
16
29
|
- name: Restart nginx
|
17
30
|
action: service name=nginx state=restarted
|
18
31
|
become: true
|
@@ -0,0 +1 @@
|
|
1
|
+
deploy ALL=(root) NOPASSWD: /usr/sbin/passenger-status
|
@@ -1,9 +1,7 @@
|
|
1
1
|
# Change to match your CPU core count
|
2
|
-
workers
|
3
|
-
|
4
|
-
threads_count = Integer(ENV['MAX_THREADS'] || 5)
|
2
|
+
workers {{puma_workers}}
|
5
3
|
# Min and Max threads per worker
|
6
|
-
threads
|
4
|
+
threads {{puma_min_threads}}, {{puma_max_threads}}
|
7
5
|
|
8
6
|
app_dir = "/u/apps/{{project_name}}/current"
|
9
7
|
directory app_dir
|
data/lib/subspace/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Samson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,6 +117,9 @@ files:
|
|
117
117
|
- ansible/roles/collectd/templates/df.conf
|
118
118
|
- ansible/roles/collectd/templates/graphite.conf
|
119
119
|
- ansible/roles/collectd/templates/hostname.conf
|
120
|
+
- ansible/roles/collectd/templates/nginx.conf
|
121
|
+
- ansible/roles/collectd/templates/puma-process.conf
|
122
|
+
- ansible/roles/collectd/templates/rails_lograge.conf
|
120
123
|
- ansible/roles/common/defaults/main.yml
|
121
124
|
- ansible/roles/common/files/sudoers-service
|
122
125
|
- ansible/roles/common/handlers/main.yml
|
@@ -163,6 +166,7 @@ files:
|
|
163
166
|
- ansible/roles/mysql2_gem/tasks/main.yml
|
164
167
|
- ansible/roles/newrelic/handlers/main.yml
|
165
168
|
- ansible/roles/newrelic/tasks/main.yml
|
169
|
+
- ansible/roles/nginx-rails/defaults/main.yml
|
166
170
|
- ansible/roles/nginx-rails/tasks/main.yml
|
167
171
|
- ansible/roles/nginx-rails/templates/_rails.conf
|
168
172
|
- ansible/roles/nginx-rails/templates/_upstream.conf
|
@@ -171,9 +175,12 @@ files:
|
|
171
175
|
- ansible/roles/nginx/defaults/main.yml
|
172
176
|
- ansible/roles/nginx/handlers/main.yml
|
173
177
|
- ansible/roles/nginx/tasks/main.yml
|
178
|
+
- ansible/roles/nginx/templates/status
|
174
179
|
- ansible/roles/papertrail/tasks/main.yml
|
175
180
|
- ansible/roles/papertrail/templates/log_files.yml
|
181
|
+
- ansible/roles/passenger/files/sudoers-passenger
|
176
182
|
- ansible/roles/passenger/meta/main.yml
|
183
|
+
- ansible/roles/passenger/tasks/main.yml
|
177
184
|
- ansible/roles/postgis/.gitignore
|
178
185
|
- ansible/roles/postgis/CHANGELOG.md
|
179
186
|
- ansible/roles/postgis/LICENSE
|
@@ -189,6 +196,7 @@ files:
|
|
189
196
|
- ansible/roles/postgresql/tasks/backups.yml
|
190
197
|
- ansible/roles/postgresql/tasks/main.yml
|
191
198
|
- ansible/roles/postgresql/templates/backup.sh
|
199
|
+
- ansible/roles/puma/defaults/main.yml
|
192
200
|
- ansible/roles/puma/meta/main.yml
|
193
201
|
- ansible/roles/puma/tasks/main.yml
|
194
202
|
- ansible/roles/puma/templates/etc-puma.conf
|