Class: MintPress::OracleJava::Installation
- Inherits:
-
Object
- Object
- MintPress::OracleJava::Installation
- Includes:
- MintLogger, Mixins::Backgroundable, Mixins::Properties
- Defined in:
- src/oracle-java/lib/oracle-java/installation.rb
Overview
Properties (Read/Write)
-
#name ⇒ String (Default Value: self.class.to_s.gsub('::',''))
Property Attributes- default ⇒ self.class.to_s.gsub('::','')
71
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 71 property :Name, type: String, default: self.class.to_s.gsub('::','')
-
#host ⇒ MintPress::Infrastructure::Host (Default Value: Proc.new {
r = nil
if self.get_property(:parent) and self.get_property(:parent).respond_to?(:get_property) and self.get_property(:parent).get_property(:host)
r = self.parent.host
elsif self.get_property(:default_localhost)
r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user)
end
r
})
If the user specifies transport, default to a new host with it, otherwise try parent... we'll raise exception if none of this stuff ends up resolving... why get_property? because parent may not be defined... getproperty wont exception, but self.xxx will! Also: Eagle eyed readers will note the use of disable_proc here, that's because if you set _neither_ of these, you get an infinite loop attempting to around and around - we use disable_proc to break that loop!
Property Attributes- default ⇒ Proc.new { r = nil if self.get_property(:parent) and self.get_property(:parent).respond_to?(:get_property) and self.get_property(:parent).get_property(:host) r = self.parent.host elsif self.get_property(:default_localhost) r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user) end r }
- no_backref ⇒ true
- parallel ⇒ true
- disposition ⇒ :requires
- cached_proc ⇒ true
80 81 82 83 84 85 86 87 88
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 80 property :host, type: MintPress::Infrastructure::Host, default: Proc.new { r = nil if self.get_property(:parent) and self.get_property(:parent).respond_to?(:get_property) and self.get_property(:parent).get_property(:host) r = self.parent.host elsif self.get_property(:default_localhost) r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user) end r }, no_backref: true, parallel: true, disposition: :requires, cached_proc: true
-
#java_home ⇒ Pathname (Default Value: '/oracle/app/java')
Location to install the java binaries
Property Attributes- from ⇒ String
- required ⇒ true
- default ⇒ '/oracle/app/java'
98
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 98 property :java_home, type: Pathname, from: String, required: true, default: '/oracle/app/java'
-
#version ⇒ String
Which version to install
Property Attributes- required ⇒ true
100
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 100 property :version, type: String, required: true
-
#owner ⇒ String
The user to run the installation as - this will default to the current user
Property Attributes102
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 102 property :owner, type: String
-
#group ⇒ String
The group to run the installation as - this will default to the primary group of the current user
Property Attributes104
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 104 property :group, type: String
-
#software_stage ⇒ Pathname
Where to install java from - for example, "/oracle/stage/jdk-8u192-linux-x64.tar.gz". If this file does not exist on the host where the installation is taking place, but does exist on host where the control is taking place, it will be transfered there
Property Attributes- from ⇒ String
- required ⇒ true
107
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 107 property :software_stage, type: Pathname, from: String, required: true
-
#target_tmp_dir ⇒ String (Default Value: '/tmp')
Which folder to use for tmp - defaults to /tmp
Property Attributes- default ⇒ '/tmp'
109
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 109 property :target_tmp_dir, type: String, default: '/tmp'
-
#execute_before ⇒ String (Default Value: nil)
'Accepts commands or script that will be executed before installation.'
Property Attributes- default ⇒ nil
119
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 119 property :execute_before, type: String, default: nil, description: 'Accepts commands or script that will be executed before installation.'
-
#execute_after ⇒ String (Default Value: nil)
'Accepts commands or script that will be executed after installation.'
Property Attributes- default ⇒ nil
120
# File 'src/oracle-java/lib/oracle-java/installation.rb', line 120 property :execute_after, type: String, default: nil, description: 'Accepts commands or script that will be executed after installation.'
Properties (Read Only)
Constant Summary
Constants included from MintLogger
MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN
Instance Attribute Summary collapse
-
#:java_home ⇒ String
the location path for where the Java software installation is to be installed.
-
#:transport ⇒ LASRpcUtils::Transport
the transport to use when installing the software.
-
#:version ⇒ String
a compliant string listing the java version (e.g. 1.8.0_172).
Attributes included from Mixins::Properties
#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root
Instance Method Summary collapse
- #background_install ⇒ Object
-
#clobber ⇒ void
Clobber or delete/remove an installation of the software on the target version if exists.
-
#execute_script(script, stage, transport) ⇒ Object
Helper function to Execute script before or after a patch or install stage can be before or after.
-
#exists? ⇒ TrueClass, FalseClass
Determines whether the software has already been installed and exists on the target.
-
#get_property_from_target(name) ⇒ Object
Grab properties from the remote - thinking specifically version.
-
#initialize(opts = {}) ⇒ MintPress::OracleJava::Installation
constructor
The constructor.
-
#install ⇒ void
Perform the install of the software on the target version if it does not already exist.
-
#installed_version ⇒ String
Determines the version installed on the target system.
-
#uninstall ⇒ void
Perform an uninstall of the software on the target version if exists.
-
#update ⇒ void
Update the version of Java software on the target to the version specified in the constructor.
-
#usage ⇒ String
Example usage of the class.
- #version_numeric(version) ⇒ Object
Methods included from Mixins::Backgroundable
#backgroundable, #wait_for_background_tasks
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
Constructor Details
#initialize(opts = {}) ⇒ MintPress::OracleJava::Installation
Instance Attribute Details
#:java_home ⇒ String
#:transport ⇒ LASRpcUtils::Transport
#:version ⇒ String
Instance Method Details
#background_install ⇒ Object
#clobber ⇒ void
This method returns an undefined value.
Clobber or delete/remove an installation of the software on the target version if exists#execute_script(script, stage, transport) ⇒ Object
#exists? ⇒ TrueClass, FalseClass
#get_property_from_target(name) ⇒ Object
#install ⇒ void
This method returns an undefined value.
Perform the install of the software on the target version if it does not already exist#installed_version ⇒ String
#uninstall ⇒ void
This method returns an undefined value.
Perform an uninstall of the software on the target version if exists#update ⇒ void
This method returns an undefined value.
Update the version of Java software on the target to the version specified in the constructor. If the java version specified in the constructor is different to the version installed on the target, update the installation to match the version in the constructor.