orats 0.4.9 → 0.4.10
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/Gemfile.lock +1 -1
- data/README.md +4 -1
- data/lib/orats/cli.rb +3 -0
- data/lib/orats/shell.rb +4 -2
- data/lib/orats/templates/base.rb +1 -2
- data/lib/orats/templates/includes/Gemfile +1 -1
- data/lib/orats/templates/includes/inventory/group_vars/all.yml +9 -10
- data/lib/orats/templates/play.rb +2 -0
- data/lib/orats/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f16e8fca3d493283f74cfb52c13272f805f356d
|
4
|
+
data.tar.gz: a0227a92fb0322e35d923994005522fb1f8e1f4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 703767326261e5ec820485f01257534a56f645ade04aaf4f23e88af8a668c60c336d41481029115880a1b7e9aa91de1511b79e7f8e6f5b8a00631767e72a2e6a
|
7
|
+
data.tar.gz: f59fa3fa97cfd45ce987d07845d25f72d0f61abd2e5e4756dec1f7ef4dd9a83483f8d51ba19628985911b77cbe776c56e4da3c9df83c3a1714b3c402e658e29c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -66,6 +66,7 @@ running `orats <command name> help` from your terminal. You can also type `orats
|
|
66
66
|
- Configuration:
|
67
67
|
- Optionally takes: `--pg-location [localhost]`
|
68
68
|
- Optionally takes: `--pg-username [postgres]`
|
69
|
+
- Optionally takes: `--redis-location [localhost]`
|
69
70
|
- Optionally takes: `--redis-password []`
|
70
71
|
- Template features:
|
71
72
|
- Optionally takes: `--auth [false]`
|
@@ -246,7 +247,9 @@ check out each role then here's a link to their repos:
|
|
246
247
|
- `nickjj.postgres` https://github.com/nickjj/ansible-postgres
|
247
248
|
- `nickjj.ruby` https://github.com/nickjj/ansible-ruby
|
248
249
|
- `nickjj.rails` https://github.com/nickjj/ansible-rails
|
250
|
+
- `nickjj.whenever` https://github.com/nickjj/ansible-whenever
|
249
251
|
- `nickjj.pumacorn` https://github.com/nickjj/ansible-pumacorn
|
252
|
+
- `nickjj.sidekiq` https://github.com/nickjj/ansible-sidekiq
|
250
253
|
- `nickjj.monit` https://github.com/nickjj/ansible-monit
|
251
254
|
- `nickjj.nodejs` https://github.com/nickjj/ansible-nodejs
|
252
255
|
- `nickjj.nginx` https://github.com/nickjj/ansible-nginx
|
@@ -254,7 +257,7 @@ check out each role then here's a link to their repos:
|
|
254
257
|
|
255
258
|
You will need to install the roles onto your workstation before you can use them. You can do that by running this command:
|
256
259
|
|
257
|
-
`ansible-galaxy install nickjj.user nickjj.security nickjj.postgres nickjj.ruby nickjj.nodejs nickjj.nginx nickjj.rails nickjj.pumacorn nickjj.monit DavidWittman.redis --force`
|
260
|
+
`ansible-galaxy install nickjj.user nickjj.security nickjj.postgres nickjj.ruby nickjj.nodejs nickjj.nginx nickjj.rails nickjj.whenever nickjj.pumacorn nickjj.sidekiq nickjj.monit DavidWittman.redis --force`
|
258
261
|
|
259
262
|
### Try it
|
260
263
|
|
data/lib/orats/cli.rb
CHANGED
@@ -6,6 +6,7 @@ module Orats
|
|
6
6
|
option :pg_location, default: 'localhost'
|
7
7
|
option :pg_username, default: 'postgres'
|
8
8
|
option :pg_password, required: true
|
9
|
+
option :redis_location, default: 'localhost'
|
9
10
|
option :redis_password, default: ''
|
10
11
|
option :auth, type: :boolean, default: false, aliases: '-a'
|
11
12
|
option :skip_extras, type: :boolean, default: false, aliases: '-E'
|
@@ -24,6 +25,8 @@ module Orats
|
|
24
25
|
|
25
26
|
`--pg-username` to supply a custom postgres username [postgres]
|
26
27
|
|
28
|
+
`--redis-location` to supply a custom redis location [localhost]
|
29
|
+
|
27
30
|
`--redis-password` to supply your development redis password []
|
28
31
|
|
29
32
|
Template features:
|
data/lib/orats/shell.rb
CHANGED
@@ -19,7 +19,7 @@ module Orats
|
|
19
19
|
def gsub_postgres_info
|
20
20
|
log_message 'root', 'Changing the postgres information'
|
21
21
|
|
22
|
-
gsub_file "#{@active_path}/.env", ': localhost', ": #{@options[:pg_location]}"
|
22
|
+
gsub_file "#{@active_path}/.env", 'DATABASE_HOST: localhost', "DATABASE_HOST: #{@options[:pg_location]}"
|
23
23
|
gsub_file "#{@active_path}/.env", ': postgres', ": #{@options[:pg_username]}"
|
24
24
|
gsub_file "#{@active_path}/.env", ': supersecrets', ": #{@options[:pg_password]}"
|
25
25
|
end
|
@@ -29,7 +29,8 @@ module Orats
|
|
29
29
|
|
30
30
|
gsub_file "#{@active_path}/config/initializers/sidekiq.rb", '//', "//:#{ENV['#{@app_name.upcase}_CACHE_PASSWORD']}@"
|
31
31
|
gsub_file "#{@active_path}/.env", 'HE_PASSWORD: ', "HE_PASSWORD: #{@options[:redis_password]}"
|
32
|
-
gsub_file "#{@active_path}
|
32
|
+
gsub_file "#{@active_path}/.env", 'CACHE_HOST: localhost', "CACHE_HOST: #{@options[:redis_location]}"
|
33
|
+
gsub_file "#{@active_path}/config/application.rb", '# pass', 'pass'
|
33
34
|
end
|
34
35
|
|
35
36
|
def gsub_project_path
|
@@ -146,6 +147,7 @@ module Orats
|
|
146
147
|
run "touch #{secrets_path}/redis_password"
|
147
148
|
else
|
148
149
|
save_secret_string "#{secrets_path}/redis_password"
|
150
|
+
gsub_file "#{path}/inventory/group_vars/all.yml", 'redis_password: false', 'redis_password: true'
|
149
151
|
end
|
150
152
|
|
151
153
|
save_secret_string "#{secrets_path}/mail_password"
|
data/lib/orats/templates/base.rb
CHANGED
@@ -254,7 +254,6 @@ git commit: "-m 'Add the puma config'"
|
|
254
254
|
file 'config/sidekiq.yml', <<-CODE
|
255
255
|
---
|
256
256
|
:pidfile: <%= ENV['#{app_name_upper}_PROJECT_PATH'] %>/tmp/sidekiq.pid
|
257
|
-
:logfile: <%= ENV['#{app_name_upper}_PROJECT_PATH'] %>/log/sidekiq.log
|
258
257
|
:concurrency: <%= ENV['#{app_name_upper}_SIDEKIQ_CONCURRENCY'].to_i %>
|
259
258
|
:queues:
|
260
259
|
- default
|
@@ -293,7 +292,7 @@ git commit: "-m 'Add the sitemap config'"
|
|
293
292
|
|
294
293
|
file 'config/schedule.rb', <<-CODE
|
295
294
|
every 1.day, at: '4:00 am' do
|
296
|
-
rake '
|
295
|
+
rake 'sitemap:refresh'
|
297
296
|
end
|
298
297
|
CODE
|
299
298
|
|
@@ -90,16 +90,15 @@ rails_deploy_env:
|
|
90
90
|
nginx_base_domain: 0.0.0.0
|
91
91
|
nginx_upstream_name: "{{ rails_deploy_app_name }}"
|
92
92
|
nginx_upstream_server: unix://{{ rails_deploy_path }}/tmp/puma.sock
|
93
|
-
nginx_root_path:
|
93
|
+
nginx_root_path: "{{ rails_deploy_path }}/public"
|
94
94
|
nginx_ssl_local_path: "{{ secrets_load_path }}"
|
95
95
|
|
96
96
|
# monit configuration
|
97
|
-
monit_process_list:
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
- stop program = "/etc/init.d/sidekiq stop"
|
97
|
+
monit_process_list: |
|
98
|
+
check process {{ rails_deploy_app_name }} with pidfile {{ rails_deploy_path }}/tmp/{{ pumacorn_server }}.pid
|
99
|
+
start program = "/etc/init.d/{{ rails_deploy_app_name }} start"
|
100
|
+
stop program = "/etc/init.d/{{ rails_deploy_app_name }} stop"
|
101
|
+
|
102
|
+
check process sidekiq with pidfile {{ rails_deploy_path }}/tmp/sidekiq.pid
|
103
|
+
start program = "/etc/init.d/sidekiq start"
|
104
|
+
stop program = "/etc/init.d/sidekiq stop"
|
data/lib/orats/templates/play.rb
CHANGED
@@ -152,7 +152,9 @@ file 'site.yml' do <<-TEXT
|
|
152
152
|
- { role: nickjj.nodejs, tags: [app, nodejs] }
|
153
153
|
- { role: nickjj.nginx, tags: [app, nginx] }
|
154
154
|
- { role: nickjj.rails, tags: [app, rails] }
|
155
|
+
- { role: nickjj.whenever, tags: [app, rails] }
|
155
156
|
- { role: nickjj.pumacorn, tags: [app, rails] }
|
157
|
+
- { role: nickjj.sidekiq, tags: [app, rails] }
|
156
158
|
- { role: nickjj.monit, tags: [app, monit] }
|
157
159
|
TEXT
|
158
160
|
end
|
data/lib/orats/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Janetakis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|