Class: YaQueenRoleFontana::ConfigsrvProduction

Inherits:
YaQueen::Base
  • Object
show all
Defined in:
lib/ya_queen_role_fontana/configsrv_production.rb

Instance Method Summary collapse

Instance Method Details

#implement_common_taskObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ya_queen_role_fontana/configsrv_production.rb', line 9

def implement_common_task
  set :user, config['user']
  ## :deploy_to は初期値として { "/u/apps/#{application}" } が入っているので、
  ##   -s deploy_to 指定時はオプションの値、省略時は deploy_config (yaml) の値、
  ## という指定方法ができない。-s で指定する場合は -s override_deploy_to で指定することにする
  set :deploy_to,      fetch(:override_deploy_to, config['deploy_to'])

  # Configサーバ
  set :config_server_path,       fetch(:config_server_path,          config['path'])
  set :config_server_repository, fetch(:config_server_repository,    config['repository'])
  set :config_server_branch,     fetch(:config_server_branch,        config['branch'])

  super
end

#implement_each_task(host, options) ⇒ Object



24
25
26
27
28
29
# File 'lib/ya_queen_role_fontana/configsrv_production.rb', line 24

def implement_each_task(host, options)
  role :web, host
  role :app, host
  role :configsrv, host
  super
end