Class: MintPress::OracleDatabaseClient::Installation

Inherits:
Object
  • Object
show all
Includes:
MintLogger, Mixins::Properties
Defined in:
src/oracle-database/lib/oracle-database/model/client/installation.rb,
src/oracle-weblogic/lib/oracle-weblogic/patch.rb,
src/oracle-weblogic/lib/oracle-weblogic/patchset.rb

Overview

An Oracle Client installation object that represents an ORACLE_HOME on a target node/host for the Oracle Database Client software. This class provides a set of methods to install, patch, and manage an installation ORACLE_HOME on a target host/node

Since:

  • 0.1.0

Properties (Read/Write)

  • #name ⇒ String (Default Value: self.class.to_s.gsub('::',''))

    Property Attributes
    • defaultself.class.to_s.gsub('::','')
    
    
    36
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 36
    
    property :name, type: String, default: self.class.to_s.gsub('::','')
  • #host ⇒ MintPress::Infrastructure::Host (Default Value: Proc.new { r = nil # If it's a proc, we made it... lets ignore things we made ourself, since it'll reference self! if get_property(:node, disable_proc: true).respond_to?(:get_property) and get_property(:node, disable_proc: true).get_property(:host, disable_proc: true).is_a?(MintPress::Infrastructure::Host) r = self.node.host elsif self.java and self.java.host r = self.java.host elsif self.default_localhost r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user) end r })
    Host can be either specified directly, derived from `node`, derived from `java`, or defaulted to localhost on systems where that makes sense

    Property Attributes
    • defaultProc.new { r = nil # If it's a proc, we made it... lets ignore things we made ourself, since it'll reference self! if get_property(:node, disable_proc: true).respond_to?(:get_property) and get_property(:node, disable_proc: true).get_property(:host, disable_proc: true).is_a?(MintPress::Infrastructure::Host) r = self.node.host elsif self.java and self.java.host r = self.java.host elsif self.default_localhost r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user) end r }
    
    
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 40
    
    property :host, type: MintPress::Infrastructure::Host, default: Proc.new { r = nil
                                                                                       # If it's a proc, we made it... lets ignore things we made ourself, since it'll reference self!
                                                                                       if get_property(:node, disable_proc: true).respond_to?(:get_property) and get_property(:node, disable_proc: true).get_property(:host, disable_proc: true).is_a?(MintPress::Infrastructure::Host) 
     r = self.node.host
                                                                                       elsif self.java and self.java.host
      r = self.java.host
    elsif self.default_localhost
      r = MintPress::Infrastructure::Localhost.new(final_user: self.default_localhost_user)
    
    end
    r }
  • #node ⇒ MintPress::OracleDatabase::Node
    Node is not, in fact, required for client, but exists as an optional additional way of specifying the host. The reason you may want to do this, is because node objects are used by the more advanced database installations, encapsulating VIPs and so forth, and if you already have these objects then it makes sense to pass them into here directly rather than having client be different. If none of the preceeding makes sense to you, then you almost certainly do not need to set this.

    Property Attributes
    
    
    56
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 56
    
    property :node, type: MintPress::OracleDatabase::Node
  • #java ⇒ MintPress::OracleJava::Installation
    Which java installation should we use?

    Property Attributes
    • disposition:requires
    • no_backreftrue
    
    
    67
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 67
    
    property :java, type: MintPress::OracleJava::Installation, disposition: :requires, no_backref: true
  • #java_home ⇒ Pathname (Default Value: Proc.new { self.java.java_home })
    Where is the java home? This defaults to the java home of the selected java installation, and is provided as an option for when you have installed java on the system via some other mechanism, and just wish to point to it rather than specifying a java object - it will default to the java_home attribute of the java property if that is supplied

    Property Attributes
    • fromString
    • requiredtrue
    • defaultProc.new { self.java.java_home }
    
    
    71
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 71
    
    property :java_home, type: Pathname, from: String, required: true, default: Proc.new { self.java.java_home }
  • #oracle_base ⇒ Pathname (Default Value: Proc.new { File.expand_path("#{self.oracle_home}/..") })
    The oracle base for the client installation. This will default to one folder above oracle_home

    Property Attributes
    • fromString
    • requiredtrue
    • defaultProc.new { File.expand_path("#{self.oracle_home}/..") }
    
    
    74
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 74
    
    property :oracle_base, type: Pathname, from: String, required: true, default: Proc.new { File.expand_path("#{self.oracle_home}/..") }
  • #oracle_home ⇒ Pathname
    The oracle home for the client installation

    Property Attributes
    • fromString
    • requiredtrue
    
    
    76
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 76
    
    property :oracle_home, type: Pathname, from: String, required: true
  • #version ⇒ String
    Which version of the client are we installing?

    Property Attributes
    • requiredtrue
    
    
    79
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 79
    
    property :version, type: String, required: true
  • #inventory_location ⇒ Pathname (Default Value: '/oracle/app/oraInventory')
    The path for the oraInventory file

    Property Attributes
    • fromString
    • default'/oracle/app/oraInventory'
    
    
    82
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 82
    
    property :inventory_location, type: Pathname, from: String, default: '/oracle/app/oraInventory'
  • #install_type ⇒ String (Default Value: 'Administrator')
    "Installation type of the component. The following choices are available. The value should contain only one of these choices: InstantClient, Administrator, Runtime, Custom"

    Property Attributes
    • requiredtrue
    • default'Administrator'
    • allowed_values%w{InstantClient Administrator Runtime Custom},
    
    
    86
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 86
    
    property :install_type, type: String, required: true, default: 'Administrator', allowed_values: %w{InstantClient Administrator Runtime Custom}, description: "Installation type of the component. The following choices are available. The value should contain only one of these choices: InstantClient, Administrator, Runtime, Custom"
  • #owner ⇒ String (Default Value: Proc.new { transport.execute('whoami').stdout.strip })
    "Unix user to be set for the installation. This will default to the current system user if unspecified."

    Property Attributes
    • defaultProc.new { transport.execute('whoami').stdout.strip }
    
    
    88
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 88
    
    property :owner, type: String, default: Proc.new { transport.execute('whoami').stdout.strip }, description: "Unix user to be set for the installation.  This will default to the current system user if unspecified."
  • #group ⇒ String (Default Value: Proc.new { transport.execute("id | awk '{print $2}' | sed 's/.*(//g' | sed 's/)$//g'").stdout.strip })
    "Unix group to be set for the Oracle inventory directory."

    Property Attributes
    • defaultProc.new { transport.execute("id | awk '{print $2}' | sed 's/.*(//g' | sed 's/)$//g'").stdout.strip }
    
    
    89
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 89
    
    property :group, type: String, default: Proc.new { transport.execute("id | awk '{print $2}' | sed 's/.*(//g' | sed 's/)$//g'").stdout.strip },description: "Unix group to be set for the Oracle inventory directory."
  • #custom_components
    "This property is considered only if INSTALL_TYPE is set to 'Custom'"

    Property Attributes
    • kind_ofString
    
    
    91
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 91
    
    property :custom_components, kind_of: String, description: "This property is considered only if INSTALL_TYPE is set to 'Custom'"
  • #scheduler_agent_host
    "Host name to be used for by the Oracle Scheduler Agent."

    Property Attributes
    • kind_ofString
    
    
    93
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 93
    
    property :scheduler_agent_host, kind_of: String, description: "Host name to be used for by the Oracle Scheduler Agent."
  • #scheduler_agent_port
    "Port number to be used for by the Oracle Scheduler Agent."

    Property Attributes
    • kind_ofInteger
    
    
    94
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 94
    
    property :scheduler_agent_port, kind_of: Integer, description: "Port number to be used for by the Oracle Scheduler Agent."
  • #execute_prereqs ⇒ [ TrueClass, FalseClass ] (Default Value: false)
    'Setting this property to true will run the prereq checks for the client.'

    Property Attributes
    • defaultfalse
    
    
    96
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 96
    
    property :execute_prereqs, type: [ TrueClass, FalseClass ], default: false, description: 'Setting this property to true will run the prereq checks for the client.'
  • #ignore_prereqs ⇒ [ TrueClass, FalseClass ] (Default Value: false)
    Should we ignore prerequisites?

    Property Attributes
    • defaultfalse
    
    
    98
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 98
    
    property :ignore_prereqs, type: [ TrueClass, FalseClass ], default: false
  • #ignore_sysprereqs ⇒ [ TrueClass, FalseClass ] (Default Value: false)
    Should we ignore system prerequisties?

    Property Attributes
    • defaultfalse
    
    
    100
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 100
    
    property :ignore_sysprereqs, type: [ TrueClass, FalseClass ], default: false
  • #wait_for_completion ⇒ [ TrueClass, FalseClass ] (Default Value: true)
    Should we wait for the installer to complete?

    Property Attributes
    • defaulttrue
    
    
    103
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 103
    
    property :wait_for_completion, type: [ TrueClass, FalseClass ], default: true
  • #software_stage ⇒ Pathname
    Where are the binaries for this installation? If these do not exist on the remote system, then they will be transfered there prior to installation

    Property Attributes
    • fromString
    • requiredtrue
    
    
    107
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 107
    
    property :software_stage, type: Pathname, from: String, required: true
  • #patches ⇒ Array of ⇒ MintPress::OracleDatabase::Patch
    Which patches should we apply?

    Property Attributes
    • fromHash
    
    
    110
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 110
    
    property :patches, type: MintPress::OracleDatabase::Patch, array: true, from: Hash
  • #patchsets ⇒ Hash of ⇒ MintPress::OracleDatabase::PatchSet
    The set of patchsets to apply to this product. THis is, again, ordered, however since patchsets have dependencies this order is not guarenteed

    Property Attributes
    
    
    114
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 114
    
    property :patchsets, type: MintPress::OracleDatabase::PatchSet, hash: true
  • #opatch_autoupdate ⇒ [TrueClass, FalseClass] (Default Value: false)
    "Automatically update OPatch?"

    Property Attributes
    • defaultfalse
    
    
    116
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 116
    
    property :opatch_autoupdate, type: [TrueClass, FalseClass], default: false, description: "Automatically update OPatch?"
  • #opatch_autoupdate_file ⇒ Pathname
    "Location of OPatch file to autoupdate"

    Property Attributes
    • fromString
    
    
    117
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 117
    
    property :opatch_autoupdate_file, type: Pathname, from: String, description: "Location of OPatch file to autoupdate"
  • #optional_args ⇒ String (Default Value: "")
    Which optional arguments should we pass to the installer?

    Property Attributes
    • default""
    
    
    120
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 120
    
    property :optional_args, type: String, default: ""
  • #target_tmp_dir ⇒ String (Default Value: '#{oracle_home}/../tmp')
    Which folder shouldw we use for temporary files?

    Property Attributes
    • default'#{oracle_home}/../tmp'
    
    
    123
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 123
    
    property :target_tmp_dir, type: String, default: '#{oracle_home}/../tmp'
  • #parent ⇒ MintPress::OracleDatabase::Node

    Property Attributes
    • prop_name:installations
    
    
    135
    # File 'src/oracle-database/lib/oracle-database/model/client/installation.rb', line 135
    
    property :parent, type: MintPress::OracleDatabase::Node, prop_name: :installations

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

Attributes included from Mixins::Properties

#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root

Instance Method Summary collapse

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 = {}) ⇒ Installation

