Changeset 6b8f06066239d5c2a2858da48efa71656ebdbfec in xas-supervisor


Ignore:
Timestamp:
12/11/15 11:23:20 (3 years ago)
Author:
Kevin L. Esteb <kevin@…>
Branches:
master
Children:
53b723f1a24444cfad52d710d636e41123ecc19b
Parents:
669163f99a2a8ccdbc9cb8c35b4d9590d81db050
git-author:
Kevin L. Esteb <kevin@…> (12/11/15 11:23:20)
git-committer:
Kevin L. Esteb <kevin@…> (12/11/15 11:23:20)
Message:

updating documentation

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/README

    rf94c9c8aab57fdb4e3a83a50993887bb79ce2648 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    1 XAS xxxx is Copyright (c) 2012-2015 Kevin L. Esteb  
     1XAS Supervisor is Copyright (c) 2012-2015 Kevin L. Esteb  
    22 
    33XAS is a set of modules, procedures and practices to help write 
     
    1010write your code once and run it where ever. 
    1111 
    12 <additional details go here> 
     12This package provides the modules and procedures to provide a process 
     13supervisor. The supervisor will spawn and manage background processes. 
     14It's primary purpose is to keep a process running. There is a command  
     15line client that allows you to manipulate those processes. 
    1316 
    1417Installation instructions can be found here: 
    1518 
    16     http://scm.kesteb.us/trac/wiki/XasDocsXXXXInstallation 
     19    http://scm.kesteb.us/trac/wiki/XasDocsSupervisorInstallation 
    1720 
    1821Extended documentation is available at: http://scm.kesteb.us/trac 
  • trunk/debian/control

    rf94c9c8aab57fdb4e3a83a50993887bb79ce2648 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    1 Source: libxas-xxxx-perl 
     1Source: libxas-supervisor-perl 
    22Section: perl 
    33Priority: optional 
     
    55Maintainer: kevin l. esteb <kevin@kesteb.us> 
    66Standards-Version: 3.9.4 
    7 Homepage: http://search.cpan.org/dist/XAS/xxxx 
     7Homepage: http://scm.kesteb.us/trac 
    88 
    9 Package: libxas-xxxx-perl 
     9Package: libxas-supervisor-perl 
    1010Architecture: all 
    1111Depends: ${misc:Depends}, ${perl:Depends} 
    12 Description: Middelware for Perl 
     12Description: Middleware for Datacenter Operations - supervisor 
    1313 . 
    14  XAS is middleware for Perl. It provides standardized methods, modules 
    15  and philosophy for constructing large distributed applications. 
     14 XAS is Middleware for Datacenter Operations. It provides standardized 
     15 methods, modules and philosophy for constructing large distributed 
     16 applications that are the backbone of your operations center. 
     17 . 
     18 This package provides the supervisor modules. This supervisor will 
     19 monitor and manage background processes. 
  • trunk/debian/files

    rf94c9c8aab57fdb4e3a83a50993887bb79ce2648 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    1 libxas-xxxx-perl_0.01-1_all.deb perl optional 
     1libxas-supervisor-perl_0.01-1_all.deb perl optional 
  • trunk/debian/postinst

    rf94c9c8aab57fdb4e3a83a50993887bb79ce2648 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    22# 
    33# File: postinst 
    4 # Date: 30-Jun-2014 
     4# Date: 11-Dec-2015 
    55# By  : Kevin Esteb 
    66# 
    7 # postinst script for libxas-xxxx-perl 
     7# postinst script for libxas-supervisor-perl 
    88# 
    99# Create the directory structure needed and set permissions 
  • trunk/debian/postrm

    rf94c9c8aab57fdb4e3a83a50993887bb79ce2648 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    22# 
    33# File: postrm 
    4 # Date: 30-Jun-2014 
     4# Date: 11-Dec-2015 
    55# By  : Kevin Esteb 
    66# 
    7 # postrm script for libxas-xxxx-perl 
     7# postrm script for libxas-supervisor-perl 
    88# 
    99# Remove the directory structure 
  • trunk/debian/preinst

    rf94c9c8aab57fdb4e3a83a50993887bb79ce2648 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    22# 
    33# File: preinst 
    4 # Date: 30-Jun-2014 
     4# Date: 11-Dec-2015 
    55# By  : Kevin Esteb 
    66# 
    7 # preinst script for libxas-xxxx-perl 
     7# preinst script for libxas-supervisor-perl 
    88# 
    99# 
  • trunk/lib/XAS/Apps/Supervisor/Client.pm

    rf612bf0cf2d302696dd777cd41ad9ceeb1c3372f r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    66  version   => '0.03', 
    77  base      => 'XAS::Lib::App', 
    8   accessors => 'port host start stop pause resume status list', 
     8  accessors => 'port host start stop pause resume status list kill', 
    99  constants => ':jsonrpc', 
    1010; 
     
    5252        $message = $self->message('supervisor_list', join(',', @$result)); 
    5353 
     54    } elsif (defined($self->kill)) { 
     55 
     56        $result = $rpc->kill($self->kill); 
     57        $message = $self->message('supervisor_status', $self->kill, $result); 
     58 
    5459    } elsif (defined($self->status)) { 
    5560 
     
    7681    $self->{'pause'}  = undef; 
    7782    $self->{'list'}   = undef; 
     83    $self->{'kill'}   = undef; 
    7884 
    7985    return { 
     
    8591        'pause=s'  => \$self->{'pause'}, 
    8692        'resume=s' => \$self->{'resume'}, 
     93        'kill=s'   => \$self->{'kill'}, 
    8794        'list'     => \$self->{'list'}, 
    8895    }; 
     
    143150Request that a process be resumed. 
    144151 
     152=head2 --kill 
     153 
     154Request that a process be killed. 
     155 
    145156=head2 --status 
    146157 
  • trunk/lib/XAS/Supervisor.pm

    r669163f99a2a8ccdbc9cb8c35b4d9590d81db050 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    1212=head1 NAME 
    1313 
    14 XAS::Supervisor - A set of modules and utilities to supervise processes 
     14XAS::Supervisor - A set of modules and procedures to supervise processes 
    1515 
    1616=head1 SYNOPSIS 
    1717 
     18=head1 DESCRIPTION 
    1819 
    19 =head1 DESCRIPTION 
     20A superivsor is a process that manages other processes. This package provides 
     21this capability for XAS.  
    2022 
    2123=head1 SEE ALSO 
    2224 
    2325=over 4 
     26 
     27=item L<XAS::Apps::Supervisor::Client|XAS::Apps::Supervisor::Client> 
     28 
     29=item L<XAS::Apps::Supervisor::Monitor|XAS::Apps::Supervisor::Monitor> 
     30 
     31=item L<XAS::Docs::Supervisor::Installation|XAS::Docs::Supervisor::Installation> 
     32 
     33=item L<XAS::Supervisor::Client|XAS::Supervisor::Client> 
     34 
     35=item L<XAS::Supervisor::Controller|XAS::Supervisor::Controller> 
     36 
     37=item L<XAS::Supervisor::Monitor|XAS::Supervisor::Monitor> 
    2438 
    2539=item L<XAS|XAS> 
  • trunk/lib/XAS/Supervisor/Client.pm

    rc381f17e441575b3b3c05fcc82b1b0687bc0264a r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    4747} 
    4848 
     49sub kill { 
     50    my ($self, $name) = @_; 
     51 
     52    my $params = { 
     53        name => $name 
     54    }; 
     55 
     56    my $result = $self->call( 
     57        -method => 'kill_process', 
     58        -id     => $self->id, 
     59        -params => $params 
     60    ); 
     61 
     62    return $result; 
     63 
     64} 
     65 
    4966sub pause { 
    5067    my ($self, $name) = @_; 
     
    174191 
    175192This method will start a managed process. It takes one parameter, the name 
    176 of the process, and returns "started" if successful. 
     193of the process, and returns "running" if successful. 
    177194 
    178195 Example: 
     
    189206     my $result = $rpc->stop('sleeper'); 
    190207 
     208=head2 pause($name) 
     209 
     210This method will pause a managed process. It takes one parameter, the name of 
     211the process, and returns "paused" if successful. 
     212 
     213 Example: 
     214 
     215     my $result = $rpc->pause('sleeper'); 
     216 
     217=head2 resume($name) 
     218 
     219This method will resume a managed process. It takes one parameter, the name of 
     220the process, and returns "running" if successful. 
     221 
     222 Example: 
     223 
     224     my $result = $rpc->resume('sleeper'); 
     225 
     226=head2 kill($name) 
     227 
     228This method will kill a managed process. It takes one parameter, the name of 
     229the process, and returns "killed" if successful. 
     230 
     231 Example: 
     232 
     233     my $result = $rpc->kill('sleeper'); 
     234 
    191235=head2 status($name) 
    192236 
    193 This method will do a "stat" on a managed process. It takes one parameter, 
    194 the name of the process, and returns "alive" if the process is running or 
    195 "dead" if the process is not. 
     237This method will do a "stat" on a managed process. The process status will  
     238be from the OS level. It can be one of the following: 
     239 
     240 'unknown' 
     241 'other' 
     242 'ready' 
     243 'running' 
     244 'blocked' 
     245 'suspended blocked' 
     246 'suspended ready' 
    196247 
    197248=head2 list 
    198249 
    199 This method will list the known process on the target supervisor. 
    200  
    201  Example: 
    202  
    203      my $result = $rpc->list(); 
     250This method will list the known processes on the target supervisor. 
     251 
     252 Example: 
     253 
     254     my $results = $rpc->list(); 
     255 
     256     printf("Known processes\n"); 
     257 
     258     foreach my $result (@$results) { 
     259 
     260         printf('%s\n", $result); 
     261 
     262     } 
    204263 
    205264=head1 SEE ALSO 
  • trunk/lib/XAS/Supervisor/Controller.pm

    rf612bf0cf2d302696dd777cd41ad9ceeb1c3372f r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    317317=head1 NAME 
    318318 
    319 XAS::xxx - A class for the XAS environment 
     319XAS::Supervisor::Controller - manage multiple processes 
    320320 
    321321=head1 SYNOPSIS 
    322322 
    323  use XAS::XXX; 
     323 use XAS::Supervisor::Controller; 
     324 
     325 my $controller = XAS::Supervisor::Controller->new( 
     326    -alias     => 'controller', 
     327    -port      => '9506', 
     328    -address   => '127.0.0.1, 
     329    -processes => $processes 
     330 ); 
     331 
     332 $controller->run; 
    324333 
    325334=head1 DESCRIPTION 
    326335 
     336 
    327337=head1 METHODS 
    328338 
     
    332342 
    333343=over 4 
     344 
     345=item L<XAS::Supervisor|XAS::Supervisor> 
    334346 
    335347=item L<XAS|XAS> 
  • trunk/lib/XAS/Supervisor/Monitor.pm

    r46cd4240670ef645a4b78521eabbc2c10aae9891 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    113113=head1 DESCRIPTION 
    114114 
     115This package is used to load a configuration file and start the processes 
     116that are defined.  
     117 
     118=head1 CONFIGURATION 
     119 
     120The configuration file is the familiar Windows .ini format. It has the 
     121following stanzas. 
     122 
     123 [supervisor: xas-logmon] 
     124 auto-start = 1 
     125 auto-restart = 1 
     126 command = xas-logmon  
     127 directory = / 
     128 environment = name1=value1;;name2=value2 
     129 exit-codes = 0,1 
     130 exit-retires = 5 
     131 group = xas 
     132 priority = 0 
     133 umask = 0022 
     134 user = xas 
     135 redirect = 0 
     136 
     137This stanza defines a process to manage. There can be multiple stanzas. The 
     138"xas-logmon" in the stanza name must be unique and is associated with the 
     139process. This name is used to control this process. Reasonable defaults 
     140have been defined within the code. You really only need to use 'command' to 
     141start a process. The following defaults are defined: 
     142 
     143 auto-start = 1 
     144 auto-restart = 1 
     145 directory = / 
     146 exit-codes = 0,1 
     147 exit-retires = 5 
     148 group = xas 
     149 priority = 0 
     150 umask = 0022 
     151 user = xas 
     152 redirect = 0 
     153 
     154Please see L<XAS::Lib::Process|XAS::Lib::Process> for more details. 
     155 
    115156=head1 METHODS 
    116157 
    117 =head2 method1 
     158=head2 new 
     159 
     160Initialize the module. This will load the configuration file. Not neccessary 
     161to be invoked as invoking load() will do the samething.  
     162 
     163=head2 load 
     164 
     165Load the processes defined within the configuration file. Returns a 
     166hash of the loaded processes. 
    118167 
    119168=head1 SEE ALSO 
    120169 
    121170=over 4 
     171 
     172=item L<XAS::Supervisor|XAS::Supervisor> 
    122173 
    123174=item L<XAS|XAS> 
  • trunk/perl-XAS-Supervisor.spec

    r060cc7e635d3538a55eba919ca2accfc9fb60b52 r6b8f06066239d5c2a2858da48efa71656ebdbfec  
    1 Name:           perl-XAS-XXXX 
     1Name:           perl-XAS-Supervisor 
    22Version:        0.01 
    33Release:        1%{?dist} 
     
    55License:        Artistic 2.0 
    66Group:          Development/Libraries 
    7 URL:            http://scm.kesteb.us/git/XAS-XXXX/trunk/ 
    8 Source0:        XAS-XXXX-%{version}.tar.gz 
     7URL:            http://scm.kesteb.us/git/XAS-Supervisor/trunk/ 
     8Source0:        XAS-Supervisor-%{version}.tar.gz 
    99BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
    1010BuildArch:      noarch 
     
    2929 
    3030%description 
    31 A set of processes to manage spool files 
     31A supervisor to manage background processes 
    3232 
    3333%prep 
    34 %setup -q -n XAS-XXXX-%{version} 
     34%setup -q -n XAS-Supervisor-%{version} 
    3535 
    3636%if 0%{?rhel} == 5 
     
    3939%{__perl_provides} $* | sed -e '/Win32/d' 
    4040EOF 
    41 %global __perl_provides %{_builddir}/XAS-XXXX-%{version}/%{name}-prov 
     41%global __perl_provides %{_builddir}/XAS-Supervisor-%{version}/%{name}-prov 
    4242chmod +x %{__perl_provides} 
    4343cat << \EOF > %{name}-req 
     
    4545%{__perl_requires} $* | sed -e '/Win32/d' 
    4646EOF 
    47 %global __perl_requires %{_builddir}/XAS-XXXX-%{version}/%{name}-req 
     47%global __perl_requires %{_builddir}/XAS-Supervisor-%{version}/%{name}-req 
    4848chmod +x %{__perl_requires} 
    4949%endif 
     
    7070%files 
    7171%defattr(-,root,root,-) 
    72 %doc Changes README perl-XXXX.spec 
     72%doc Changes README perl-Supervisor.spec 
    7373%{perl_vendorlib}/* 
    74 %config(noreplace) %{_sysconfig}/xxxx 
    75 %config(noreplace) %{_logrotated}/xxxx 
    76 %config(noreplace) %{_initd}/xxxx 
    77 %config(noreplace) %{_xasconf}/xxxx 
     74%config(noreplace) %{_sysconfig}/xas-supervisor 
     75%config(noreplace) %{_logrotated}/xas-supervisor 
     76%config(noreplace) %{_initd}/xas-supervisor 
     77%config(noreplace) %{_xasconf}/xas-supervisor.ini 
    7878%{_mandir}/* 
    7979%{_sbindir}/* 
Note: See TracChangeset for help on using the changeset viewer.