alpha_omega 1.1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/alpha_omega +2 -10
- data/lib/alpha_omega/deploy.rb +2 -16
- data/libexec/ao +15 -0
- data/libexec/ao-activate +22 -0
- data/libexec/ao-build +22 -0
- data/libexec/ao-check +22 -0
- data/libexec/ao-compare +22 -0
- data/libexec/ao-cook +22 -0
- data/libexec/ao-deploy +22 -0
- data/libexec/ao-dist +22 -0
- data/libexec/ao-lock +31 -0
- data/libexec/ao-migrate +22 -0
- data/libexec/ao-plan +22 -0
- data/libexec/ao-release +22 -0
- data/libexec/ao-restart +22 -0
- data/libexec/ao-rollback +22 -0
- data/libexec/ao-shell +22 -0
- data/libexec/ao-stage +22 -0
- data/libexec/ao-task +23 -0
- data/libexec/ao-unlock +31 -0
- data/sbin/_bump +126 -0
- data/sbin/_jason +172 -0
- data/sbin/_log4sh +3840 -0
- data/sbin/_meat +172 -0
- data/sbin/_prime +8 -0
- data/sbin/_shflags +1012 -0
- data/sbin/_shunit +1048 -0
- data/sbin/_sub +37 -0
- data/sbin/_treadstone +8 -0
- data/sbin/_versions +174 -0
- data/sbin/ao +15 -0
- data/sbin/stub +15 -0
- metadata +31 -57
- data/libexec/activate +0 -199
- data/libexec/build +0 -30
- data/libexec/build.orig +0 -199
- data/libexec/bump.orig +0 -32
- data/libexec/check +0 -199
- data/libexec/compare +0 -199
- data/libexec/config +0 -199
- data/libexec/debug +0 -199
- data/libexec/deploy +0 -199
- data/libexec/dist +0 -199
- data/libexec/dna +0 -199
- data/libexec/hosts +0 -199
- data/libexec/invoke +0 -199
- data/libexec/lock +0 -199
- data/libexec/migrate +0 -199
- data/libexec/plan +0 -199
- data/libexec/release +0 -199
- data/libexec/repl +0 -199
- data/libexec/restart +0 -199
- data/libexec/rollback +0 -199
- data/libexec/shell +0 -199
- data/libexec/stage +0 -199
- data/libexec/task +0 -199
- data/libexec/unlock +0 -199
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/bin/alpha_omega
CHANGED
@@ -1,12 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
script = search.collect {|f| "#{f}/#{File.basename(ARGV[0])}" }.find {|f| File.exists? f }
|
6
|
-
|
7
|
-
unless script
|
8
|
-
puts "ERROR: can't find script #{File.basename(ARGV[0])}"
|
9
|
-
exit 1
|
10
|
-
end
|
11
|
-
|
12
|
-
system(script, *ARGV[1..-1])
|
3
|
+
shome=File.expand_path('../..', File.realpath(__FILE__))
|
4
|
+
system("#{shome}/libexec/ao, *ARGV[1..-1])
|
data/lib/alpha_omega/deploy.rb
CHANGED
@@ -53,7 +53,6 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
53
53
|
_cset(:run_method) { fetch(:use_sudo, true) ? :sudo : :run }
|
54
54
|
|
55
55
|
_cset :last_pod, nil
|
56
|
-
_cset :local_only, ENV['LOCAL_ONLY'] ? true : false
|
57
56
|
|
58
57
|
_cset (:figlet) { [%x(which figlet).strip].reject {|f| !(File.executable? f)}.first || echo }
|
59
58
|
|
@@ -426,17 +425,6 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
426
425
|
run "mv -T #{deploy_path}.new #{deploy_path}"
|
427
426
|
end
|
428
427
|
|
429
|
-
desc <<-DESC
|
430
|
-
Runs a repl in the compare release
|
431
|
-
DESC
|
432
|
-
task :repl do
|
433
|
-
set :deploy_path_name, "compare"
|
434
|
-
set :deploy_release_name, "compare"
|
435
|
-
update_code
|
436
|
-
run "ln -nfs #{deploy_release} #{deploy_path}.new"
|
437
|
-
run "mv -T #{deploy_path}.new #{deploy_path}"
|
438
|
-
end
|
439
|
-
|
440
428
|
namespace :rollback do
|
441
429
|
desc <<-DESC
|
442
430
|
[internal] Points the current symlink at the previous revision.
|
@@ -661,10 +649,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
661
649
|
after "deploy:build", "assets:build"
|
662
650
|
|
663
651
|
on :exit do
|
664
|
-
|
665
|
-
|
666
|
-
put full_log, "#{log_path}/#{application}-#{ENV["AO_USER"]}.log-#{Time.now.strftime('%Y%m%d-%H%M')}"
|
667
|
-
end
|
652
|
+
logger.important "uploading deploy logs: #{log_path}/#{application}-#{ENV["AO_USER"]}.log-#{Time.now.strftime('%Y%m%d-%H%M')}"
|
653
|
+
put full_log, "#{log_path}/#{application}-#{ENV["AO_USER"]}.log-#{Time.now.strftime('%Y%m%d-%H%M')}"
|
668
654
|
end
|
669
655
|
|
670
656
|
end # Capistrano::Configuratioy
|
data/libexec/ao
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao -- alpha omega command line tool
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao <subcommand>
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-activate
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-activate -- make the next workarea current and restart services
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao activate [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:symlink deploy:restart
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-build
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-build -- build assets, binaries, etc.
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao build [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:build
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-check
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-check -- check all the workareas
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao check [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:check
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-compare
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-compare -- compare workarea against the current deploy
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao compare [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock_compare deploy:compare
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-cook
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-cook -- configure application
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao cook [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:cook
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-deploy
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-deploy -- deploy the application
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao deploy [deploy_set..]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-dist
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-dist -- distribute assets, binaries
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao dist [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:dist
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-lock
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-lock -- lock a deploy
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao lock [deploy_set...]
|
8
|
+
#/ ao lock migreate|compare [deploy_set...]
|
9
|
+
|
10
|
+
# figure out the project root under which bin, lib live
|
11
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
12
|
+
|
13
|
+
# load a jason bourne library
|
14
|
+
source "$shome/sbin/_treadstone"
|
15
|
+
|
16
|
+
# parse the command-line
|
17
|
+
|
18
|
+
# entry point
|
19
|
+
function main {
|
20
|
+
case "${1}" in
|
21
|
+
compare|migrate)
|
22
|
+
nm_lock="${1}"; shift
|
23
|
+
bundle exec cap "$@" deploy:dont_unlock "deploy:lock_${nm_lock}"
|
24
|
+
;;
|
25
|
+
*)
|
26
|
+
bundle exec cap "$@" deploy:dont_unlock deploy:lock
|
27
|
+
;;
|
28
|
+
esac
|
29
|
+
}
|
30
|
+
|
31
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-migrate
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-migrate -- deploy to a migration workarea
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao migrate <deploy_host...>
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock_migrate deploy:migrate
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-plan
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-plan -- show what the deploy would do
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao plan [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:plan
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-release
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-release -- deploy a major release
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao release [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-restart
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-restart -- restart all services
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao restart [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:restart
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-rollback
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-rollback -- rollback to a prevous release
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao rollback [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:rollback
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-shell
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-shell -- run a capistrano shell
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao shell [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" shell
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-stage
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-stage -- prepare the next application workarea
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao stage [deploy_set...]
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
bundle exec cap "$@" deploy:lock deploy:update_code deploy:symlink_next
|
20
|
+
}
|
21
|
+
|
22
|
+
require 'sub' "$BASH_SOURCE" "$@"
|
data/libexec/ao-task
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
#/ NAME
|
4
|
+
#/ ao-task -- run a capistrano task remotely
|
5
|
+
#/
|
6
|
+
#/ SYNOPSIS
|
7
|
+
#/ ao task <task_name> deploy_set...
|
8
|
+
|
9
|
+
# figure out the project root under which bin, lib live
|
10
|
+
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
|
11
|
+
|
12
|
+
# load a jason bourne library
|
13
|
+
source "$shome/sbin/_treadstone"
|
14
|
+
|
15
|
+
# parse the command-line
|
16
|
+
|
17
|
+
# entry point
|
18
|
+
function main {
|
19
|
+
local nm_task=$1; shift
|
20
|
+
bundle exec cap "$@" deploy:lock_migrate deploy:migrate "$nm_task"
|
21
|
+
}
|
22
|
+
|
23
|
+
require 'sub' "$BASH_SOURCE" "$@"
|