Class: Indocker::ServerPools::DeployServerConnection
- Inherits:
-
ServerConnection
- Object
- ServerConnection
- Indocker::ServerPools::DeployServerConnection
- Defined in:
- lib/indocker/server_pools/deploy_server_connection.rb
Instance Attribute Summary
Attributes inherited from ServerConnection
Instance Method Summary collapse
Methods inherited from ServerConnection
#busy?, #close_session, #create_session!, #exec!, #initialize, #set_busy
Constructor Details
This class inherits a constructor from Indocker::ServerPools::ServerConnection
Instance Method Details
#run_container_remotely(configuration_name:, container_name:, force_restart:) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/indocker/server_pools/deploy_server_connection.rb', line 2 def run_container_remotely(configuration_name:, container_name:, force_restart:) command_output = @logger.debug? ? "" : " > /dev/null" = @logger.debug? ? "-d" : "" = force_restart ? "-f" : "" result = exec!( "cd #{Indocker::IndockerHelper.indocker_dir} && ./bin/remote/run -C #{configuration_name} -c #{container_name} #{} #{command_output} #{}" ) Indocker::SshResultLogger .new(@logger) .log(result, "#{container_name.to_s.green} deployment for server #{server.name} failed") result end |