rig 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/conf/config.yml +3 -3
- data/lib/rig/cloud/environment.rb +8 -5
- data/lib/rig/config.rb +4 -0
- data/lib/rig/version.rb +1 -1
- metadata +3 -3
data/conf/config.yml
CHANGED
@@ -6,11 +6,11 @@ rig:
|
|
6
6
|
#
|
7
7
|
#chef:
|
8
8
|
# knife: /path/to/chef/knife.rb
|
9
|
-
|
10
|
-
#
|
9
|
+
|
10
|
+
#TODO: Figure out the same thing for puppet
|
11
11
|
|
12
12
|
ssh:
|
13
|
-
# user to connect as, when ssh to server
|
13
|
+
# user to connect as, when ssh'ing to server
|
14
14
|
user: root
|
15
15
|
|
16
16
|
# the account to use if one is not specified
|
@@ -5,7 +5,7 @@ module Rig
|
|
5
5
|
attr_reader :balancers
|
6
6
|
attr_reader :name
|
7
7
|
attr_reader :template
|
8
|
-
attr_reader :
|
8
|
+
attr_reader :image
|
9
9
|
attr_reader :region
|
10
10
|
attr_reader :flavor
|
11
11
|
|
@@ -24,7 +24,7 @@ module Rig
|
|
24
24
|
:multi => {
|
25
25
|
:groups => %w{app-server db-inqcloud-dev},
|
26
26
|
:instances => [
|
27
|
-
:harvester => { :flavor => 'c1.large', :count => 3, :
|
27
|
+
:harvester => { :flavor => 'c1.large', :count => 3, :image => "ami-faketest" },
|
28
28
|
:queue => { :flavor => 'c1.medium', :count => 3 },
|
29
29
|
:cache => { :flavor => 'm1.medium', :count => 3 },
|
30
30
|
:app => { :flavor => 'c1.large', :count => 3, :balance => true, :primary => true }
|
@@ -64,6 +64,7 @@ module Rig
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
+
#TODO: overall, need better handling for global config, template and local overrides
|
67
68
|
def initialize(name, template=nil, opts={ })
|
68
69
|
@options = {
|
69
70
|
:region => Rig.config.region,
|
@@ -72,7 +73,9 @@ module Rig
|
|
72
73
|
@name = name
|
73
74
|
@template = template
|
74
75
|
@region = @options[:region]
|
75
|
-
|
76
|
+
#TODO: allow global config setting for image (in AWS, the ami)
|
77
|
+
@image = @options[:image] # || Rig.config.compute.image[@region] || Rig.config.compute.image
|
78
|
+
#TODO: allow global config setting for flavor (in AWS, the size, like: m1.large)
|
76
79
|
@flavor = @options[:flavor] # || Rig.config.flavor[@region] || Rig.config.flavor
|
77
80
|
@servers = []
|
78
81
|
@balancers = []
|
@@ -89,7 +92,7 @@ module Rig
|
|
89
92
|
setinstances = []
|
90
93
|
inst.each do |role, tmpl|
|
91
94
|
count = tmpl[:count]
|
92
|
-
|
95
|
+
image = tmpl[:image] || @image
|
93
96
|
flavor = tmpl[:flavor] || @flavor
|
94
97
|
keypair = Rig.config.keypair
|
95
98
|
count.times do |i|
|
@@ -97,7 +100,7 @@ module Rig
|
|
97
100
|
chef = Rig.config.chef ? true : false
|
98
101
|
|
99
102
|
o = {
|
100
|
-
:image_id =>
|
103
|
+
:image_id => image,
|
101
104
|
:flavor_id => flavor,
|
102
105
|
:key_name => keypair,
|
103
106
|
:groups => tmpl[:groups] || template[:groups],
|
data/lib/rig/config.rb
CHANGED
data/lib/rig/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Shawn Catanzarite
|