Class: Nebula::Dsl::Cluster

Inherits:
Object
  • Object
show all
Defined in:
lib/nebula/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#chefObject (readonly)

Returns the value of attribute chef.



20
21
22
# File 'lib/nebula/dsl.rb', line 20

def chef
  @chef
end

#nameObject (readonly)

Returns the value of attribute name.



20
21
22
# File 'lib/nebula/dsl.rb', line 20

def name
  @name
end

#nodesObject (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