server-blender 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/files/bootstrap.sh +2 -11
- data/files/mix.sh +14 -5
- data/lib/blender/cli/mix.rb +11 -7
- data/server-blender.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.11
|
data/files/bootstrap.sh
CHANGED
@@ -165,13 +165,6 @@ function install_custom_rubygems()
|
|
165
165
|
ln -sfn /usr/bin/gem1.8 /usr/bin/gem
|
166
166
|
}
|
167
167
|
|
168
|
-
function install_puppet()
|
169
|
-
{
|
170
|
-
log "installing puppet"
|
171
|
-
gem install --no-rdoc --no-ri shadow_puppet -v 0.3.2
|
172
|
-
gem install --no-rdoc --no-ri ruby-debug
|
173
|
-
}
|
174
|
-
|
175
168
|
# adds /var/lib/gems/1.8/bin to paths. only needed with the system (debian) braindead gems
|
176
169
|
|
177
170
|
function add_gems_to_system_path()
|
@@ -227,10 +220,8 @@ else
|
|
227
220
|
# upstream rubygems install executables into /usr/bin so no need to fix the path
|
228
221
|
fi
|
229
222
|
|
230
|
-
|
231
|
-
gem install rdoc #
|
232
|
-
|
233
|
-
install_puppet
|
223
|
+
gem install --no-rdoc --no-ri rdoc # needed by most gems
|
224
|
+
gem install --no-rdoc --no-ri ruby-debug # very useful to debug manifests
|
234
225
|
|
235
226
|
date > /etc/bootstraped_at
|
236
227
|
etckeeper commit "bootstrapped"
|
data/files/mix.sh
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
#!/bin/bash -eu
|
2
2
|
|
3
|
+
SHADOW_PUPPET_VERSION="0.3.2"
|
4
|
+
MANIFEST_VERSION="0.0.11"
|
5
|
+
|
3
6
|
trap "echo FAILED" EXIT
|
4
7
|
|
5
8
|
# ensure_gem GEM [VERSION]
|
@@ -20,16 +23,22 @@ function ensure_gem()
|
|
20
23
|
fi
|
21
24
|
}
|
22
25
|
|
23
|
-
ensure_gem shadow_puppet
|
26
|
+
ensure_gem shadow_puppet $SHADOW_PUPPET_VERSION
|
24
27
|
ensure_gem ruby-debug
|
25
|
-
ensure_gem server-blender-manifest
|
28
|
+
ensure_gem server-blender-manifest $MANIFEST_VERSION
|
29
|
+
|
30
|
+
echo "Mix: [recipe: $RECIPE, node: ${NODE:-}, roles: ${ROLES:-}]"
|
26
31
|
|
27
32
|
cd /var/lib/blender/recipes
|
28
|
-
echo "Running Puppet [recipe: $RECIPE]"
|
29
33
|
|
30
|
-
|
34
|
+
ruby -rrubygems <<-RUBY
|
35
|
+
gem 'server-blender-manifest', '$MANIFEST_VERSION'
|
36
|
+
require 'blender/manifest'
|
37
|
+
|
38
|
+
system "shadow_puppet", "_${SHADOW_PUPPET_VERSION}_", Blender::Manifest::ROOT
|
39
|
+
RUBY
|
31
40
|
|
32
41
|
trap - EXIT
|
33
42
|
|
34
43
|
echo
|
35
|
-
echo Your ServerShake is ready
|
44
|
+
echo Your ServerShake is ready. Have fun!
|
data/lib/blender/cli/mix.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
options = {
|
2
|
-
:recipe => 'default'
|
3
|
-
}
|
1
|
+
options = {}
|
4
2
|
opts = OptionParser.new do |opts|
|
5
3
|
opts.banner = "Usage: blender mix [OPTIONS] [DIR] HOST"
|
6
4
|
opts.separator "Options:"
|
7
5
|
|
8
|
-
opts.on("-r", "--recipe RECIPE", "
|
6
|
+
opts.on("-r", "--recipe RECIPE", "if RECIPE is not specified blender will first look for <directory_name>.rb and then for blender-recipe.rb") do |val|
|
9
7
|
options[:recipe] = val
|
10
8
|
end
|
11
9
|
|
@@ -47,9 +45,15 @@ unless File.directory?(dir)
|
|
47
45
|
abort(opts.to_s)
|
48
46
|
end
|
49
47
|
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
# check for recipe, recipe.rb, directory_name.rb, and default.rb
|
49
|
+
recipes = []
|
50
|
+
if rname = options[:recipe]
|
51
|
+
recipes << rname << "#{rname}.rb"
|
52
|
+
end
|
53
|
+
recipes << "#{File.basename(File.expand_path(dir))}.rb" << "blender-recipe.rb"
|
54
|
+
|
55
|
+
recipe = recipes.detect {|r| File.file?(File.join(dir, r))} ||
|
56
|
+
abort("recipe not found\n#{opts}")
|
53
57
|
|
54
58
|
WORK_DIR = "/var/lib/blender/recipes"
|
55
59
|
|
data/server-blender.gemspec
CHANGED