Class: RocketFuel::Install::Run

Inherits:
Object
  • Object
show all
Includes:
Thor::Base
Defined in:
lib/rocket_fuel/install/run.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Run

Returns a new instance of Run.



10
11
12
13
# File 'lib/rocket_fuel/install/run.rb', line 10

def initialize(options = {})
  @download = RocketFuel::Install::Download.new
  @options = options
end

Instance Method Details

#runObject



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
# File 'lib/rocket_fuel/install/run.rb', line 15

def run
  say('Downloading rocket fuel recipes...')
  @download.retrieve
  say('Done.')
  say('Extracting rocket fuel recipes...')
  @download.extract
  say('Done.')
  say('Checking to see if Chef is installed...')
  chef_install = RocketFuel::Install::ChefInstall.new
  if chef_install.installed?
    say('Done')
  else
    say('Installing chef omnibus. You may be prompted for your sudo password..')
    chef_install.run
    say('Done.')
  end
  say('Running rocket fuel recipes...this may take some time')
  run = RocketFuel::Install::RecipeRun.new(options)
  say('')

  if run.run
    say("Congratuations! You're now running with RocketFuel!", :green)
  else
    say('Something went wrong.', :red)
  end
  say('Done')
end