Class: MintPress::Aws::Lightsail::Instance
- Inherits:
-
Infrastructure::Host
- Object
- Infrastructure::Host
- MintPress::Aws::Lightsail::Instance
- Includes:
- MintLogger, AwsCommon, Mixins::Properties
- Defined in:
- src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb
Properties (Read/Write)
-
#connect_address (Default Value: Proc.new {
break nil if self.id.nil? or !self.id.start_with?('i-')
self.harvest(with_children: false) if public_ip_address.nil? and private_ip_address.nil?
break nil if public_ip_address.nil? and private_ip_address.nil?
wait_for_connectable([self.public_ip_address, self.private_ip_address], 22, oneshot: true)
})
Property Attributes- default ⇒ Proc.new { break nil if self.id.nil? or !self.id.start_with?('i-') self.harvest(with_children: false) if public_ip_address.nil? and private_ip_address.nil? break nil if public_ip_address.nil? and private_ip_address.nil? wait_for_connectable([self.public_ip_address, self.private_ip_address], 22, oneshot: true) }
35 36 37 38 39 40
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 35 property :connect_address, default: Proc.new { break nil if self.id.nil? or !self.id.start_with?('i-') self.harvest(with_children: false) if public_ip_address.nil? and private_ip_address.nil? break nil if public_ip_address.nil? and private_ip_address.nil? wait_for_connectable([self.public_ip_address, self.private_ip_address], 22, oneshot: true) }
-
#connect_user (Default Value: 'ec2-user')
Property Attributes- default ⇒ 'ec2-user'
41
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 41 property :connect_user, default: 'ec2-user'
-
#admin_connect_user (Default Value: 'ec2-user')
Property Attributes- default ⇒ 'ec2-user'
42
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 42 property :admin_connect_user, default: 'ec2-user'
-
#instance_names ⇒ Array of ⇒ [String]
'The names to use for your new Lightsail instances. Separate multiple values using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"]'
Property Attributes- create_instances_prop ⇒ 'instance_names'
- read_only ⇒ false
- source ⇒ "create_instances"
43 44 45
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 43 property :instance_names, create_instances_prop: 'instance_names', type: [String], array: true, read_only: false, source: "create_instances", description: 'The names to use for your new Lightsail instances. Separate multiple values using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"]'
-
#availability_zone ⇒ [String]
'The Availability Zone in which to create your instance. Use the following format: us-east-2a (case sensitive). You can get a list of Availability Zones by using the get regions operation. Be sure to add the include Availability Zones parameter to your request.'
Property Attributes- create_instances_prop ⇒ 'availability_zone'
- read_only ⇒ false
- source ⇒ "create_instances"
46 47 48 49
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 46 property :availability_zone, create_instances_prop: 'availability_zone', type: [String], read_only: false, source: "create_instances", description: 'The Availability Zone in which to create your instance. Use the following format: us-east-2a (case sensitive). You can get a list of Availability Zones by using the get regions operation. Be sure to add the include Availability Zones parameter to your request.'
-
#custom_image_name ⇒ [String]
'The name for your custom image. In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated.'
Property Attributes- create_instances_prop ⇒ 'custom_image_name'
- read_only ⇒ false
- source ⇒ "create_instances"
50 51 52 53
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 50 property :custom_image_name, create_instances_prop: 'custom_image_name', type: [String], read_only: false, source: "create_instances", description: 'The name for your custom image. In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated.'
-
#user_data ⇒ [String]
'A launch script you can create that configures a server with additional user data. For example, you might want to run apt-get -y update. Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.'
Property Attributes- create_instances_prop ⇒ 'user_data'
- read_only ⇒ false
- source ⇒ "create_instances"
54 55 56 57 58 59 60 61
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 54 property :user_data, create_instances_prop: 'user_data', type: [String], read_only: false, source: "create_instances", description: 'A launch script you can create that configures a server with additional user data. For example, you might want to run apt-get -y update. Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.'
-
#key_pair_name ⇒ [String]
'The name of your key pair.'
Property Attributes- create_instances_prop ⇒ 'key_pair_name'
- read_only ⇒ false
- source ⇒ "create_instances"
62
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 62 property :key_pair_name, create_instances_prop: 'key_pair_name', type: [String], read_only: false, source: "create_instances", description: 'The name of your key pair.'
-
#tags ⇒ Hash of ⇒ [MintPress::Aws::Lightsail::Tag]
'The tag keys and optional values for the resource.'
Property Attributes- create_instances_prop ⇒ 'tags'
- disposition ⇒ :attribute
- read_only ⇒ false
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'tags'
63
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 63 property :tags, create_instances_prop: 'tags', type: [MintPress::Aws::Lightsail::Tag], array: false, disposition: :attribute, read_only: false, source: "MintPress::Aws::Lightsail::Instance", description: 'The tag keys and optional values for the resource.', orig_name: 'tags', hash: true
-
#add_ons ⇒ Hash of ⇒ [MintPress::Aws::Lightsail::AddOn]
'An array of objects representing the add-ons enabled on the instance.'
Property Attributes- create_instances_prop ⇒ 'add_ons'
- disposition ⇒ :attribute
- read_only ⇒ false
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'add_ons'
64
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 64 property :add_ons, create_instances_prop: 'add_ons', type: [MintPress::Aws::Lightsail::AddOn], array: false, disposition: :attribute, read_only: false, source: "MintPress::Aws::Lightsail::Instance", description: 'An array of objects representing the add-ons enabled on the instance.', orig_name: 'add_ons', hash: true
-
#instance_name ⇒ [String]
'The name of the instance (a virtual private server) to stop.'
Property Attributes- delete_instance_prop ⇒ 'instance_name'
- read_only ⇒ false
- source ⇒ "stop_instance"
- get_instance_prop ⇒ 'instance_name'
- start_instance_prop ⇒ 'instance_name'
- stop_instance_prop ⇒ 'instance_name'
65
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 65 property :instance_name, delete_instance_prop: 'instance_name', type: [String], read_only: false, source: "stop_instance", description: 'The name of the instance (a virtual private server) to stop.', get_instance_prop: 'instance_name', start_instance_prop: 'instance_name', stop_instance_prop: 'instance_name'
-
#force_delete_add_ons ⇒ [TrueClass,FalseClass]
'A Boolean value to indicate whether to delete the enabled add-ons for the disk.'
Property Attributes- delete_instance_prop ⇒ 'force_delete_add_ons'
- read_only ⇒ false
- source ⇒ "delete_instance"
66 67
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 66 property :force_delete_add_ons, delete_instance_prop: 'force_delete_add_ons', type: [TrueClass,FalseClass], read_only: false, source: "delete_instance", description: 'A Boolean value to indicate whether to delete the enabled add-ons for the disk.'
-
#arn ⇒ [String]
'The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE).'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'arn'
68
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 68 property :arn, disposition: :attribute, description: 'The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE).', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'arn', type: [String]
-
#blueprint_name ⇒ [String]
'The friendly name of the blueprint (e.g., Amazon Linux).'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'blueprint_name'
69
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 69 property :blueprint_name, disposition: :attribute, description: 'The friendly name of the blueprint (e.g., Amazon Linux).', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'blueprint_name', type: [String]
-
#created_at ⇒ [Time]
'The timestamp when the instance was created (e.g., 1479734909.17) in Unix time format.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'created_at'
70
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 70 property :created_at, disposition: :attribute, description: 'The timestamp when the instance was created (e.g., 1479734909.17) in Unix time format.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'created_at', type: [Time]
-
#hardware ⇒ [MintPress::Aws::Lightsail::InstanceHardware] (Default Value: MintPress::Aws::Lightsail::InstanceHardware.new)
'The size of the vCPU and the amount of RAM for the instance.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'hardware'
- default ⇒ MintPress::Aws::Lightsail::InstanceHardware.new
71
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 71 property :hardware, disposition: :attribute, description: 'The size of the vCPU and the amount of RAM for the instance.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'hardware', type: [MintPress::Aws::Lightsail::InstanceHardware], default: MintPress::Aws::Lightsail::InstanceHardware.new
-
#ipv6_address ⇒ [String]
'The IPv6 address of the instance.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'ipv6_address'
72
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 72 property :ipv6_address, disposition: :attribute, description: 'The IPv6 address of the instance.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'ipv6_address', type: [String]
-
#is_static_ip ⇒ [TrueClass,FalseClass]
'A Boolean value indicating whether this instance has a static IP assigned to it.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'is_static_ip'
73
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 73 property :is_static_ip, disposition: :attribute, description: 'A Boolean value indicating whether this instance has a static IP assigned to it.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'is_static_ip', type: [TrueClass,FalseClass]
-
#location ⇒ [MintPress::Aws::Lightsail::ResourceLocation] (Default Value: MintPress::Aws::Lightsail::ResourceLocation.new)
'The region name and Availability Zone where the instance is located.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'location'
- default ⇒ MintPress::Aws::Lightsail::ResourceLocation.new
74
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 74 property :location, disposition: :attribute, description: 'The region name and Availability Zone where the instance is located.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'location', type: [MintPress::Aws::Lightsail::ResourceLocation], default: MintPress::Aws::Lightsail::ResourceLocation.new
-
#name ⇒ [String]
'The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1).'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'name'
75
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 75 property :name, disposition: :attribute, description: 'The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1).', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'name', type: [String]
-
#networking ⇒ [MintPress::Aws::Lightsail::InstanceNetworking] (Default Value: MintPress::Aws::Lightsail::InstanceNetworking.new)
'Information about the public ports and monthly data transfer rates for the instance.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'networking'
- default ⇒ MintPress::Aws::Lightsail::InstanceNetworking.new
76
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 76 property :networking, disposition: :attribute, description: 'Information about the public ports and monthly data transfer rates for the instance.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'networking', type: [MintPress::Aws::Lightsail::InstanceNetworking], default: MintPress::Aws::Lightsail::InstanceNetworking.new
-
#private_ip_address ⇒ [String]
'The private IP address of the instance.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'private_ip_address'
77
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 77 property :private_ip_address, disposition: :attribute, description: 'The private IP address of the instance.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'private_ip_address', type: [String]
-
#public_ip_address ⇒ [String]
'The public IP address of the instance.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'public_ip_address'
78
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 78 property :public_ip_address, disposition: :attribute, description: 'The public IP address of the instance.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'public_ip_address', type: [String]
-
#resource_type ⇒ [String]
'The type of resource (usually Instance).'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'resource_type'
79
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 79 property :resource_type, disposition: :attribute, description: 'The type of resource (usually Instance).', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'resource_type', type: [String]
-
#ssh_key_name ⇒ [String]
'The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair).'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'ssh_key_name'
80
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 80 property :ssh_key_name, disposition: :attribute, description: 'The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair).', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'ssh_key_name', type: [String]
-
#state ⇒ [MintPress::Aws::Lightsail::InstanceState] (Default Value: MintPress::Aws::Lightsail::InstanceState.new)
'The status code and the state (e.g., running) for the instance.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'state'
- default ⇒ MintPress::Aws::Lightsail::InstanceState.new
81
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 81 property :state, disposition: :attribute, description: 'The status code and the state (e.g., running) for the instance.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'state', type: [MintPress::Aws::Lightsail::InstanceState], default: MintPress::Aws::Lightsail::InstanceState.new
-
#support_code ⇒ [String]
'The support code.'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'support_code'
82
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 82 property :support_code, disposition: :attribute, description: 'The support code.', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'support_code', type: [String]
-
#username ⇒ [String]
'The user name for connecting to the instance (e.g., ec2-user).'
Property Attributes- disposition ⇒ :attribute
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'username'
83
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 83 property :username, disposition: :attribute, description: 'The user name for connecting to the instance (e.g., ec2-user).', source: "MintPress::Aws::Lightsail::Instance", orig_name: 'username', type: [String]
-
#page_token ⇒ [String]
'The token to advance to the next page of results from your request. To get a page token, perform an initial GetInstances request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.'
Property Attributes- get_instances_prop ⇒ 'page_token'
- read_only ⇒ false
- source ⇒ "get_instances"
84 85 86 87 88
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 84 property :page_token, get_instances_prop: 'page_token', type: [String], read_only: false, source: "get_instances", description: 'The token to advance to the next page of results from your request. To get a page token, perform an initial GetInstances request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.'
-
#force ⇒ [TrueClass,FalseClass]
'When set to True, forces a Lightsail instance that is stuck in a stopping state to stop. Only use the force parameter if your instance is stuck in the stopping state. In any other state, your instance should stop normally without adding this parameter to your API request.'
Property Attributes- stop_instance_prop ⇒ 'force'
- read_only ⇒ false
- source ⇒ "stop_instance"
89 90 91 92 93 94
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 89 property :force, stop_instance_prop: 'force', type: [TrueClass,FalseClass], read_only: false, source: "stop_instance", description: 'When set to True, forces a Lightsail instance that is stuck in a stopping state to stop. Only use the force parameter if your instance is stuck in the stopping state. In any other state, your instance should stop normally without adding this parameter to your API request.'
-
#blueprint ⇒ [MintPress::Aws::Lightsail::Blueprint]
'The blueprint ID (e.g., os_amlinux_2016_03).'
Property Attributes- create_instances_prop ⇒ 'blueprint_id'
- disposition ⇒ :attribute
- read_only ⇒ false
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'blueprint_id'
- from ⇒ String
95
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 95 property :blueprint, create_instances_prop: 'blueprint_id', type: [MintPress::Aws::Lightsail::Blueprint], disposition: :attribute, read_only: false, source: "MintPress::Aws::Lightsail::Instance", description: 'The blueprint ID (e.g., os_amlinux_2016_03).', orig_name: 'blueprint_id', from: String
-
#bundle ⇒ [MintPress::Aws::Lightsail::Bundle]
'The bundle for the instance (e.g., micro_1_0).'
Property Attributes- create_instances_prop ⇒ 'bundle_id'
- disposition ⇒ :attribute
- read_only ⇒ false
- source ⇒ "MintPress::Aws::Lightsail::Instance"
- orig_name ⇒ 'bundle_id'
- from ⇒ String
96
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 96 property :bundle, create_instances_prop: 'bundle_id', type: [MintPress::Aws::Lightsail::Bundle], disposition: :attribute, read_only: false, source: "MintPress::Aws::Lightsail::Instance", description: 'The bundle for the instance (e.g., micro_1_0).', orig_name: 'bundle_id', from: String
-
#region ⇒ String
Region _specifically for this object_. If you're not doing different objects in different regions, you should not set this, but rather set the region on your AwsPlatformProvider instead
Property Attributes100
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 100 property :region, type: String
-
#platform ⇒ MintPress::InfrastructureAws::AwsPlatform (Default Value: MintPress::InfrastructureAws::AwsPlatform.new)
The platform details, including credentials - normally this will come via AwsPlatformProvider (see the Infrastructure Providers section of the documentation)
Property Attributes- default ⇒ MintPress::InfrastructureAws::AwsPlatform.new
103
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/generated/lightsail/instance.rb', line 103 property :platform, type: MintPress::InfrastructureAws::AwsPlatform, default: MintPress::InfrastructureAws::AwsPlatform.new
-
#name ⇒ String
The name of this resource
Property Attributes37
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 37 property :name, type: String
-
#hostname ⇒ String (Default Value: Proc.new { r = self.name.split('.')[0] ; r = nil if r == ''; r })
The hostname of the box _without_ the DNS domain name - note that individual network interfaces can have different hostnames!
Property Attributes- default ⇒ Proc.new { r = self.name.split('.')[0] ; r = nil if r == ''; r }
40
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 40 property :hostname, type: String, default: Proc.new { r = self.name.split('.')[0] ; r = nil if r == ''; r }
-
#dns_domain ⇒ String (Default Value: Proc.new { r = self.name.split('.')[1..-1].join('.') ; r = nil if r == '.' ; r })
Just the DNS domain name of the box - again, individual network interfaces _can_ override this!
Property Attributes- default ⇒ Proc.new { r = self.name.split('.')[1..-1].join('.') ; r = nil if r == '.' ; r }
42
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 42 property :dns_domain, type: String, default: Proc.new { r = self.name.split('.')[1..-1].join('.') ; r = nil if r == '.' ; r }
-
#max_connections ⇒ Integer
How many connections, at most, do we allow to this host?
Property Attributes49
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 49 property :max_connections, type: Integer
-
#max_connections_per_second ⇒ Float
How many connections per second, at most, do we allow to this host? This internally defaults to 1.0
Property Attributes52
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 52 property :max_connections_per_second, type: Float
-
#affinity_group ⇒ String (Default Value: Proc.new{self.hostname.gsub(/[0-9]/,'').split('.')[0].split('-')[0]})
Create, by default, an affinity group with no number - note that some infra types don't support named affinity groups, and so this won't work in those cases, and it will always use the node ID in that case
Property Attributes- default ⇒ Proc.new{self.hostname.gsub(/[0-9]/,'').split('.')[0].split('-')[0]}
56
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 56 property :affinity_group, type: String, default: Proc.new{self.hostname.gsub(/[0-9]/,'').split('.')[0].split('-')[0]}
-
#strict_anti_affinity ⇒ [TrueClass, FalseClass] (Default Value: false)
Do we strictly enforce anti-affinity, or is it just advisory. Note that if you don't have enough nodes or availability zones to seperate all of your resources, setting this to true _will_ result in failures!
Property Attributes- default ⇒ false
60
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 60 property :strict_anti_affinity, type: [TrueClass, FalseClass], default: false
-
#host_number ⇒ Integer (Default Value: Proc.new { self.hostname.split('.')[0].split('-')[0].tr("^0-9",'').to_i })
The numeric ID of this host within an affinity group - this is derived, by default, from the host number. Implementations that have "full" access to the system should convert this back to their own set, so things can be enforced...
Property Attributes- default ⇒ Proc.new { self.hostname.split('.')[0].split('-')[0].tr("^0-9",'').to_i }
63
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 63 property :host_number, type: Integer, default: Proc.new { self.hostname.split('.')[0].split('-')[0].tr("^0-9",'').to_i }
-
#connect_address ⇒ String (Default Value: Proc.new { self.fqdn })
This one should be overridden by children - usually we'll get a useful IP from our provider. Failing that, potentially it should come from network_interfaces if they exist! This might be replaced by an action function at some point, though it'll always be through a prop so that it's overridable
Property Attributes- default ⇒ Proc.new { self.fqdn }
68
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 68 property :connect_address, type: String, default: Proc.new { self.fqdn }
-
#mounts ⇒ Hash of ⇒ MintPress::Infrastructure::MountPoint
Shares such as NasShare/CifsShare are children of this, so we don't have to repeat ourselves!
Property Attributes71
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 71 property :mounts, type: MintPress::Infrastructure::MountPoint, hash: true
-
#network_interfaces ⇒ Hash of ⇒ MintPress::Infrastructure::NetworkInterface
Network interfaces to be attached to this host
Property Attributes74
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 74 property :network_interfaces, type: MintPress::Infrastructure::NetworkInterface, hash: true
-
#interfaces ⇒ Hash of ⇒ MintPress::Infrastructure::HostInterface
"The list of interfaces on the host."
Property Attributes77
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 77 property :interfaces, type: MintPress::Infrastructure::HostInterface, hash: true, description: "The list of interfaces on the host."
-
#block_devices ⇒ Hash of ⇒ MintPress::Infrastructure::BlockDevice
Which block devcies should be attached to this virtual machine. Block devices are generally either attached disks, FC luns, or iscsi
Property Attributes- canonical ⇒ true
80
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 80 property :block_devices, type: MintPress::Infrastructure::BlockDevice, hash: true, canonical: true
-
#nas_shares ⇒ Hash of ⇒ MintPress::Infrastructure::NasShare
Which NAS shares should be attached to this system? NAS shares can be either NFS or CIFS shares
Property Attributes- canonical ⇒ true
82
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 82 property :nas_shares, type: MintPress::Infrastructure::NasShare, hash: true, canonical: true
-
#admin_connect_user ⇒ String
Which user should be used to connect as an administrive user. Different providers will default this differnetly - for example, ec2-user for AWS.
Property Attributes85
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 85 property :admin_connect_user, type: String
-
#admin_final_user ⇒ String
The final user for admin will almost always be root, but you _could_ change it for a particularly weird environment
Property Attributes87
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 87 property :admin_final_user, type: String
-
#admin_keys ⇒ Array of ⇒ String (Default Value: Proc.new { self.keys })
SSH keys for connecting as an administrative user (these have an in-code default of [ "~/.ssh/id_rsa","~/.ssh/id_dsa" ])
Property Attributes- default ⇒ Proc.new { self.keys }
90
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 90 property :admin_keys, type: String, array: true, default: Proc.new { self.keys }
-
#admin_password ⇒ String
Password for connecting as an administrtive user
Property Attributes92
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 92 property :admin_password, type: String
-
#admin_key_data ⇒ String (Default Value: Proc.new { self.key_data })
SSH key data (ie the actual contents of the key file) as an administrative user
Property Attributes- default ⇒ Proc.new { self.key_data }
94
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 94 property :admin_key_data, type: String, default: Proc.new { self.key_data }
-
#environment_variables ⇒ Hash of ⇒ String
Environment variables to set on the unprivleged transport
Property Attributes97
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 97 property :environment_variables, type: String, hash: true
-
#admin_environment_variables ⇒ Hash of ⇒ String
Environment variables to set on the privleged transport
Property Attributes100
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 100 property :admin_environment_variables, type: String, hash: true
-
#never_transform ⇒ [TrueClass, FalseClass] (Default Value: false)
Disable using the connection proxy server? This can be required on certain systems that don't support our ruby, such as EL5 systems, but generally should be avoided
Property Attributes- default ⇒ false
104
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 104 property :never_transform, type: [TrueClass, FalseClass], default: false
-
#os_family ⇒ String (Default Value: Proc.new { self.detect_os_family })
Some details about the OS
Property Attributes- default ⇒ Proc.new { self.detect_os_family }
107
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 107 property :os_family, type: String, default: Proc.new { self.detect_os_family }
-
#os_release ⇒ Hash (Default Value: Proc.new { self.detect_os_release })
Some details about the OS Release
Property Attributes- default ⇒ Proc.new { self.detect_os_release }
110
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 110 property :os_release, type: Hash, default: Proc.new { self.detect_os_release }
-
#os_arch ⇒ String (Default Value: Proc.new { self.detect_os_arch })
Some details about the OS Architecture
Property Attributes- default ⇒ Proc.new { self.detect_os_arch }
113
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 113 property :os_arch, type: String, default: Proc.new { self.detect_os_arch }
-
#os_cpu_count ⇒ Integer (Default Value: Proc.new { self.detect_os_cpu_count })
Some details about the OS CPU Count
Property Attributes- default ⇒ Proc.new { self.detect_os_cpu_count }
116
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 116 property :os_cpu_count, type: Integer, default: Proc.new { self.detect_os_cpu_count }
-
#os_memory_total ⇒ Integer (Default Value: Proc.new { self.detect_os_memory_total })
Some details about the OS Memory Total
Property Attributes- default ⇒ Proc.new { self.detect_os_memory_total }
119
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 119 property :os_memory_total, type: Integer, default: Proc.new { self.detect_os_memory_total }
-
#os_swap_total ⇒ Integer (Default Value: Proc.new { self.detect_os_swap_total })
Some details about the OS Swap Total
Property Attributes- default ⇒ Proc.new { self.detect_os_swap_total }
122
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 122 property :os_swap_total, type: Integer, default: Proc.new { self.detect_os_swap_total }
-
#connect_user ⇒ String
Which user should be used to connect as an ordinary user. Different providers will default this differnetly - for example, ec2-user for AWS.
Property Attributes125
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 125 property :connect_user, type: String
-
#final_user ⇒ String
Which user should we finally end up as, either by being the same as connect_user, or via sudo/su. It is possible to leave both this and connect user black, in which case you will have a host which is not contactable via SSH, but can still be contacted via an external means (docker transport, for example, does not require a user)
Property Attributes129
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 129 property :final_user, type: String
-
#keys ⇒ Array of ⇒ String
SSH keys to connect (these have an in-code default of [ "~/.ssh/id_rsa","~/.ssh/id_dsa" ])
Property Attributes131
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 131 property :keys, type: String, array: true
-
#password ⇒ String
Password to use to authenticate the user
Property Attributes133
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 133 property :password, type: String
-
#key_data ⇒ String
SSH key data (ie the actual contents of the key file)
Property Attributes135
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 135 property :key_data, type: String
-
#protocol ⇒ String (Default Value: Proc.new { r=nil
if self.name.to_s == 'local'
r='local'
else
r='ssh'
end
r })
These would generally be overriden by children as well - sensible options are 'ssh','winrm','httprpc','docker', and 'local'.
Property Attributes- default ⇒ Proc.new { r=nil if self.name.to_s == 'local' r='local' else r='ssh' end r }
139 140 141 142 143 144 145
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 139 property :protocol, type: String, default: Proc.new { r=nil if self.name.to_s == 'local' r='local' else r='ssh' end r }
-
#user_switch_type ⇒ String
Which user switch type should be used - the options for this depend on your protocol, however usually "sudo", "su", and "direct" are the sensible options. Generally this will default to something sane.
Property Attributes148
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 148 property :user_switch_type, type: String
-
#connect_port ⇒ Integer
The port on which to connect - default is 22 for ssh, and 443 for HTTP/RPC, and nil for local
Property Attributes150
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 150 property :connect_port, type: Integer
-
#jump_host ⇒ MintPress::Infrastructure::Host
What jump box is required to access this? This will be used via add_hop in las-rpc-utils
Property Attributes153
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 153 property :jump_host, type: MintPress::Infrastructure::Host
-
#temp_folder ⇒ String (Default Value: Proc.new { self.guess_tmp_folder })
a temporary folder on the remote system. If this is nil, it'll try and work one out
Property Attributes- default ⇒ Proc.new { self.guess_tmp_folder }
- cached_proc ⇒ true
156
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 156 property :temp_folder, type: String, default: Proc.new { self.guess_tmp_folder }, cached_proc: true
-
#factory ⇒ MintPress::Infrastructure::TransportFactory (Default Value: Proc.new {
$mintpress_transport_factory = MintPress::Infrastructure::TransportFactory.new if $mintpress_transport_factory.nil?
$mintpress_transport_factory
})
Use a non-default transport factory (See the TransportFactory resource for details)
Property Attributes- default ⇒ Proc.new { $mintpress_transport_factory = MintPress::Infrastructure::TransportFactory.new if $mintpress_transport_factory.nil? $mintpress_transport_factory }
159 160 161 162
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 159 property :factory, type: MintPress::Infrastructure::TransportFactory, default: Proc.new { $mintpress_transport_factory = MintPress::Infrastructure::TransportFactory.new if $mintpress_transport_factory.nil? $mintpress_transport_factory }
-
#bootstrapper ⇒ Array of ⇒ MintPress::Infrastructure::Bootstrapper (Default Value: MintPress::Infrastructure::Bootstrapper.new(host: self))
Which bootstrap provider to use for creating new hosts
Property Attributes- default ⇒ MintPress::Infrastructure::Bootstrapper.new(host: self)
- canonical ⇒ true
165
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 165 property :bootstrapper, type: MintPress::Infrastructure::Bootstrapper, default: MintPress::Infrastructure::Bootstrapper.new(host: self), canonical: true, array: true
-
#always_use_mintpress_bootstrap ⇒ [TrueClass, FalseClass] (Default Value: true)
Should we always use the mintpress internal bootstrap provider, even when anotehr is seperately specified? This defaults to 'true', since usually you need things like disks formatted and so forth before calling out to a chef, puppet, ansible, or salt - but if your provider does handle everything you need, you are free to disable this.
Property Attributes- default ⇒ true
169
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 169 property :always_use_mintpress_bootstrap, type: [TrueClass, FalseClass], default: true
-
#bootstrap_with_dns ⇒ [TrueClass, FalseClass] (Default Value: false)
Should we create DNS entries?
Property Attributes- default ⇒ false
171
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 171 property :bootstrap_with_dns, type: [TrueClass, FalseClass], default: false
-
#bootstrap_dns_provider ⇒ String
Which DNS provider should we use for creating DNS entries?
Property Attributes173
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 173 property :bootstrap_dns_provider, type: String
-
#public_postfix ⇒ String
Public postfix if no network interfaces are defined.
Property Attributes183
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 183 property :public_postfix, type: String
-
#private_postfix ⇒ String
Private postfix if no network interfaces are defined.
Property Attributes185
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 185 property :private_postfix, type: String
Properties (Read Only)
-
#fqdn ⇒ String (Default Value: Proc.new { r = [self.hostname, self.dns_domain].join('.').gsub(/\.$/,'') ; r = nil if r=='.' or r=='' ; r })
The FQDN of the box. This is set to read_only since it should be formed by hostname/dns_domain, which also defaults from a FQDN name variable.
Property Attributes- default ⇒ Proc.new { r = [self.hostname, self.dns_domain].join('.').gsub(/\.$/,'') ; r = nil if r=='.' or r=='' ; r }
- read_only ⇒ true
46
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 46 property :fqdn, type: String, default: Proc.new { r = [self.hostname, self.dns_domain].join('.').gsub(/\.$/,'') ; r = nil if r=='.' or r=='' ; r }, read_only: true
-
#implemented_providers ⇒ Array of ⇒ String
'List of infrastructure providers that this class can work with'
Property Attributes- read_only ⇒ true
176
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/host.rb', line 176 property :implemented_providers, type: String, array: true, read_only: true, description: 'List of infrastructure providers that this class can work with'
Constant Summary
Constants included from MintLogger
MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN
Instance Attribute Summary
Attributes included from Mixins::Properties
#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
- #delete_cascade ⇒ Object
- #get ⇒ Object
-
#initialize(opts = {}) ⇒ Instance
constructor
A new instance of Instance.
- #start ⇒ Object
- #stop ⇒ Object
Methods included from AwsCommon
#alive?, all, #attach_generic, #attached?, #available?, #build_create_hash, #by_id, #by_name, #create_generic, #delete_cascade_generic, #delete_generic, #detach_generic, #exists?, #fill_in_details, #find_by_details, #find_global_object, #get_aws_region, #get_state, #handle_singleton_object, #harvest, #perform_operation, #prop_to_hash, #register_aws_object, #resource_api, #running?, #start_generic, #started?, #stop_generic, #terminate_generic
Methods included from Mixins::Properties
#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref
Methods included from MintLogger::Utils::Common
#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send
Methods inherited from Infrastructure::Host
#admin_transport, #background_bootstrap, #background_create, #background_destroy, #background_force_bootstrap, #background_unbootstrap, #bootstrap, #create_admin_transport, #create_default_network_interface, #create_transport, #destroy, #detect_os_arch, #detect_os_cpu_count, #detect_os_family, #detect_os_memory_total, #detect_os_release, #detect_os_swap_total, #dns_propagated?, #force_bootstrap, #get_local_ip, #guess_primary_ip, #guess_tmp_folder, #restart, #transport, #transport_options, #unbootstrap, #uncreatable?, #wait_for_connectable, #wait_for_dns, #wait_for_transport
Methods included from Mixins::GenericProvider
included, #register_provider, #register_sub_provider
Methods included from Mixins::Backgroundable
#backgroundable, #wait_for_background_tasks