Class: VagrantPlugins::VagrantBosh::Provisioner

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-bosh/provisioner.rb

Instance Method Summary collapse

Constructor Details

#initialize(machine, config) ⇒ Provisioner

Returns a new instance of Provisioner.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/vagrant-bosh/provisioner.rb', line 14

def initialize(machine, config)
  super

  machine_ui = Ui.for_machine(machine)

  communicator = Communicator.new(machine, machine_ui)

  asset_uploader = AssetUploader.new(
    communicator,
    File.absolute_path("../../../bosh-provisioner/assets", __FILE__),
    machine_ui,
  )

  provisioner_tracker = ProvisionerTracker.new(machine_ui)

  release_uploader = Deployment::ReleaseUploader.new(
    machine, 
    machine_ui,
  )

  uploadable_release_factory = Deployment::UploadableReleaseFactory.new(
    config.synced_releases_dir,
    release_uploader,
    config.create_release_cmd,
    machine_ui,
  )

  manifest_factory = Deployment::ManifestFactory.new(
    uploadable_release_factory,
    machine_ui,
  )

  @bootstrapper = Bootstrapper.new(
    communicator, 
    config, 
    asset_uploader, 
    provisioner_tracker,
    manifest_factory, 
  )

  logger = Log4r::Logger.new("vagrant::provisioners::bosh")
end

Instance Method Details

#configure(root_config) ⇒ Object



57
58
59
# File 'lib/vagrant-bosh/provisioner.rb', line 57

def configure(root_config)
  # Nothing to modify or save of config
end

#provisionObject



61
62
63
# File 'lib/vagrant-bosh/provisioner.rb', line 61

def provision
  @bootstrapper.bootstrap
end