Class: Mist

Inherits:
Thor
  • Object
show all
Defined in:
lib/mist.rb

Instance Method Summary collapse

Instance Method Details

#cheapestObject



42
43
44
# File 'lib/mist.rb', line 42

def cheapest
  # Scan for cheapest available machine (EC2 market)
end

#config(service) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/mist.rb', line 14

def config(service)
  case service
    when 'aws','AWS','Amazon Web Services'
      @config = Client.get_config

      say("MIST => Amazon Web Services EC2 Setup")
      public_key = ask("Public Key: ")
      private_key = ask("Secret Key: ")

      puts @config

      @config[:services] = {
          :aws => {
              :public_key => public_key,
              :private_key => private_key
          }
      }

      Client.set_config @config
    else
      puts "That service schema was not recognized."
  end
end

#start(machine) ⇒ Object



38
39
40
# File 'lib/mist.rb', line 38

def start(machine)
  Services.new(:boot => machine)
end