Returns a new instance of Installation.

Instance Method Details

#add_patch(patch = {}) ⇒ void

This method returns an undefined value.

Add a patch to the Installation configuration

#clobbervoid

This method returns an undefined value.

Clobber or delete/remove an installation of the software on the target version if exists

#exists?TrueClass | FalseClass

Does the installation exist? Verify from inventory comps.xml on the target host/node

Returns:

  • (TrueClass | FalseClass)

#get_instance_variablesHash

Return a Hash representation for the class instance variables and properties

Returns:

  • (Hash)
    a Hash of all class instance variables and properties

#get_property_from_target(name) ⇒ Object

#harvestvoid

This method returns an undefined value.

Harvest the Installation configuration from the target

#harvest_patchesvoid

This method returns an undefined value.

Harvest the patches from the Installation configuration from the target

#installvoid

This method returns an undefined value.

Perform installation of a new Oracle installation (ORACLE_HOME).

#installed_oracle_homeObject

returns the oracle_home from #oracle_home/inventory/Components21/#inventory_component/#remote_version/context.xml using the VAL of PROD_HOME attribute

#installed_versionString

Determine the version of the installation from inventory comps.xml on the target host/node

Returns:

#instances_running?Boolean

Used by patching process to determine whether processes are running from the Oracle home. Note: Not applicable for DB client installations, so lets return false always.

Returns:

  • (Boolean)

#to_hashHash

Return a Hash representation for the Installation and all its sub-classes.

Returns:

  • (Hash)
    the object in Hash format

#uninstallvoid

This method returns an undefined value.

Perform uninstall of a new Oracle installation (ORACLE_HOME).

#usageObject

#version_from_oraversion(name) ⇒ Object

return version info from oraversion

#version_numeric(v = nil) ⇒ Integer

Determine the version of the installation from inventory comps.xml on the target host/node. Return in numeric format, left justified and padded with zeros (0). This is to facilitiate numeric comparisons when comparing versions.

Returns:

  • (Integer)
    - example version 12.2.0.1 will return 1220100