Class: Kitsune::Kit::Commands::SetupDoMetrics
- Inherits:
-
Thor
- Object
- Thor
- Kitsune::Kit::Commands::SetupDoMetrics
- Defined in:
- lib/kitsune/kit/commands/setup_do_metrics.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/kitsune/kit/commands/setup_do_metrics.rb', line 17 def create unless Kitsune::Kit::Defaults.metrics[:enable_do_metrics] say "⚠️ DigitalOcean Metrics Agent setup is disabled via ENABLE_DO_METRICS=false", :yellow return end = Kitsune::Kit::OptionsBuilder.build( , required: [:server_ip], defaults: Kitsune::Kit::Defaults.ssh ) with_ssh_connection() do |ssh| install_agent(ssh) end end |
#rollback ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/kitsune/kit/commands/setup_do_metrics.rb', line 35 def rollback = Kitsune::Kit::OptionsBuilder.build( , required: [:server_ip], defaults: Kitsune::Kit::Defaults.ssh ) with_ssh_connection() do |ssh| uninstall_agent(ssh) end end |