Class: Nebula::Dsl::Cluster
- Inherits:
-
Object
- Object
- Nebula::Dsl::Cluster
- Defined in:
- lib/nebula/dsl.rb
Instance Attribute Summary collapse
-
#chef ⇒ Object
readonly
Returns the value of attribute chef.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
-
#provider(name) ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
- #chef_solo(&block) ⇒ Object
- #compute_node(name, &block) ⇒ Object
-
#initialize(name, &block) ⇒ Cluster
constructor
A new instance of Cluster.
Constructor Details
#initialize(name, &block) ⇒ Cluster
Returns a new instance of Cluster.
22 23 24 25 26 |
# File 'lib/nebula/dsl.rb', line 22 def initialize(name, &block) @name = name @nodes = [] instance_eval(&block) end |
Instance Attribute Details
#chef ⇒ Object (readonly)
Returns the value of attribute chef.
20 21 22 |
# File 'lib/nebula/dsl.rb', line 20 def chef @chef end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/nebula/dsl.rb', line 20 def name @name end |
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes.
20 21 22 |
# File 'lib/nebula/dsl.rb', line 20 def nodes @nodes end |
#provider(name) ⇒ Object (readonly)
Returns the value of attribute provider.
20 21 22 |
# File 'lib/nebula/dsl.rb', line 20 def provider @provider end |
Instance Method Details
#chef_solo(&block) ⇒ Object
32 33 34 |
# File 'lib/nebula/dsl.rb', line 32 def chef_solo(&block) @chef = ChefSolo.new(&block) end |
#compute_node(name, &block) ⇒ Object
36 37 38 |
# File 'lib/nebula/dsl.rb', line 36 def compute_node(name, &block) @nodes << ComputeNode.new(name, &block) end |