orats 0.4.1 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86f08bf4b89efe8a4391f8171f65f37831f2001d
4
- data.tar.gz: 941d3a91ca8a12ef09339fd76f3c3421427a53ad
3
+ metadata.gz: 62bc01255210575a9b92c81f26bdd45670349ea3
4
+ data.tar.gz: 930ec3c278e19e28f8319b9e1619046fe240af3d
5
5
  SHA512:
6
- metadata.gz: ed96c10f2a2d6b9a9a81d66aac2d6d3a71dccdf0938fbda512944698ac35f3c320455b649358fc70f8ca5ebb63d2866d570604b815ef7fd1c20118c8cfc635e6
7
- data.tar.gz: ab24c18b622e8c26483856e4a7d275927c573c7ac2e261c147f9bef07499efbe458835fce765231d3c392e6dac3095f3e91a3fdb1b54fc5c4ea5bc5755997382
6
+ metadata.gz: db8c79bbc27a514de8240638cf6793d9b8e38fd58d645ba2d054ee05fa485269ad82c8fa9db9f58bb9d3e552f0ddb64d0da5d7ec3bd8cd5327c3c0b06b089e6c
7
+ data.tar.gz: cfb03b8a3f034e98b71276fc5aa5007244ace259b281c665ab840337eb6becac172d7fa64f7f757b43838573ae5ae0eef3eff48ac11983c95fa7e938aff6925d
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Gem Version](https://badge.fury.io/rb/orats.png)](http://badge.fury.io/rb/orats)
2
+
1
3
  ## What is orats and what problem does it solve?
2
4
 
3
5
  It stands for opinionated rails application templates. The templates include solving tedious tasks that you would do for most
@@ -31,7 +33,7 @@ are locked using the pessimistic operator `~>` so you can be sure that everythin
31
33
  ### Additional system dependencies for ansible
32
34
 
33
35
  `orats` is smart enough to skip trying to create ansible related files if it cannot find the necessary dependencies to successfully
34
- use them. To successfully create ansible content you must fulfil the requirements below:
36
+ use them. To successfully create ansible content you must fulfill the requirements below:
35
37
 
36
38
  - Ansible is installed and setup in such a way that `ansible` is on your system path.
37
39
 
@@ -233,22 +235,26 @@ as there are no hard requirements on any specific host.
233
235
  - Nodejs 0.10.x
234
236
  - Git
235
237
  - Pull in app code from a remote repo of your choice.
238
+ - Monit and init.d
239
+ - Both the app and sidekiq have init.d scripts and are actively monitored by monit
236
240
 
237
241
  All of this is provided by a series of ansible roles. You may also use these roles without orats. If you want to
238
242
  check out each role then here's a link to their repos:
239
243
 
240
- - https://github.com/nickjj/ansible-user
241
- - https://github.com/nickjj/ansible-security
242
- - https://github.com/nickjj/ansible-nginx
243
- - https://github.com/nickjj/ansible-nodejs
244
- - https://github.com/nickjj/ansible-ruby
245
- - https://github.com/nickjj/ansible-rails
246
- - https://github.com/nickjj/ansible-postgres
247
- - https://github.com/DavidWittman/ansible-redis
244
+ - `nickjj.user` https://github.com/nickjj/ansible-user
245
+ - `nickjj.security` https://github.com/nickjj/ansible-security
246
+ - `nickjj.postgres` https://github.com/nickjj/ansible-postgres
247
+ - `nickjj.ruby` https://github.com/nickjj/ansible-ruby
248
+ - `nickjj.rails` https://github.com/nickjj/ansible-rails
249
+ - `nickjj.pumacorn` https://github.com/nickjj/ansible-pumacorn
250
+ - `nickjj.monit` https://github.com/nickjj/ansible-monit
251
+ - `nickjj.nodejs` https://github.com/nickjj/ansible-nodejs
252
+ - `nickjj.nginx` https://github.com/nickjj/ansible-nginx
253
+ - `DavidWittman.redis` https://github.com/DavidWittman/ansible-redis
248
254
 
249
255
  You will need to install the roles onto your workstation before you can use them. You can do that by running this command:
250
256
 
251
- `ansible-galaxy install nickjj.user nickjj.security nickjj.postgres nickjj.ruby nickjj.nodejs nickjj.nginx nickjj.rails DavidWittman.redis --force`
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`
252
258
 
253
259
  ### Try it
254
260
 
@@ -154,6 +154,10 @@ module Orats
154
154
 
155
155
  log_message 'shell', 'Creating self signed ssl certificates'
156
156
  run "openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj '/C=US/ST=Foo/L=Bar/O=Baz/CN=qux.com' -keyout #{secrets_path}/sslkey.key -out #{secrets_path}/sslcert.crt"
157
+
158
+ log_message 'shell', 'Creating monit pem file'
159
+ run "openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj '/C=US/ST=Foo/L=Bar/O=Baz/CN=qux.com' -keyout #{secrets_path}/monit.pem -out #{secrets_path}/monit.pem && openssl gendh 512 >> #{secrets_path}/monit.pem"
160
+
157
161
  end
158
162
 
159
163
  private
@@ -92,4 +92,15 @@ nginx_base_domain: 0.0.0.0
92
92
  nginx_upstream_name: "{{ rails_deploy_app_name }}"
93
93
  nginx_upstream_server: unix://{{ rails_deploy_path }}/tmp/puma.sock
94
94
  nginx_root_path: /home/{{ rails_deploy_user }}/{{ rails_deploy_app_name }}.git/public
95
- nginx_ssl_local_path: "{{ secrets_load_path }}"
95
+ nginx_ssl_local_path: "{{ secrets_load_path }}"
96
+
97
+ # monit configuration
98
+ monit_process_list:
99
+ "{{ rails_deploy_app_name }}":
100
+ - check process {{ rails_deploy_app_name }} with pidfile {{ rails_deploy_path }}/tmp/{{ pumacorn_server }}.pid
101
+ - start program = "/etc/init.d/{{ rails_deploy_app_name }} start"
102
+ - stop program = "/etc/init.d/{{ rails_deploy_app_name }} stop"
103
+ "sidekiq":
104
+ - check process sidekiq with pidfile {{ rails_deploy_path }}/tmp/sidekiq.pid
105
+ - start program = "/etc/init.d/sidekiq start"
106
+ - stop program = "/etc/init.d/sidekiq stop"
@@ -152,6 +152,8 @@ 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.pumacorn, tags: [app, rails] }
156
+ - { role: nickjj.monit, tags: [app, monit] }
155
157
  TEXT
156
158
  end
157
159
 
@@ -1,3 +1,3 @@
1
1
  module Orats
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.5'
3
3
  end
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.1
4
+ version: 0.4.5
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-05-23 00:00:00.000000000 Z
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor