The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

VBTK::Controller - VBTK Master Controller Package

SYNOPSIS

  use VBTK::Controller;

  # Define some global settings for the controller
  $obj = new VBTK::Controller (
      MasterVBServer => 'myhost1',
      SlaveVBServers => 'myhost3'
  );

  # Define a host group and which RemoteURI they should report to.
  $obj->addHostGroup(
      VBServerURI => "http://myhost1:$::VBPORT",
      HostList    => {
          myhost1 => 'vbserver,vbcommon',
          myhost2 => 'vbcommon,vbping,vbhttp',
      },
  );

  # Define a host group and which RemoteURI they should report to.
  $obj->addHostGroup(
      VBServerURI => "http://myhost3:$::VBPORT",
      HostList    => {
          myhost3 => 'vbserver,vbcommon',
          myhost4 => 'vbcommon,vbtcp',
      },
  );

  $obj->run;

DESCRIPTION

This package is used to define the MasterVBServer, any SlaveVBServers and which VB monitoring scripts should be run on each host.

PUBLIC METHODS

$obj = new VBTK::Controller (<parm1> => <val1>, <parm2> => <val2>, ...)

The constructor for this class accepts the following parameters which indicate which host is the master VBServer and which hosts are slave VBServers. All config file changes should be made on the master. Changes can then be manually replicated out to the slave servers and then to the clients by using the 'vbc sync' command on those hosts.

MasterVBServer

This is used to define the hostname where the master VBServer will run. This entry is used only during sync of the slave servers.

SlaveVBServers

A comma-separated list of hosts on which slave VBServer process will be run. When the 'vbc sync' command is run on a host specified in the 'SlaveVBServers' list, the vbc script will ignore the 'VBServerURI' param specified for the host and will instead use the 'VBServerURI' param specified for the host which runs the master VBServer process.

$obj->addHostGroup(<parm1> => <val1>, <parm2> => <val2>, ...)

The 'addHostGroup' method is used to define a group of hosts along with the VBServerURI they should sync from and report to. It also defines which monitoring scripts will run on each host.

VBServerURI

This is the URI from which config files will be replicated and to which all client processes running in this host group will report statuses. Hosts defined as slave servers will ignore this entry when syncing and will instead use the VBServerURI of the host specified as the master VBServer.

   VBServerURI => "http://myhost1:4712",
HostList

A pointer to a hash which matches up host names to comma-separated lists of vb scripts. The vb scripts must be names of real perl scripts in the $VBCONF directory.

  HostList => {
    myhost1 => 'vbserver1,vbcommon',
    myhost2 => 'vbserver2,vbcommon' },

SEE ALSO

VBTK
VBTK::Server

AUTHOR

Brent Henry, vbtoolkit@yahoo.com

COPYRIGHT

Copyright (C) 1996-2002 Brent Henry

This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation available at: http://www.gnu.org/copyleft/gpl.html

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.