recipiez 0.8.5 → 0.9.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ced9facfd604a26e72040854a5646994a8db2ce9
4
+ data.tar.gz: a34a1c701da6c7ba8c80ff7db9933b7dd3cdc6cd
5
+ SHA512:
6
+ metadata.gz: cc976a79764260142604173002856aa6b595531c5ae142cb02024d1dbe66d4e2f6f574a18481f62044fad8d71dabe2bd35eda94e5ad3a2a76d12becbec028198
7
+ data.tar.gz: e54a49e4bb22e6c5bb84e0847e37e48f5bbc0021f055d3e4eae77fa1bfd3a4d7f292546f66c89ba78526b3dbd508dcb2bac5ace7b7eeef67013e90d36aa1da18
data/README.md CHANGED
@@ -13,6 +13,7 @@ A collection of capistrano recipes for doing a whole host of things to servers.
13
13
  * Thin Setup
14
14
  * Node js deployment
15
15
  * Foreman Upstart Functionality
16
+ * Golang deployment
16
17
 
17
18
  ## Installation
18
19
 
@@ -31,4 +32,4 @@ Now you will have access to all the cool recipies that I use on a daily basis.
31
32
 
32
33
  Often even in non-ruby projects I use Bundler when running capistrano. Add this to your Gemfile
33
34
 
34
- gem 'recipiez', :require => false
35
+ gem 'recipiez', :require => false
@@ -1,3 +1,3 @@
1
1
  module Recipiez
2
- VERSION = '0.8.5'
2
+ VERSION = '0.9.0'
3
3
  end
data/recipes/go.rb ADDED
@@ -0,0 +1,37 @@
1
+ Capistrano::Configuration.instance(true).load do
2
+
3
+ namespace :go do
4
+
5
+ # This configures a go app for deployment for the first time.
6
+ # A one stop shop.
7
+ task :setup do
8
+ desc "This configures a go app for deployment for the first time."
9
+ recipiez::setup
10
+ go::generate_upstart
11
+ monit::go
12
+ logrotate::configure
13
+ end
14
+
15
+ task :generate_upstart do
16
+ desc "This generates the process control scripts for go apps."
17
+ unless exists? :go_env
18
+ set :go_env, 'development'
19
+ end
20
+
21
+ put render("upstart_go", binding), "#{application}.conf"
22
+ sudo "mv #{application}.conf /etc/init/#{application}.conf"
23
+
24
+
25
+
26
+ end
27
+
28
+
29
+
30
+
31
+ end
32
+
33
+
34
+
35
+
36
+ end
37
+
data/recipes/monit.rb CHANGED
@@ -57,6 +57,13 @@ Capistrano::Configuration.instance(true).load do
57
57
  sudo "/etc/init.d/monit restart"
58
58
  end
59
59
 
60
+ desc "configures monit for go"
61
+ task :go, :roles => :web do
62
+ put render('go_monit', binding), "go_monit.conf"
63
+ sudo "mv go_monit.conf /etc/monit/conf.d/go_monit_#{application}.conf"
64
+ sudo "/etc/init.d/monit restart"
65
+ end
66
+
60
67
 
61
68
  end
62
69
 
@@ -0,0 +1,10 @@
1
+ # node
2
+ check process go_<%= application %> with pidfile /var/run/<%= application %>.pid
3
+ start program = "/sbin/start <%= application %>"
4
+ stop program = "/sbin/stop <%= application %>"
5
+ if cpu is greater than 40% for 2 cycles then alert
6
+ if cpu > 80% for 5 cycles then restart
7
+ if 10 restarts within 10 cycles then timeout
8
+ if totalmem > 150.0 MB for 5 cycles then restart
9
+ group go
10
+
@@ -0,0 +1,17 @@
1
+ #!upstart
2
+
3
+ description "Generated Upstart Go Config"
4
+ author "Alastair Brunton"
5
+
6
+ start on (local-filesystems and net-device-up IFACE=eth0)
7
+ stop on shutdown
8
+
9
+ respawn # restart when job dies
10
+ respawn limit 5 60 # give up restart after 5 respawns in 60 seconds
11
+
12
+ script
13
+ echo $$ > /var/run/<%= application %>.pid
14
+ exec sudo -u <%= user %> <%= current_path %>/<%= application %> -go_env=<%= go_env %> >> <%= current_path %>/log/<%= go_env %>.log 2>&1
15
+ end script
16
+
17
+
metadata CHANGED
@@ -1,44 +1,37 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: recipiez
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 8
8
- - 5
9
- version: 0.8.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Alastair Brunton
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2015-10-07 00:00:00 +02:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2015-12-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: tinder
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
30
20
  type: :runtime
31
- version_requirements: *id001
32
- description: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx
33
- email:
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp,
28
+ Activecollab, Monit, NodeJS, Nginx
29
+ email:
34
30
  - info@simplyexcited.co.uk
35
31
  executables: []
36
-
37
32
  extensions: []
38
-
39
33
  extra_rdoc_files: []
40
-
41
- files:
34
+ files:
42
35
  - .gitignore
43
36
  - MIT-LICENSE
44
37
  - README.md
@@ -49,6 +42,7 @@ files:
49
42
  - recipes/chef.rb
50
43
  - recipes/deployment_recipiez.rb
51
44
  - recipes/foreman.rb
45
+ - recipes/go.rb
52
46
  - recipes/logrotate.rb
53
47
  - recipes/monit.rb
54
48
  - recipes/nginx.rb
@@ -56,6 +50,7 @@ files:
56
50
  - recipes/render.rb
57
51
  - recipes/ssl.rb
58
52
  - recipes/templates/apache_monit.erb
53
+ - recipes/templates/go_monit.erb
59
54
  - recipes/templates/logrotate.erb
60
55
  - recipes/templates/logrotate_ec2.erb
61
56
  - recipes/templates/mongo_ini.erb
@@ -75,42 +70,35 @@ files:
75
70
  - recipes/templates/sshd_monit.erb
76
71
  - recipes/templates/thin_monit.erb
77
72
  - recipes/templates/upstart.erb
73
+ - recipes/templates/upstart_go.erb
78
74
  - recipes/thin.rb
79
75
  - recipes/tolk.rb
80
76
  - recipes/travis.rb
81
77
  - recipiez.gemspec
82
78
  - release_gem.sh
83
- has_rdoc: true
84
79
  homepage: http://github.com/pyrat/deployment_recipiez
85
- licenses:
80
+ licenses:
86
81
  - MIT
82
+ metadata: {}
87
83
  post_install_message:
88
84
  rdoc_options: []
89
-
90
- require_paths:
85
+ require_paths:
91
86
  - lib
92
- required_ruby_version: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- segments:
97
- - 0
98
- version: "0"
99
- required_rubygems_version: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- segments:
104
- - 1
105
- - 3
106
- - 1
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
107
96
  version: 1.3.1
108
97
  requirements: []
109
-
110
98
  rubyforge_project:
111
- rubygems_version: 1.3.6
99
+ rubygems_version: 2.0.14
112
100
  signing_key:
113
- specification_version: 3
114
- summary: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab, Monit, NodeJS, Nginx
101
+ specification_version: 4
102
+ summary: Capistrano recipies for DB Syncing, Logrotate, Apache, Thin, Basecamp, Activecollab,
103
+ Monit, NodeJS, Nginx
115
104
  test_files: []
116
-