Class: Vpsb::Commands::Build

Inherits:
Object
  • Object
show all
Includes:
AskSupport
Defined in:
lib/vpsb/commands/build.rb

Instance Method Summary collapse

Methods included from AskSupport

#ask, #ask_loop, #ask_to_confirm

Constructor Details

#initialize(core) ⇒ Build

Returns a new instance of Build.



5
6
7
# File 'lib/vpsb/commands/build.rb', line 5

def initialize(core)
  @core = core
end

Instance Method Details

#execute(params) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/vpsb/commands/build.rb', line 9

def execute(params)
  web_role.call
  deploy_bags.call
  apps_bags.call
  db_postgres_role.call
  db_postgres_bags.call if core.present?(:db_postgres_json)
  es_role.call          if ask_to_confirm("Do you want configure elasticsearch")
  monit_role.call       if ask_to_confirm("Do you want configure monit(newrelic)")
  packages_bags.call    if ask_to_confirm("Do you want to install additional apt-get apps")
  node.call
end