Module: Proxy::RemoteExecution::Ssh
- Defined in:
- lib/smart_proxy_remote_execution_ssh/version.rb,
lib/smart_proxy_remote_execution_ssh/connector.rb,
lib/smart_proxy_remote_execution_ssh/dispatcher.rb,
lib/smart_proxy_remote_execution_ssh/command_action.rb,
lib/smart_proxy_remote_execution_ssh/command_update.rb,
lib/smart_proxy_remote_execution_ssh/session.rb,
lib/smart_proxy_remote_execution_ssh/plugin.rb,
lib/smart_proxy_remote_execution_ssh/api.rb,
lib/smart_proxy_remote_execution_ssh.rb
Defined Under Namespace
Classes: Api, CommandAction, CommandUpdate, Connector, Dispatcher, Plugin, Session
Constant Summary
collapse
- VERSION =
'0.0.11'
Class Method Summary
collapse
Class Method Details
.dispatcher ⇒ Object
25
26
27
|
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 25
def dispatcher
@dispatcher || initialize
end
|
.initialize ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 6
def initialize
unless private_key_file
raise "settings for `ssh_identity_key` not set"
end
unless File.exist?(private_key_file)
raise "Ssh public key file #{private_key_file} doesn't exist.\n"\
"You can generate one with `ssh-keygen -t rsa -b 4096 -f #{private_key_file} -N ''`"
end
unless File.exist?(public_key_file)
raise "Ssh public key file #{public_key_file} doesn't exist"
end
@dispatcher = Proxy::RemoteExecution::Ssh::Dispatcher.spawn('proxy-ssh-dispatcher',
:clock => Proxy::Dynflow.instance.world.clock,
:logger => Proxy::Dynflow.instance.world.logger)
end
|
.private_key_file ⇒ Object
29
30
31
|
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 29
def private_key_file
File.expand_path(Ssh::Plugin.settings.ssh_identity_key_file)
end
|
.public_key_file ⇒ Object
33
34
35
|
# File 'lib/smart_proxy_remote_execution_ssh.rb', line 33
def public_key_file
File.expand_path("#{private_key_file}.pub")
end
|