Permalink
Browse files

Added ability to upload fully versioned packages (including hour, minute

and second of release). Added ability to rollback to any previously
published revision on the cluster.
  • Loading branch information...
msporny committed Jul 7, 2008
1 parent eeead7d commit 95d51eda87be16cc9904ce8036e70e93d2658b21
Showing with 14 additions and 2 deletions.
  1. +2 −0 Makefile.in
  2. +12 −2 setup/capfile.in
View
@@ -98,3 +98,5 @@ install:
deploy:
@cd setup && cap deploy_dbcore
+rollback:
+ @cd setup && cap rollback_dbcore
View
@@ -7,13 +7,23 @@ role :apiservers, "bobloblaw", "swollengoat", "llamalicious", "misterf"
default_run_options[:pty] = true
set :user, "root"
+# Setup other deployment info
+now = Time.now.strftime("%H%M%S")
+
# All of the tasks follow
desc "Deploys the dbcore libraries to the cluster."
task :deploy_dbcore, :roles => :apiservers do
put(File.read('../installers/packages/libdbcore3_@FULL_VERSION@_i386.deb'),
- "/root/packages/libdbcore3_@FULL_VERSION@_i386.deb",
+ "/root/packages/libdbcore3_@FULL_VERSION@-#{now}_i386.deb",
:mode => 0600)
- run "dpkg -i /root/packages/libdbcore3_@FULL_VERSION@_i386.deb"
+ run "dpkg -i /root/packages/libdbcore3_@FULL_VERSION@-#{now}_i386.deb"
+end
+
+desc "Performs a package rollback on the dbcore libraries."
+task :rollback_dbcore, :roles => :apiservers do
+ run "ls -1 /root/packages/libdbcore3_*deb"
+ set :rollback_version, Capistrano::CLI.ui.ask("Rollback version:")
+ run "dpkg -i --force-downgrade /root/packages/libdbcore3_#{rollback_version}_i386.deb"
end

0 comments on commit 95d51ed

Please sign in to comment.