subspace 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -2
- data/ansible/roles/common/templates/motd +1 -1
- data/ansible/roles/delayed_job/templates/delayed-job-monit-rc +5 -4
- data/ansible/roles/nginx-rails/templates/_asset_cors.conf +11 -0
- data/ansible/roles/nginx-rails/templates/_rails.conf +1 -2
- data/ansible/roles/nginx-rails/templates/_upstream.conf +6 -0
- data/ansible/roles/nginx-rails/templates/nginx-project +5 -0
- data/ansible/roles/zenoamaro.postgresql/templates/postgresql.conf +4 -0
- data/lib/subspace/commands/ssh.rb +3 -2
- data/lib/subspace/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e35039968f4f4c30192435228ac3e8318c05b64
|
4
|
+
data.tar.gz: 83c7e2fce5c595d4176ee05b4ff599266204d60a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e45bb40c5d7fa5efa67bc499b14b9ed0492f1f2850e9a15ed59ad06d119e417712736084b97f031e095c63c6f0b811664979edef6040be5998d835f9e8eb2a6
|
7
|
+
data.tar.gz: 5f934dff61c1f5c05147f4b191d5c7429e75ae3eecb2ed17fb0af2666f67ce5901b8da6dfdbef595f1b90e4f3263c16bbb1410bbbfab074885b312f4f50b9c1a
|
data/README.md
CHANGED
@@ -135,13 +135,23 @@ Aside from basic statistics like free memory, disk, load averages, etc, we have
|
|
135
135
|
|
136
136
|
## delayed_job
|
137
137
|
|
138
|
-
Install monitoring and automatic startup for delayed job workers via monit. You MUST set the
|
138
|
+
Install monitoring and automatic startup for delayed job workers via monit. You MUST set the `job_queues` variable as follows:
|
139
139
|
|
140
140
|
job_queues:
|
141
141
|
- default
|
142
142
|
- mailers
|
143
143
|
- exports
|
144
144
|
|
145
|
+
If you want to have multiple workers for a single queue, just add the queue name
|
146
|
+
multiple times:
|
147
|
+
|
148
|
+
job_queues:
|
149
|
+
- default
|
150
|
+
- mailers
|
151
|
+
- exports
|
152
|
+
- exports
|
153
|
+
- exports
|
154
|
+
|
145
155
|
Please note that by default, delayed job does not set a queue (eg it uses the "null" queue). You MUST also add an initializer to your rails app where you set the default queue name to "default" (or some other queue). Otherwise, the named queue workers managed by this role will not process the "null" queue.
|
146
156
|
|
147
157
|
# config/initializers/delayed_job.rb
|
@@ -284,7 +294,13 @@ Contains the template files that get copied over when `subspace init` is ran.
|
|
284
294
|
|
285
295
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
286
296
|
|
287
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version
|
297
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version:
|
298
|
+
|
299
|
+
1. update the version number in `version.rb`
|
300
|
+
2. update the version number in motds
|
301
|
+
3. run `bundle exec rake release`
|
302
|
+
|
303
|
+
This will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
288
304
|
|
289
305
|
## Contributing
|
290
306
|
|
@@ -4,7 +4,7 @@ This server brought to you by:
|
|
4
4
|
\___ \| | | | '_ \___ \| '_ \ / _` |/ __/ _ \
|
5
5
|
___) | |_| | |_) |__) | |_) | (_| | (_| __/
|
6
6
|
|____/ \__,_|_.__/____/| .__/ \__,_|\___\___|
|
7
|
-
|_|
|
7
|
+
|_| v0.4.7
|
8
8
|
~~~ https://github.com/tenforwardconsulting/subspace ~~~
|
9
9
|
|
10
10
|
If you need to make configuration changes to the server, please modify the
|
@@ -9,8 +9,9 @@
|
|
9
9
|
# include /var/www/apps/{app_name}/shared/delayed_job.monitrc
|
10
10
|
|
11
11
|
{% for queue in job_queues %}
|
12
|
-
check process delayed_job_{{queue}}
|
13
|
-
with pidfile /u/apps/{{project_name}}/shared/tmp/pids/delayed_job.{{queue}}.pid
|
14
|
-
start program = "/bin/su - deploy -c 'cd /u/apps/{{project_name}}/current; RAILS_ENV={{rails_env}} bundle exec {{delayed_job_command}} --identifier={{queue}} --queue={{queue}} start'"
|
15
|
-
stop program = "/bin/su - deploy -c 'cd /u/apps/{{project_name}}/current; RAILS_ENV={{rails_env}} bundle exec {{delayed_job_command}} --identifier={{queue}} --queue={{queue}} stop'"
|
12
|
+
check process delayed_job_{{queue}}{{loop.index}}
|
13
|
+
with pidfile /u/apps/{{project_name}}/shared/tmp/pids/delayed_job.{{queue}}{{loop.index}}.pid
|
14
|
+
start program = "/bin/su - deploy -c 'cd /u/apps/{{project_name}}/current; RAILS_ENV={{rails_env}} bundle exec {{delayed_job_command}} --identifier={{queue}}{{loop.index}} --queue={{queue}} start'"
|
15
|
+
stop program = "/bin/su - deploy -c 'cd /u/apps/{{project_name}}/current; RAILS_ENV={{rails_env}} bundle exec {{delayed_job_command}} --identifier={{queue}}{{loop.index}} --queue={{queue}} stop'"
|
16
|
+
group delayed_job
|
16
17
|
{% endfor %}
|
@@ -4,9 +4,8 @@ try_files $uri/index.html $uri @app;
|
|
4
4
|
location @app {
|
5
5
|
proxy_pass http://app;
|
6
6
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
7
|
+
proxy_set_header X-Forwarded-Proto $app_proto;
|
7
8
|
proxy_set_header Host $http_host;
|
8
|
-
proxy_set_header X-Forwarded-Proto $scheme;
|
9
|
-
# pass the upgrade headers so websockets work
|
10
9
|
proxy_set_header Upgrade $http_upgrade;
|
11
10
|
proxy_set_header Connection "upgrade";
|
12
11
|
proxy_redirect off;
|
@@ -51,7 +51,9 @@ bonjour_name = '{{postgresql_bonjour_name}}' # defaults to the computer name
|
|
51
51
|
authentication_timeout = {{postgresql_authentication_timeout}}
|
52
52
|
ssl = {{'on' if postgresql_ssl else 'off'}}
|
53
53
|
ssl_ciphers = '{{postgresql_ssl_ciphers|join(':')}}'
|
54
|
+
{% if postgresql_version < 9.5 %}
|
54
55
|
ssl_renegotiation_limit = {{postgresql_ssl_renegotiation_limit}}
|
56
|
+
{% endif %}
|
55
57
|
ssl_cert_file = '{{postgresql_ssl_cert_file}}'
|
56
58
|
ssl_key_file = '{{postgresql_ssl_key_file}}'
|
57
59
|
ssl_ca_file = '{{postgresql_ssl_ca_file}}'
|
@@ -152,7 +154,9 @@ wal_writer_delay = {{postgresql_wal_writer_delay}} # 1-10000 milliseconds
|
|
152
154
|
commit_delay = {{postgresql_commit_delay}} # range 0-100000, in microseconds
|
153
155
|
commit_siblings = {{postgresql_commit_siblings}} # range 1-1000
|
154
156
|
|
157
|
+
{% if postgresql_version < 9.5 %}
|
155
158
|
checkpoint_segments = {{postgresql_checkpoint_segments}} # in logfile segments, min 1, 16MB each
|
159
|
+
{% endif %}
|
156
160
|
checkpoint_timeout = {{postgresql_checkpoint_timeout}} # range 30s-1h
|
157
161
|
checkpoint_completion_target = {{postgresql_checkpoint_completion_target}} # checkpoint target duration, 0.0 - 1.0
|
158
162
|
checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables
|
@@ -14,8 +14,9 @@ class Subspace::Commands::Ssh < Subspace::Commands::Base
|
|
14
14
|
return
|
15
15
|
end
|
16
16
|
host_vars = YAML.load_file("config/provision/host_vars/#{@host}")
|
17
|
-
user = @user || host_vars["ansible_ssh_user"]
|
18
|
-
|
17
|
+
user = @user || host_vars["ansible_ssh_user"] || host_vars["ansible_user"]
|
18
|
+
host = host_vars["ansible_ssh_host"] || host_vars["ansible_host"]
|
19
|
+
cmd = "ssh #{user}@#{host}"
|
19
20
|
say cmd
|
20
21
|
exec cmd
|
21
22
|
end
|
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.7
|
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-09-
|
11
|
+
date: 2017-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -167,6 +167,7 @@ files:
|
|
167
167
|
- ansible/roles/newrelic/tasks/main.yml
|
168
168
|
- ansible/roles/nginx-rails/defaults/main.yml
|
169
169
|
- ansible/roles/nginx-rails/tasks/main.yml
|
170
|
+
- ansible/roles/nginx-rails/templates/_asset_cors.conf
|
170
171
|
- ansible/roles/nginx-rails/templates/_rails.conf
|
171
172
|
- ansible/roles/nginx-rails/templates/_upstream.conf
|
172
173
|
- ansible/roles/nginx-rails/templates/nginx-project
|
@@ -288,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
289
|
version: '0'
|
289
290
|
requirements: []
|
290
291
|
rubyforge_project:
|
291
|
-
rubygems_version: 2.
|
292
|
+
rubygems_version: 2.4.5.1
|
292
293
|
signing_key:
|
293
294
|
specification_version: 4
|
294
295
|
summary: Ansible-based server provisioning for rails projects
|