brightbox 2.2.2 → 2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/brightbox +12 -6
- data/lib/brightbox/recipes/configure.rb +20 -12
- data/lib/brightbox/recipes/deploy.rb +0 -3
- data/lib/brightbox/recipes/gems.rb +7 -9
- data/lib/brightbox/recipes/variables.rb +1 -2
- data/lib/brightbox/version.rb +1 -1
- metadata +2 -2
data/bin/brightbox
CHANGED
@@ -227,6 +227,17 @@ unless Rake::Task.task_defined?("db:check:config")
|
|
227
227
|
### Other options you can set ##
|
228
228
|
# Comma separated list of additional domains for Apache
|
229
229
|
# set :domain_aliases, "www.example.com,dev.example.com"
|
230
|
+
|
231
|
+
## Dependencies
|
232
|
+
# Set the commands and gems that your application requires. e.g.
|
233
|
+
# depend :remote, :gem, "will_paginate", ">=2.2.2"
|
234
|
+
# depend :remote, :command, "brightbox"
|
235
|
+
#
|
236
|
+
# Gem with a source (such as github)
|
237
|
+
# depend :remote, :gem, "tmm1-amqp", ">=0.6.0", "http://gems.github.com"
|
238
|
+
#
|
239
|
+
# Specify your specific Rails version if it is not vendored
|
240
|
+
# depend :remote, :gem, "rails", "=2.2.2"
|
230
241
|
|
231
242
|
## Local Shared Area
|
232
243
|
# These are the list of files and directories that you want
|
@@ -325,12 +336,7 @@ unless Rake::Task.task_defined?("db:check:config")
|
|
325
336
|
# NB. This just affects the default recipes unless you use the
|
326
337
|
# 'try_sudo' command to run your commands.
|
327
338
|
# set :use_sudo, false
|
328
|
-
# set :runner, user
|
329
|
-
|
330
|
-
## Dependencies
|
331
|
-
# Set the commands and gems that your application requires. e.g.
|
332
|
-
# depend :remote, :gem, "will_paginate", ">=2.2.2"
|
333
|
-
# depend :remote, :command, "brightbox"\n\n
|
339
|
+
# set :runner, user\n\n
|
334
340
|
FILE
|
335
341
|
}
|
336
342
|
|
@@ -18,35 +18,43 @@
|
|
18
18
|
# <http://www.gnu.org/licenses/>.
|
19
19
|
#
|
20
20
|
|
21
|
+
# Commands
|
22
|
+
_cset :monit_command, "railsapp-monit"
|
23
|
+
_cset :apache_command, "railsapp-apache"
|
24
|
+
_cset :nginx_command, "railsapp-nginx"
|
25
|
+
_cset :mongrel_command, "railsapp-mongrel"
|
26
|
+
_cset :logrotate_command, "railsapp-logrotate"
|
27
|
+
_cset :maintenance_command, "railsapp-maintenance"
|
28
|
+
|
21
29
|
def monit_setup
|
22
|
-
"
|
30
|
+
"#{fetch(:monit_command)} _#{::Version}_"
|
23
31
|
end
|
24
|
-
depend :remote, :command,
|
32
|
+
depend :remote, :command, fetch(:monit_command)
|
25
33
|
|
26
34
|
def apache_setup
|
27
|
-
"
|
35
|
+
"#{fetch(:apache_command)} _#{::Version}_"
|
28
36
|
end
|
29
|
-
depend :remote, :command,
|
37
|
+
depend :remote, :command, fetch(:apache_command)
|
30
38
|
|
31
39
|
def nginx_setup
|
32
|
-
"
|
40
|
+
"#{fetch(:nginx_command)} _#{::Version}_"
|
33
41
|
end
|
34
|
-
depend :remote, :command,
|
42
|
+
depend :remote, :command, fetch(:nginx_command)
|
35
43
|
|
36
44
|
def mongrel_setup
|
37
|
-
"
|
45
|
+
"#{fetch(:mongrel_command)} _#{::Version}_"
|
38
46
|
end
|
39
|
-
depend :remote, :command,
|
47
|
+
depend :remote, :command, fetch(:mongrel_command)
|
40
48
|
|
41
49
|
def logrotate_setup
|
42
|
-
"
|
50
|
+
"#{fetch(:logrotate_command)} _#{::Version}_"
|
43
51
|
end
|
44
|
-
depend :remote, :command,
|
52
|
+
depend :remote, :command, fetch(:logrotate_command)
|
45
53
|
|
46
54
|
def maintenance_setup
|
47
|
-
"
|
55
|
+
"#{fetch(:maintenance_command)} _#{::Version}_"
|
48
56
|
end
|
49
|
-
depend :remote, :command,
|
57
|
+
depend :remote, :command, fetch(:maintenance_command)
|
50
58
|
|
51
59
|
Capistrano::Configuration.instance(true).load File.join(File.dirname(__FILE__), 'configure', 'mongrel.rb')
|
52
60
|
|
@@ -87,9 +87,6 @@ namespace :deploy do
|
|
87
87
|
Execute Rake tasks that need to be run once per system
|
88
88
|
}
|
89
89
|
task :singleton, :roles => :db, :only => {:primary => true} do
|
90
|
-
unless disable_db_check
|
91
|
-
run rake_task("db:check:config")
|
92
|
-
end
|
93
90
|
run rake_task("db:create")
|
94
91
|
end
|
95
92
|
|
@@ -26,10 +26,11 @@ namespace :gems do
|
|
26
26
|
install_gem("brightbox-server-tools", ::Version)
|
27
27
|
end
|
28
28
|
|
29
|
-
def install_gem(gem, version)
|
29
|
+
def install_gem(gem, version, source = nil)
|
30
|
+
source_arg = source.nil? ? "" : "--source #{source}"
|
30
31
|
sudo %Q{sh -c "
|
31
32
|
gem spec #{gem} --version '#{version}' 2>/dev/null|egrep -q '^name:' ||
|
32
|
-
sudo gem install --no-ri --no-rdoc --version '#{version}' #{gem}"
|
33
|
+
sudo gem install --no-ri --no-rdoc --version '#{version}' #{source_arg} #{gem}"
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
@@ -43,8 +44,9 @@ namespace :gems do
|
|
43
44
|
deps.each do |gemspec|
|
44
45
|
gem = gemspec[0]
|
45
46
|
version = gemspec[1]
|
47
|
+
source = gemspec[2]
|
46
48
|
puts "Checking for #{gem} at #{version}"
|
47
|
-
install_gem(gem, version)
|
49
|
+
install_gem(gem, version, source)
|
48
50
|
end
|
49
51
|
end
|
50
52
|
|
@@ -52,12 +54,8 @@ namespace :gems do
|
|
52
54
|
[internal]Run the gems install task in the application.
|
53
55
|
}
|
54
56
|
task :install, :except => {:no_release => true} do
|
55
|
-
|
56
|
-
|
57
|
-
sudo rake_task("gems:install")
|
58
|
-
else
|
59
|
-
sudo rake_task("gems:install")
|
60
|
-
end
|
57
|
+
puts "Checking required gems are installed"
|
58
|
+
install_gems
|
61
59
|
end
|
62
60
|
|
63
61
|
end
|
@@ -39,7 +39,6 @@ _cset :domain_aliases, nil
|
|
39
39
|
_cset :max_age, nil
|
40
40
|
_cset :user, "rails"
|
41
41
|
_cset :runner, user
|
42
|
-
_cset :disable_db_check, false
|
43
42
|
_cset :passenger_restart_strategy, :hard
|
44
43
|
_cset :use_sudo, false
|
45
44
|
_cset :ssl_certificate, nil
|
@@ -55,4 +54,4 @@ _cset :local_shared_dirs, []
|
|
55
54
|
_cset :local_shared_files, []
|
56
55
|
_cset :global_shared_dirs, []
|
57
56
|
_cset :global_shared_files, []
|
58
|
-
_cset(:global_shared_path) { shared_path }
|
57
|
+
_cset(:global_shared_path) { shared_path }
|
data/lib/brightbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: "2.3"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Leach
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-
|
14
|
+
date: 2009-02-13 00:00:00 +00:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|