Class: Luban::Deployment::Packages::Mysql::Installer

Inherits:
Service::Installer
  • Object
show all
Includes:
Paths
Defined in:
lib/luban/deployment/packages/mysql/installer.rb

Instance Method Summary collapse

Methods included from Paths

#admin_control_file_path, #bin_log_file_path, #bin_log_path, #control_file_name, #data_path, #error_log_file_path, #error_log_path, #general_log_file_path, #general_log_path, #innodb_log_group_home_path, #secure_file_priv_path, #slow_query_log_file_path, #slow_query_log_path, #socket_path, #ssl_ca_path, #ssl_cert_path, #ssl_key_path, #ssl_rsa_path

Instance Method Details

#installed?Boolean

Returns:

  • (Boolean)


21
22
23
24
25
# File 'lib/luban/deployment/packages/mysql/installer.rb', line 21

def installed?
  return false unless file?(mysql_executable)
  pattern = Regexp.new("mysql  Ver \.* Distrib #{Regexp.escape(package_version)}")
  match?("#{mysql_executable} --version 2>&1", pattern)
end

#package_distObject



10
# File 'lib/luban/deployment/packages/mysql/installer.rb', line 10

def package_dist; task.opts.dist; end

#package_full_nameObject



11
# File 'lib/luban/deployment/packages/mysql/installer.rb', line 11

def package_full_name; "#{super}-#{package_dist}"; end

#source_repoObject



13
14
15
# File 'lib/luban/deployment/packages/mysql/installer.rb', line 13

def source_repo
  @source_repo ||= "http://dev.mysql.com"
end

#source_url_rootObject



17
18
19
# File 'lib/luban/deployment/packages/mysql/installer.rb', line 17

def source_url_root
  @source_url_root ||= "get/Downloads/MySQL-#{package_major_version}"
end