Class: Bosh::Stemcell::StemcellBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/stemcell/stemcell_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(dependencies = {}) ⇒ StemcellBuilder

Returns a new instance of StemcellBuilder.



3
4
5
6
7
8
# File 'lib/bosh/stemcell/stemcell_builder.rb', line 3

def initialize(dependencies = {})
  @gem_components = dependencies.fetch(:gem_components)
  @environment = dependencies.fetch(:environment)
  @collection = dependencies.fetch(:collection)
  @runner = dependencies.fetch(:runner)
end

Instance Method Details

#buildObject



10
11
12
13
14
15
16
17
# File 'lib/bosh/stemcell/stemcell_builder.rb', line 10

def build
  gem_components.build_release_gems
  environment.prepare_build
  stemcell_stages = collection.extract_operating_system_stages +
    collection.agent_stages +
    collection.infrastructure_stages
  runner.configure_and_apply(stemcell_stages)
end