itrigga-cap_deploy 0.2.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.4
@@ -41,14 +41,17 @@ configuration.load do
41
41
  puts "setting ownership on #{shared_log_dir} & files to #{user}"
42
42
  run "#{sudo} chown -R #{user} #{shared_log_dir}"
43
43
 
44
+ # this is needed for the case when the web process does not run in the
45
+ # app root dir (e.g. tn)
46
+ puts "removing default #{current_path}/log symlink"
47
+ run "#{sudo} rm #{current_path}/log"
48
+
44
49
  puts "ensuring log dir #{web_dir}/log is symlinked to #{std_log_dir}"
45
50
  symlink_dir( std_log_dir, "#{web_dir}/log" )
46
51
 
47
52
  puts "setting ownership on log dir & files to #{user}"
48
53
  run "#{sudo} chown -R #{user} #{web_dir}/log"
49
54
 
50
- puts "removing default #{current_path}/log symlink"
51
- run "#{sudo} rm #{current_path}/log"
52
55
  end
53
56
 
54
57
  task :symlink_pid_dirs do
@@ -87,7 +90,7 @@ configuration.load do
87
90
  puts "regenerating monit config file(s)"
88
91
  run "test -d #{shared_dir}/templates || mkdir -p #{shared_dir}/templates"
89
92
 
90
- run "cd #{web_dir} && #{sudo} rake itrigga:generator PATTERN=monit TEMPLATE_DIR=#{web_dir}/script/templates OUTPUT_DIR=#{shared_dir}/templates CONFIG_FILE=`readlink /etc/#{config_file_name}` BASE_DIR=#{shared_dir}"
93
+ run "cd #{web_dir} && #{sudo} rake itrigga:generator RAILS_ENV=#{stage} APPLICATION_NAME=#{application_stub} PATTERN=monit TEMPLATE_DIR=#{web_dir}/script/templates OUTPUT_DIR=#{shared_dir}/templates CONFIG_FILE=`readlink /etc/#{config_file_name}` BASE_DIR=#{shared_dir}"
91
94
  puts "setting permissions & ownership on monit config files"
92
95
  set_permissions_on_files_in_dir( :dir=>"#{shared_dir}/templates", :ownership=>"root", :permissions=>"0700")
93
96
 
@@ -114,7 +117,7 @@ configuration.load do
114
117
  puts "regenerating logrotate config file"
115
118
  run "test -d #{shared_dir}/templates || mkdir -p #{shared_dir}/templates"
116
119
 
117
- run "cd #{web_dir} && #{sudo} rake itrigga:generator PATTERN=logrotate TEMPLATE_DIR=#{web_dir}/script/templates OUTPUT_DIR=#{shared_dir}/templates CONFIG_FILE=false BASE_DIR=#{shared_dir}"
120
+ run "cd #{web_dir} && #{sudo} rake itrigga:generator RAILS_ENV=#{stage} APPLICATION_NAME=#{application_stub} PATTERN=logrotate TEMPLATE_DIR=#{web_dir}/script/templates OUTPUT_DIR=#{shared_dir}/templates CONFIG_FILE=false BASE_DIR=#{shared_dir}"
118
121
  puts "setting permissions & ownership on logrotate config files"
119
122
  set_permissions_on_files_in_dir( :dir=>"#{shared_dir}/templates", :ownership=>"root", :permissions=>"0700" )
120
123
  end
@@ -142,7 +145,7 @@ configuration.load do
142
145
 
143
146
  with_role :solr do
144
147
  solr_lockfile_script_path = File.join(shared_dir,"templates","solr_lockfile_check.script")
145
- run "cd #{web_dir} && #{sudo} rake itrigga:generator PATTERN=solr_lockfile_check.cron TEMPLATE_DIR=#{web_dir}/script/templates OUTPUT_DIR=#{shared_dir}/templates CONFIG_FILE=false SOLR_LOCKFILE_SCRIPT_PATH=#{solr_lockfile_script_path}"
148
+ run "cd #{web_dir} && #{sudo} rake itrigga:generator RAILS_ENV=#{stage} APPLICATION_NAME=#{application_stub} PATTERN=solr_lockfile_check.cron TEMPLATE_DIR=#{web_dir}/script/templates OUTPUT_DIR=#{shared_dir}/templates CONFIG_FILE=false SOLR_LOCKFILE_SCRIPT_PATH=#{solr_lockfile_script_path}"
146
149
  end
147
150
 
148
151
  puts "setting permissions & ownership on cron scripts"
@@ -169,7 +172,7 @@ configuration.load do
169
172
 
170
173
  with_role :solr do
