class Luban::Deployment::Packages::Grafana::Installer
Public Instance Methods
build_path()
click to toggle source
# File lib/luban/deployment/packages/grafana/installer.rb, line 28 def build_path @build_path ||= package_tmp_path.join("grafana-#{package_version}-#{package_iter}") end
installed?()
click to toggle source
# File lib/luban/deployment/packages/grafana/installer.rb, line 22 def installed? return false unless file?(grafana_cli_executable) pattern = Regexp.new(Regexp.escape("Grafana cli version #{package_version}")) match?("#{grafana_cli_executable} --version 2>&1", pattern) end
package_dist()
click to toggle source
# File lib/luban/deployment/packages/grafana/installer.rb, line 11 def package_dist; task.opts.dist; end
package_full_name()
click to toggle source
# File lib/luban/deployment/packages/grafana/installer.rb, line 12 def package_full_name; "grafana-#{package_version}-#{package_iter}.#{package_dist}"; end
package_iter()
click to toggle source
# File lib/luban/deployment/packages/grafana/installer.rb, line 10 def package_iter; task.opts.iter; end
source_repo()
click to toggle source
# File lib/luban/deployment/packages/grafana/installer.rb, line 14 def source_repo @source_repo ||= 'https://grafanarel.s3.amazonaws.com' end
source_url_root()
click to toggle source
# File lib/luban/deployment/packages/grafana/installer.rb, line 18 def source_url_root @source_url_root ||= "builds" end
Protected Instance Methods
build_package()
click to toggle source
# File lib/luban/deployment/packages/grafana/installer.rb, line 39 def build_package info "Building #{package_full_name}" within install_path do rm('-r', '*') # Clean up install path execute(:mv, build_path.join('*'), '.', ">> #{install_log_file_path} 2>&1") end end
init()
click to toggle source
Calls superclass method
# File lib/luban/deployment/packages/grafana/installer.rb, line 34 def init super linked_dirs.push('data') end