Class: Bcome::Node::Instance
Instance Attribute Summary
Attributes inherited from Base
#meta_data
Instance Method Summary
collapse
#bastion_ip_address, #direct_ssh_command, #do_ssh, #execute_task, #is_direct_ssh?, #is_jump_ssh?, #is_ssh_jump_host?, #keys, #nat_user, #non_bootstrapped_ssh_command, #ssh, #ssh_jump_command_to_bastion, #ssh_jump_command_to_internal_node, #ssh_key_path, #ssh_user
#direct_rsync, #direct_rsync_bootstrap, #execute_command, #get, #jump_host_rsync, #jump_host_rsync_bootstrap, #put, #rsync_is_sudo, #run
Methods inherited from Base
#initialize, #method_missing, #set_parent_reference
#run_local
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Bcome::Node::Base
Instance Method Details
#bootstrap_settings ⇒ Object
19
20
21
|
# File 'lib/nodes/instance.rb', line 19
def bootstrap_settings
@environment.bootstrap_settings
end
|
#ec2_hostname ⇒ Object
35
36
37
|
# File 'lib/nodes/instance.rb', line 35
def ec2_hostname
return "#{hostname_map}.ec2.internal"
end
|
#hostname_map ⇒ Object
31
32
33
|
# File 'lib/nodes/instance.rb', line 31
def hostname_map
return "ip-#{ip_address.to_s.gsub(".","-")}"
end
|
#identifier ⇒ Object
11
12
13
|
# File 'lib/nodes/instance.rb', line 11
def identifier
@identifier
end
|
#ip_address ⇒ Object
15
16
17
|
# File 'lib/nodes/instance.rb', line 15
def ip_address
@environment.ssh_mode_type == ::SSH_DIRECT_MODE_IDENTIFIER ? public_ip_address : @external_network_interface_address
end
|
#local_download_path ⇒ Object
47
48
49
|
# File 'lib/nodes/instance.rb', line 47
def local_download_path
"#{Dir.pwd}#{@environment.namespace}/#{identifier}"
end
|
7
8
9
|
# File 'lib/nodes/instance.rb', line 7
def machines
[self] end
|
#namespace ⇒ Object
43
44
45
|
# File 'lib/nodes/instance.rb', line 43
def namespace
"#{environment.namespace}/#{identifier}"
end
|
#proxy(bootstrap = false) ⇒ Object
23
24
25
|
# File 'lib/nodes/instance.rb', line 23
def proxy(bootstrap = false)
@environment.proxy(bootstrap)
end
|
#public_ip_address ⇒ Object
27
28
29
|
# File 'lib/nodes/instance.rb', line 27
def public_ip_address
@public_ip_address
end
|
39
40
41
|
# File 'lib/nodes/instance.rb', line 39
def role
@role
end
|