Class: Confluent::Kafka::Installation

Inherits:
Object
  • Object
show all
Includes:
MintLogger, MintPress::Mixins::Properties
Defined in:
src/confluent-platform/lib/confluent-platform/model/installation.rb

Overview

Base class for Installation of Confluent Kafka software. Provides methods for the installing and configuring Confluent Kafka.

Since:

  • 0.1.0

Properties (Read/Write)

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

    Property Attributes
    • defaultself.class.to_s.gsub('::', '')
    
    
    70
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 70
    
    property :Name, type: String, default: self.class.to_s.gsub('::', '')
  • #host ⇒ MintPress::Infrastructure::Host (Default Value: Proc.new { r = nil if self.get_property(:host, disable_proc: true).is_a?(MintPress::Infrastructure::Host) r = self.node.host elsif self.get_property(:java) r = self.java.host end r })
    If the user specifies transport, default to a new host with it, otherwise try java installation ... 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!

    Property Attributes
    • requiredtrue
    • defaultProc.new { r = nil if self.get_property(:host, disable_proc: true).is_a?(MintPress::Infrastructure::Host) r = self.node.host elsif self.get_property(:java) r = self.java.host end r }
    • no_backreftrue
    • paralleltrue
    • disposition:requires
    
    
    76
    77
    78
    79
    80
    81
    82
    83
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 76
    
    property :host, type: MintPress::Infrastructure::Host, required: true, default: Proc.new { r = nil
    if self.get_property(:host, disable_proc: true).is_a?(MintPress::Infrastructure::Host)
      r = self.node.host
    elsif self.get_property(:java)
      r = self.java.host
    end
    r
    }, no_backref: true, parallel: true, disposition: :requires
  • #java ⇒ MintPress::OracleJava::Installation
    The MintPress::OracleJava::Installation installation to use for this installation

    Property Attributes
    • disposition:requires
    • no_backreftrue
    
    
    89
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 89
    
    property :java, type: MintPress::OracleJava::Installation, disposition: :requires, no_backref: true
  • #java_home ⇒ Pathname (Default Value: Proc.new { self.get_property(:java) ? self.java.java_home : nil })
    The JAVA_HOME location to use for this installation

    Property Attributes
    • fromString
    • requiredtrue
    • defaultProc.new { self.get_property(:java) ? self.java.java_home : nil }
    
    
    92
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 92
    
    property :java_home, type: Pathname, from: String, required: true, default: Proc.new { self.get_property(:java) ? self.java.java_home : nil }
  • #kafka_home ⇒ Pathname (Default Value: '/opt/kafka')
    'The KAFKA_HOME location where this software will be installed'

    Property Attributes
    • fromString
    • default'/opt/kafka'
    
    
    95
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 95
    
    property :kafka_home, type: Pathname, from: String, default: '/opt/kafka', description: 'The KAFKA_HOME location where this software will be installed'
  • #version ⇒ String
    'The version of the Kafka software'

    Property Attributes
    • requiredtrue
    
    
    98
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 98
    
    property :version, type: String, required: true, description: 'The version of the Kafka software'
  • #owner ⇒ String (Default Value: 'kafka')
    'Kafka OS user owner (UID)'

    Property Attributes
    • default'kafka'
    
    
    101
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 101
    
    property :owner, type: String, default: 'kafka', description: 'Kafka OS user owner (UID)'
  • #group ⇒ String (Default Value: 'kafka')
    'Kafka OS group owner (GID)'

    Property Attributes
    • default'kafka'
    
    
    104
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 104
    
    property :group, type: String, default: 'kafka', description: 'Kafka OS group owner (GID)'
  • #software_stage ⇒ Pathname
    ''

    Property Attributes
    • fromString
    • requiredtrue
    
    
    107
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 107
    
    property :software_stage, type: Pathname, from: String, required: true, description: ''
  • #confluent_cli_url ⇒ String (Default Value: 'https://cnfl.io/cli')
    'Location of Confluent CLI'

    Property Attributes
    • default'https://cnfl.io/cli'
    
    
    110
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 110
    
    property :confluent_cli_url, type: String, default: 'https://cnfl.io/cli', description: 'Location of  Confluent CLI'
  • #confluent_cli_version ⇒ String
    'Version of the Confluent CLI'

    Property Attributes
    • requiredfalse
    
    
    113
    # File 'src/confluent-platform/lib/confluent-platform/model/installation.rb', line 113
    
    property :confluent_cli_version, type: String, description: 'Version of the Confluent CLI', required: false

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

Attributes included from MintPress::Mixins::Properties

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

Instance Method Summary collapse

Methods included from MintPress::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 = {}) ⇒ Confluent::Kafka::Installation

The constructor

Parameters:

  • opts (Hash) (defaults to: {})
    A Hash of options with which to instantiate this class

Options Hash (opts):

  • :name (String)
    the name of the installation
  • :host (MintPress::Infrastructure::Host)
    the host onto which the software will be installed
  • :java (MintPress::OracleJava::Installation)
    The java installation object
  • :java_home (Pathname)
    The java_home location
  • :kafka_home (Pathname)
    The kafka_home location
  • :version (String)
    The version of the software for the installation
  • :owner (String)
    The software owner
  • :group (String)
    The software group
  • :software_stage (Pathname)
    The location of the installation media

Raises:

  • (ArgumentError)
    invalid argument passed into constructor

Since:

  • 0.1.0

Instance Attribute Details

#hostMintPress::Infrastructure::Host

Returns The host associated with this installation.

Returns:

Since:

  • 0.1.0

#java_homePathname

Returns the location path for the java_home.

Returns:

  • (Pathname)
    the location path for the java_home

Since:

  • 0.1.0

#kafka_homePathname

Returns the location path for the kafka_home.

Returns:

  • (Pathname)
    the location path for the kafka_home

Since:

  • 0.1.0

#transportLASRpcUtils::Transport

Returns The transport associated with this installation.

Returns:

Since:

  • 0.1.0

#versionPathname

Returns the location path for the Patch.

Returns:

  • (Pathname)
    the location path for the Patch

Since:

  • 0.1.0

Instance Method Details

#confluent_cli_installed?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0

#ensure_initializedObject

Since:

  • 0.1.0

#exists?TrueClass | FalseClass

Does the installation exist?

Returns:

  • (TrueClass | FalseClass)

Since:

  • 0.1.0

#get_instance_variablesObject

Since:

  • 0.1.0

#installvoid

This method returns an undefined value.

Install the Confluent Kafka software

Since:

  • 0.1.0

#install_confluent_cliObject

Since:

  • 0.1.0

#install_productObject

Since:

  • 0.1.0

#install_tar_archive(kafka_home, software_stage, compressed) ⇒ Object

Since:

  • 0.1.0

#install_zip_archive(kafka_home, software_stage) ⇒ Object

Since:

  • 0.1.0

#installed_versionString

What version of the software is installed on the node

Returns:

Since:

  • 0.1.0

#to_hashHash

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

Returns:

  • (Hash)
    the object in Hash format

Since:

  • 0.1.0

#uninstallvoid

This method returns an undefined value.

Uninstall the Confluent Kafka software

Since:

  • 0.1.0

#usageObject

Since:

  • 0.1.0

#version_numericInteger

What version of the software (in numeric format) is installed on the node

Returns:

  • (Integer)

Since:

  • 0.1.0