class
Util::SSH
- Util::SSH
- Reference
- Object
Included Modules
Defined in:
util/ssh.crConstant Summary
-
DEFAULT_COMMAND_TIMEOUT =
30
-
Default SSH command timeout in seconds
-
DEFAULT_CONNECT_TIMEOUT =
15
-
Default SSH connection timeout in seconds
-
DEFAULT_MAX_ATTEMPTS =
20
-
Default number of retry attempts
-
DEFAULT_RETRY_DELAY =
5
-
Default delay between retries in seconds
Constructors
Class Method Summary
Instance Method Summary
- #private_ssh_key_path : String
- #public_ssh_key_path : String
-
#run(instance, port, command, use_ssh_agent, print_output = true, disable_log_prefix = false, capture_output = false)
Run a command on a remote instance via SSH
-
#wait_for_instance(instance, port, use_ssh_agent, test_command, expected_result, max_attempts : Int32 = DEFAULT_MAX_ATTEMPTS, retry_delay : Time::Span = DEFAULT_RETRY_DELAY.seconds)
Wait for an instance to be ready by repeatedly running a test command until it returns the expected result
Instance methods inherited from module Util::Shell
run_shell_command(command : String, kubeconfig_path : String, hetzner_token : String, error_message : String = "", abort_on_error : Bool = true, log_prefix : String = "", print_output : Bool = true) : CommandResult
run_shell_command
Instance methods inherited from module Util
default_log_prefix
default_log_prefix,
log_line(line, log_prefix = "")
log_line,
which(command)
which
Class methods inherited from module Util
which(command)
which
Constructor Detail
Class Method Detail
Instance Method Detail
def run(instance, port, command, use_ssh_agent, print_output = true, disable_log_prefix = false, capture_output = false)
#
Run a command on a remote instance via SSH
def wait_for_instance(instance, port, use_ssh_agent, test_command, expected_result, max_attempts : Int32 = DEFAULT_MAX_ATTEMPTS, retry_delay : Time::Span = DEFAULT_RETRY_DELAY.seconds)
#
Wait for an instance to be ready by repeatedly running a test command until it returns the expected result