171
174
  solr_lockfile_path = File.join(shared_dir,"solr","data","index","*.lock")
172
- run "cd #{web_dir} && #{sudo} rake itrigga:generator PATTERN=solr_lockfile_check.script TEMPLATE_DIR=#{web_dir}/script/templates OUTPUT_DIR=#{shared_dir}/templates CONFIG_FILE=false SOLR_LOCKFILE_PATH=#{solr_lockfile_path} SOLR_TIMEOUT=900"
175
+ run "cd #{web_dir} && #{sudo} rake itrigga:generator RAILS_ENV=#{stage} APPLICATION_NAME=#{application_stub} PATTERN=solr_lockfile_check.script TEMPLATE_DIR=#{web_dir}/script/templates OUTPUT_DIR=#{shared_dir}/templates CONFIG_FILE=false SOLR_LOCKFILE_PATH=#{solr_lockfile_path} SOLR_TIMEOUT=900"
173
176
  end
174
177
 
175
178
  puts "setting permissions and ownership for solr_lockfile check script"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itrigga-cap_deploy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
4
+ hash: 31
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Al Davidson
@@ -15,12 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-05 00:00:00 +01:00
18
+ date: 2011-10-25 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  prerelease: false
23
23
  name: bundler
24
+ type: :development
24
25
  version_requirements: &id001 !ruby/object:Gem::Requirement
25
26
  none: false
26
27
  requirements:
@@ -33,10 +34,10 @@ dependencies:
33
34
  - 0
34
35
  version: 1.0.0
35
36
  requirement: *id001
36
- type: :development
37
37
  - !ruby/object:Gem::Dependency
38
38
  prerelease: false
39
39
  name: jeweler
40
+ type: :development
40
41
  version_requirements: &id002 !ruby/object:Gem::Requirement
41
42
  none: false
42
43
  requirements:
@@ -49,10 +50,10 @@ dependencies:
49
50
  - 4
50
51
  version: 1.6.4
51
52
  requirement: *id002
52
- type: :development
53
53
  - !ruby/object:Gem::Dependency
54
54
  prerelease: false
55
55
  name: rcov
56
+ type: :development
56
57
  version_requirements: &id003 !ruby/object:Gem::Requirement
57
58
  none: false
58
59
  requirements:
@@ -63,10 +64,10 @@ dependencies:
63
64
  - 0
64
65
  version: "0"
65
66
  requirement: *id003
66
- type: :development
67
67
  - !ruby/object:Gem::Dependency
68
68
  prerelease: false
69
69
  name: jeweler
70
+ type: :development
70
71
  version_requirements: &id004 !ruby/object:Gem::Requirement
71
72
  none: false
72
73
  requirements:
@@ -79,10 +80,10 @@ dependencies:
79
80
  - 4
80
81
  version: 1.6.4
81
82
  requirement: *id004
82
- type: :development
83
83
  - !ruby/object:Gem::Dependency
84
84
  prerelease: false
85
85
  name: rspec
86
+ type: :development
86
87
  version_requirements: &id005 !ruby/object:Gem::Requirement
87
88
  none: false
88
89
  requirements:
@@ -93,10 +94,10 @@ dependencies:
93
94
  - 0
94
95
  version: "0"
95
96
  requirement: *id005
96
- type: :development
97
97
  - !ruby/object:Gem::Dependency
98
98
  prerelease: false
99
99
  name: capistrano
100
+ type: :development
100
101
  version_requirements: &id006 !ruby/object:Gem::Requirement
101
102
  none: false
102
103
  requirements:
@@ -107,10 +108,10 @@ dependencies:
107
108
  - 0
108
109
  version: "0"
109
110
  requirement: *id006
110
- type: :development
111
111
  - !ruby/object:Gem::Dependency
112
112
  prerelease: false
113
113
  name: capistrano-ext
114
+ type: :development
114
115
  version_requirements: &id007 !ruby/object:Gem::Requirement
115
116
  none: false
116
117
  requirements:
@@ -121,7 +122,6 @@ dependencies:
121
122
  - 0
122
123
  version: "0"
123
124
  requirement: *id007
124
- type: :development
125
125
  description: "Provides\n - handy filesystem utility methods\n - common capistrano tasks\n - common hooks for deployment \n "
126
126
  email: aldavidson@itrigga.com
127
127
  executables: []
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  requirements: []
178
178
 
179
179
  rubyforge_project:
180
- rubygems_version: 1.3.7
180
+ rubygems_version: 1.4.2
181
181
  signing_key:
182
182
  specification_version: 3
183
183
  summary: Common deployment tasks