server-blender 0.0.8 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +1 -1
- data/VERSION +1 -1
- data/files/mix.sh +35 -0
- data/lib/blender/cli/init.rb +1 -1
- data/lib/blender/cli/mix.rb +6 -10
- data/server-blender.gemspec +2 -1
- metadata +3 -2
data/.document
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
data/files/mix.sh
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/bin/bash -eu
|
2
|
+
|
3
|
+
trap "echo FAILED" EXIT
|
4
|
+
|
5
|
+
# ensure_gem GEM [VERSION]
|
6
|
+
function ensure_gem()
|
7
|
+
{
|
8
|
+
if [ $# -eq 2 ]; then
|
9
|
+
# name + version
|
10
|
+
if ! gem list $1 | grep -q "$1 (\([^,]*, \)*${2//./\\.}\(, [^,]*\)*)$"; then
|
11
|
+
echo installing $1 $2
|
12
|
+
gem install --no-ri --no-rdoc $1 -v$2
|
13
|
+
fi
|
14
|
+
else
|
15
|
+
# name only
|
16
|
+
if ! gem list $1 | grep -q "^$1 ";then
|
17
|
+
echo installing $1
|
18
|
+
gem install --no-ri --no-rdoc $1
|
19
|
+
fi
|
20
|
+
fi
|
21
|
+
}
|
22
|
+
|
23
|
+
ensure_gem shadow_puppet 0.3.2
|
24
|
+
ensure_gem ruby-debug
|
25
|
+
ensure_gem server-blender-manifest 0.0.9
|
26
|
+
|
27
|
+
cd /var/lib/blender/recipes
|
28
|
+
echo "Running Puppet [recipe: $RECIPE]"
|
29
|
+
|
30
|
+
blender-mix-recipe $RECIPE
|
31
|
+
|
32
|
+
trap - EXIT
|
33
|
+
|
34
|
+
echo
|
35
|
+
echo Your ServerShake is ready
|
data/lib/blender/cli/init.rb
CHANGED
@@ -41,4 +41,4 @@ def run(*cmd)
|
|
41
41
|
system(*cmd)
|
42
42
|
end
|
43
43
|
|
44
|
-
run "cat files/bootstrap.sh | ssh #{host} USE_SYSTEM_GEMS=#{options[:system_gems]}#{extra} /bin/bash -eu"
|
44
|
+
run "cat #{File.expand_path("files/bootstrap.sh", Blender::ROOT)} | ssh #{host} USE_SYSTEM_GEMS=#{options[:system_gems]}#{extra} /bin/bash -eu"
|
data/lib/blender/cli/mix.rb
CHANGED
@@ -49,23 +49,19 @@ end
|
|
49
49
|
|
50
50
|
File.file?(File.join(dir, recipe = options[:recipe])) ||
|
51
51
|
File.file?(File.join(dir, recipe = "#{options[:recipe]}.rb")) ||
|
52
|
-
abort("recipe #{recipe} not found\n#{opts}")
|
52
|
+
abort("recipe #{options[:recipe]} not found\n#{opts}")
|
53
53
|
|
54
54
|
WORK_DIR = "/var/lib/blender/recipes"
|
55
|
-
LOCAL_MANIFEST_DIR = File.expand_path("../../manifest", __FILE__)
|
56
|
-
REMOTE_MANIFEST_DIR = "/var/lib/blender/manifest"
|
57
|
-
ROOT_MANIFEST = File.join(REMOTE_MANIFEST_DIR, "root.rb")
|
58
55
|
|
59
56
|
def run(*cmd)
|
60
57
|
puts ">> #{cmd * ' '}"
|
61
58
|
system(*cmd)
|
62
59
|
end
|
63
60
|
|
64
|
-
run("rsync -azP --delete --exclude '.*' #{
|
65
|
-
run("rsync -azP --delete --exclude '.*' --exclude other #{dir}/ #{host}:#{WORK_DIR}") &&
|
61
|
+
run("rsync -azP --delete --exclude '.*' #{dir}/ #{host}:#{WORK_DIR}") &&
|
66
62
|
|
67
|
-
|
68
|
-
|
69
|
-
|
63
|
+
env_config = "RECIPE=#{recipe}"
|
64
|
+
env_config << " NODE=#{options[:node]}" if options[:node]
|
65
|
+
env_config << " ROLES=#{options[:roles]}" if options[:roles]
|
70
66
|
|
71
|
-
run("
|
67
|
+
run "cat #{File.expand_path("files/mix.sh", Blender::ROOT)} | ssh #{host} #{env_config} /bin/bash -eu"
|
data/server-blender.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{server-blender}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Vitaly Kushner"]
|
@@ -36,6 +36,7 @@ http://reductivelabs.com/products/puppet/
|
|
36
36
|
"VERSION",
|
37
37
|
"bin/blender",
|
38
38
|
"files/bootstrap.sh",
|
39
|
+
"files/mix.sh",
|
39
40
|
"lib/blender.rb",
|
40
41
|
"lib/blender/cli/init.rb",
|
41
42
|
"lib/blender/cli/mix.rb",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 10
|
9
|
+
version: 0.0.10
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Vitaly Kushner
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- VERSION
|
72
72
|
- bin/blender
|
73
73
|
- files/bootstrap.sh
|
74
|
+
- files/mix.sh
|
74
75
|
- lib/blender.rb
|
75
76
|
- lib/blender/cli/init.rb
|
76
77
|
- lib/blender/cli/mix.rb
|