Class: Bosh::Bootstrap::Stages::StagePrepareInceptionVm
- Inherits:
-
Object
- Object
- Bosh::Bootstrap::Stages::StagePrepareInceptionVm
- Defined in:
- lib/bosh-bootstrap/stages/stage_prepare_inception_vm.rb
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
- #commands ⇒ Object
-
#initialize(settings) ⇒ StagePrepareInceptionVm
constructor
A new instance of StagePrepareInceptionVm.
Constructor Details
#initialize(settings) ⇒ StagePrepareInceptionVm
Returns a new instance of StagePrepareInceptionVm.
5 6 7 |
# File 'lib/bosh-bootstrap/stages/stage_prepare_inception_vm.rb', line 5 def initialize(settings) @settings = settings end |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
3 4 5 |
# File 'lib/bosh-bootstrap/stages/stage_prepare_inception_vm.rb', line 3 def settings @settings end |
Instance Method Details
#commands ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bosh-bootstrap/stages/stage_prepare_inception_vm.rb', line 9 def commands @commands ||= Bosh::Bootstrap::Commander::Commands.new do |server| # using inception VM username login, create a vcap user with same authorizations server.create "vcap user", script("create_vcap_user", "ORIGUSER" => settings.inception.username), ssh_username: settings.inception.username, run_as_root: true # install base Ubuntu packages used for bosh micro deployer server.install "base packages", script("install_base_packages"), run_as_root: true server.configure "git", script("configure_git", "GIT_USER_NAME" => settings["git"]["name"], "GIT_USER_EMAIL" => settings["git"]["email"]) server.install "ruby 1.9.3", script("install_ruby", "UPGRADE" => settings[:upgrade_deps]), run_as_root: true server.install "useful ruby gems", script("install_useful_gems", "UPGRADE" => settings[:upgrade_deps]), run_as_root: true server.install "hub", script("install_hub"), run_as_root: true server.upload_file "/var/vcap/store/inception/Gemfile", gemfile server.install "bosh", script("install_bosh") server.validate "bosh deployer", script("validate_bosh_deployer") end end |