class RhaResources

RhaResources is the built-in resource manager configuration for heartbeat.

Attributes

preferred_node[RW]

The preferred_node is the node that this resource group would prefer to be run on. This usually takes the form of the hostname, or running ‘uname -n’.

resource_name[RW]

The resource_name is usually the IP address of the preferred_node cluster.

script_name[RW]

The script_name is the services that will be started by heartbeat. It looks in the /etc/init.d for the matched services (ie. nginx, httpd, smb) Services/Daemons on this line are separated by a single space.

Actions can be invoke via script_name::action (ie. httpd::restart )

Public Class Methods

new() click to toggle source

Returns a new RhaConfig Object

# File lib/rha/haresources.rb, line 40
def initialize()
end

Public Instance Methods

config() click to toggle source

Compile the RhaConfig configuration

# File lib/rha/haresources.rb, line 46
def config
  haresources = option_string()
  return haresources
end

Private Instance Methods

option_string() click to toggle source
# File lib/rha/haresources.rb, line 53
def option_string()
  ostring = "#{@preferred_node} #{@resource_name} "

  if @script_name
    ostring += @script_name.to_s
  end
  
  return ostring
end