Class: Caco::Prometheus::Install
- Inherits:
-
Trailblazer::Operation
- Object
- Trailblazer::Operation
- Caco::Prometheus::Install
- Defined in:
- lib/caco/prometheus/install.rb
Instance Method Summary collapse
Instance Method Details
#build_url(ctx, version:, root:) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/caco/prometheus/install.rb', line 9 def build_url(ctx, version:, root:, **) ctx[:url] = "https://github.com/prometheus/prometheus/releases/download/v#{version}/prometheus-#{version}.linux-amd64.tar.gz" ctx[:dest] = "#{root}/prometheus-#{version}.linux-amd64.tar.gz" ctx[:current_target] = "#{root}/prometheus-#{version}.linux-amd64" ctx[:current_link] = "#{root}/prometheus-current" ctx[:config_file_path] = "#{Settings.prometheus.config_root}/prometheus.yml" end |
#check_root(ctx) ⇒ Object
3 4 5 6 |
# File 'lib/caco/prometheus/install.rb', line 3 def check_root(ctx, **) ctx[:root] = Settings.prometheus.root FileUtils.mkdir_p(Settings.prometheus.root) end |