class Vpsb::Commands::Build

Attributes

core[R]

Public Class Methods

new(core) click to toggle source
# File lib/vpsb/commands/build.rb, line 5
def initialize(core)
  @core = core
end

Public Instance Methods

execute(params) click to toggle source
# 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
  ask { puts "Now everything will be installed. It should take 10-15 minutes. Click ENTER to start" }
end

Private Instance Methods

apps_bags() click to toggle source
# File lib/vpsb/commands/build.rb, line 29
def apps_bags
  Vpsb::Tasks::AppsBags.new(core)
end
db_postgres_bags() click to toggle source
# File lib/vpsb/commands/build.rb, line 41
def db_postgres_bags
  Vpsb::Tasks::DbPostgresBags.new(core)
end
db_postgres_role() click to toggle source
# File lib/vpsb/commands/build.rb, line 45
def db_postgres_role
  Vpsb::Tasks::DbPostgresRole.new(core)
end
deploy_bags() click to toggle source
# File lib/vpsb/commands/build.rb, line 33
def deploy_bags
  Vpsb::Tasks::DeployBags.new(core)
end
es_role() click to toggle source
# File lib/vpsb/commands/build.rb, line 49
def es_role
  Vpsb::Tasks::EsRole.new(core)
end
monit_role() click to toggle source
# File lib/vpsb/commands/build.rb, line 53
def monit_role
  Vpsb::Tasks::MonitRole.new(core)
end
node() click to toggle source
# File lib/vpsb/commands/build.rb, line 25
def node
  Vpsb::Tasks::Node.new(core)
end
packages_bags() click to toggle source
# File lib/vpsb/commands/build.rb, line 37
def packages_bags
  Vpsb::Tasks::PackagesBags.new(core)
end
web_role() click to toggle source
# File lib/vpsb/commands/build.rb, line 57
def web_role
  Vpsb::Tasks::WebRole.new(core)
end