alpha_omega 1.3.1 → 1.3.2
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/VERSION +1 -1
- data/libexec/aoh-init +68 -0
- metadata +4 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.3.
|
|
1
|
+
1.3.2
|
data/libexec/aoh-init
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
#/ NAME
|
|
4
|
+
#/ init --
|
|
5
|
+
#/
|
|
6
|
+
#/ SYNOPSIS
|
|
7
|
+
#/
|
|
8
|
+
#/ init
|
|
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/libexec/_treadstone"
|
|
15
|
+
|
|
16
|
+
function main {
|
|
17
|
+
if [[ "$#" < 1 ]]; then
|
|
18
|
+
logger_fatal "missing application name"
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
local nm_app="$1"; shift
|
|
23
|
+
local dollar='$'
|
|
24
|
+
|
|
25
|
+
cat > "$shome/Capfile" <<EOF
|
|
26
|
+
#!/usr/bin/env ruby
|
|
27
|
+
|
|
28
|
+
require 'alpha_omega/deploy'
|
|
29
|
+
|
|
30
|
+
# application deploy
|
|
31
|
+
namespace :${nm_app} do
|
|
32
|
+
namespace :bundle do
|
|
33
|
+
task :ruby do
|
|
34
|
+
run "PATH=${dollar}PATH:/usr/local/rvm/bin:${dollar}HOME/.rvm/bin; { cd #{deploy_release} && #{ruby_loader} bundle check 2>&1 >/dev/null; } || #{ruby_loader} bundle --local --path vendor/bundle >/dev/null"
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# overrides
|
|
40
|
+
namespace :deploy do
|
|
41
|
+
task :bundle do
|
|
42
|
+
alpha_omega.bundle.ruby
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# interesting hosts
|
|
47
|
+
Deploy self, __FILE__ do |admin, node|
|
|
48
|
+
if node["roles"].include("something_something")
|
|
49
|
+
{ :deploy => { } }
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
EOF
|
|
53
|
+
|
|
54
|
+
mkdir -p "$shome/config"
|
|
55
|
+
cat > "$shome/config/deploy.yml" <<EOF
|
|
56
|
+
---
|
|
57
|
+
repository: https://github.com/something_something
|
|
58
|
+
application: ${nm_app}
|
|
59
|
+
|
|
60
|
+
ruby_loader: rvm-exec
|
|
61
|
+
app_ruby: ree
|
|
62
|
+
|
|
63
|
+
branches: [ production staging master ]
|
|
64
|
+
branch_regex: /
|
|
65
|
+
EOF
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
require sub "$BASH_SOURCE" "$@"
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alpha_omega
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 31
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 3
|
|
9
|
-
-
|
|
10
|
-
version: 1.3.
|
|
9
|
+
- 2
|
|
10
|
+
version: 1.3.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- David Nghiem
|
|
@@ -122,6 +122,7 @@ files:
|
|
|
122
122
|
- libexec/aoh-dist
|
|
123
123
|
- libexec/aoh-dna
|
|
124
124
|
- libexec/aoh-hosts
|
|
125
|
+
- libexec/aoh-init
|
|
125
126
|
- libexec/aoh-lock
|
|
126
127
|
- libexec/aoh-migrate
|
|
127
128
|
- libexec/aoh-proxy
|