obbistrano 1.0.95 → 1.0.96
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.
- data/lib/obbistrano_tasks.rb +9 -14
- data/obbistrano.gemspec +1 -1
- metadata +1 -1
data/lib/obbistrano_tasks.rb
CHANGED
@@ -348,8 +348,9 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
348
348
|
config_check
|
349
349
|
print "==== Which server would you like to copy #{application} to? [Full Domain Name] "
|
350
350
|
new_server = STDIN.gets.strip
|
351
|
-
|
352
|
-
|
351
|
+
setup_user, hosts => new_server
|
352
|
+
vhost, hosts => new_server
|
353
|
+
setup_mysql, hosts => new_server
|
353
354
|
run "rsync -avzh . #{user}@#{new_server}: --exclude 'tmp/*'"
|
354
355
|
"#{databases}".each do |db|
|
355
356
|
run "mysqldump #{db} | ssh #{user}@#{new_server} mysql #{db}"
|
@@ -357,12 +358,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
357
358
|
|
358
359
|
end
|
359
360
|
|
360
|
-
task :mirror_setup do
|
361
|
-
setup_user
|
362
|
-
vhost
|
363
|
-
setup_mysql
|
364
|
-
end
|
365
|
-
|
366
361
|
|
367
362
|
###### Private tasks for server operations #############
|
368
363
|
|
@@ -411,7 +406,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
411
406
|
|
412
407
|
namespace :ubuntu do
|
413
408
|
|
414
|
-
task :setup_user do
|
409
|
+
task :setup_user, :roles => :web do
|
415
410
|
set :user_to_add, "#{user}"
|
416
411
|
set :passwd_to_add, "#{password}"
|
417
412
|
with_user("root", "#{root_pass}") do
|
@@ -420,7 +415,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
420
415
|
end
|
421
416
|
end
|
422
417
|
|
423
|
-
task :vhost do
|
418
|
+
task :vhost, :roles => :web do
|
424
419
|
with_user("root", "#{root_pass}") do
|
425
420
|
public_ip = ""
|
426
421
|
run "ifconfig eth0 | grep inet | awk '{print $2}' | sed 's/addr://'" do |_, _, public_ip| end
|
@@ -436,7 +431,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
436
431
|
end
|
437
432
|
end
|
438
433
|
|
439
|
-
task :restart do
|
434
|
+
task :restart, :roles => :web do
|
440
435
|
with_user("root", "#{root_pass}") do
|
441
436
|
run "/etc/init.d/apache2 restart"
|
442
437
|
end
|
@@ -446,7 +441,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
446
441
|
|
447
442
|
namespace :fedora do
|
448
443
|
|
449
|
-
task :setup_user do
|
444
|
+
task :setup_user :roles => :web do
|
450
445
|
set :user_to_add, "#{user}"
|
451
446
|
set :passwd_to_add, "#{password}"
|
452
447
|
with_user("root", "#{root_pass}") do
|
@@ -455,7 +450,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
455
450
|
end
|
456
451
|
end
|
457
452
|
|
458
|
-
task :vhost do
|
453
|
+
task :vhost, :roles => :web do
|
459
454
|
with_user("root", "#{root_pass}") do
|
460
455
|
public_ip = ""
|
461
456
|
run "ifconfig eth0 | grep inet | awk '{print $2}' | sed 's/addr://'" do |_, _, public_ip| end
|
@@ -471,7 +466,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
471
466
|
end
|
472
467
|
end
|
473
468
|
|
474
|
-
task :restart do
|
469
|
+
task :restart, :roles => :web do
|
475
470
|
with_user("root", "#{root_pass}") do
|
476
471
|
run "/etc/rc.d/init.d/httpd restart"
|
477
472
|
end
|
data/obbistrano.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{obbistrano}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.96"
|
6
6
|
s.authors = ["Ross Riley", "One Black Bear"]
|
7
7
|
s.date = Time.now
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|