Module: VirtualMonkey::ApplicationFrontend

Includes:
Application, Frontend, UnifiedApplication
Included in:
FeAppRunner, PhpAioTrialChefRunner, PhpChefRunner, RailsAioDeveloperChefRunner
Defined in:
lib/virtualmonkey/application_frontend.rb

Instance Method Summary collapse

Methods included from UnifiedApplication

#run_unified_application_check, #run_unified_application_checks, #test_http_response

Methods included from Frontend

#cross_connect_frontends, #fe_servers, #frontend_checks, #get_lb_hostname_input, #lookup_scripts, #run_fe_tests, #startup

Methods included from Application

#app_servers, #get_tester_ip_addr, #lookup_scripts, #run_app_tests, #run_rails_demo_application_checks, #set_lb_hostname, #startup, #test_http_response

Instance Method Details

#log_rotation_checksObject



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/virtualmonkey/application_frontend.rb', line 28

def log_rotation_checks
  # this works for php, TODO: rails
  #app_servers.each do |server|
  #  force_log_rotation(server)
  #  log_check(server,"/mnt/log/#{server.apache_str}/access.log.1")
  #end

  fe_servers.each do |server|
    behavior(:force_log_rotation, server)
    behavior(:log_check, server, "/mnt/log/#{server.apache_str}/haproxy.log.1")
  end
end

#run_reboot_checksObject



23
24
25
26
# File 'lib/virtualmonkey/application_frontend.rb', line 23

def run_reboot_checks
  behavior(:run_unified_application_checks, fe_servers, 80)
  behavior(:run_unified_application_checks, app_servers)
end

#run_reboot_operationsObject



18
19
20
21
# File 'lib/virtualmonkey/application_frontend.rb', line 18

def run_reboot_operations
  behavior(:reboot_all, true)
  behavior(:run_reboot_checks)
end

#startup_sequenceObject

a custom startup sequence is required for fe/app deployments (inputs workaround)



8
9
10
11
12
13
14
15
16
# File 'lib/virtualmonkey/application_frontend.rb', line 8

def startup_sequence
  fe_servers.each { |s| s.start }
  fe_servers.each { |s| s.wait_for_operational_with_dns }
  
  set_lb_hostname

  app_servers.each { |s| s.start }
  app_servers.each { |s| s.wait_for_operational_with_dns }
end