Subsections


Installation

Sched is written in perl. Packages are available for debian system.

Installation

Modules sched_master, sched_view and sched_builder are design to work on debian. You can use them on other system but installation will not be explain here.

Programs (sched_slave, sched_xfer, sched_job and sched_builder) must be installed in PATH (ex /usr/local/bin)

You have to configure src/lib/sched/Sched.pm for your environment :

our $prefix = '/tmp/sched' ;
our $prefix_etc = "$prefix/etc" ;
our $prefix_bin = "$prefix/bin" ;
our $prefix_share = "$prefix/share" ;

The directory share can be create with ./src/utils/mk_share.sh

Sched libraries src/lib/sched must be installed in perl directory (@INC).

localhost:~/# perl -e 'use exemple;'
Can't locate exemple.pm in @INC 
(@INC contains: 
  /etc/perl 
  /usr/local/lib/perl/5.8.4
  /usr/local/share/perl/5.8.4
  /usr/lib/perl5
  ...)
BEGIN failed--compilation aborted at - line 1.

For installing sched library in a non-system perl directory, you can use PERL5LIB variable or add to program header an use lib;

#!/usr/bin/perl -w
use lib '/path/to/sched/lib' ;

or

plume:~/tmp# export PERL5LIB=~/sched/src/lib/sched/

CPAN Modules

The CPAN module is designed to automate the make and install of perl modules and extensions. Modules are fetched from one or more of the mirrored CPAN (Comprehen- sive Perl Archive Network) sites and unpacked in a dedicated directory.

You can install modules in a non-system directory with PREFIX option and PERL5LIB variable.

  perl -MCPAN -e shell
  cpan# install Net::EasyTCP

Common modules

  - Net::EasyTCP
  - XML::Mini
  - Text::Balanced 
  - Digest::MD5 
  - Log::Log4perl
  - MIME::Base64
  - Config::IniFiles 
  - Tie::File 
  - Time::HiRes
  - Event
  - Time::ParseDate

Notes

To use XML::Mini with Sched, you must apply this patch

--- org/XML/Mini/Document.pm        2004-10-01 23:03:20.000000000 +0200
+++ new/XML/Mini/Document.pm    2004-10-22 21:30:49.000000000 +0200
@@ -761,0 +761,0 @@

     return undef unless (defined $attrString);
     my $count = 0;
-    while ($attrString =~ /([^\s]+)\s*=\s*(['"])([^\2]+?)\2/g)
+    while ($attrString =~ /([^\s]+?)\s*=\s*(['"])([^\2]*?)\2/g)
     {
        my $attrname = $1;
        my $attrval = $3;

Optional modules

These modules are used by the communication network library.

  - Compress::Zlib
  - Crypt::Blowfish
  - Crypt::CBC

sched_master modules

  - DBI
  - Pg
  - String::Random

sched_xfer modules

  - HTTP::Daemon
  - Net::IPNetMember

sched_builder module

  - Gnome2
  - Gnome2::Canvas
  - Gtk2::GladeXML

Supported operating systems

OS Module Notes
Linux i386 debian (sid) sched_master OK
  sched_job OK
  sched_xfer OK
  sched_slave OK
Ubuntu 5.04 sched_master OK
  sched_job OK
  sched_xfer OK
  sched_slave OK
Solaris sched_job OK
  sched_slave OK
Linux FC2 sched_job OK
  sched_slave OK
Linux Redhat7.3 sched_job OK
  sched_slave OK
Windows 2003 sched_job via cygwin
  sched_slave via cygwin
Windows XP sched_job via cygwin
  sched_slave via cygwin
  sched_xfer via cygwin

Notes on the installation under Windows

You have to install cygwin with :

cygrunsrv is used to transform sched_slave and sched_xfer to NT service.

bash:# cygrunsrv -I sched_slave -p /bin/perl.exe \ 
       -a '/path/to/sched_slave -c /path/to/etc/slave.cfg' \ 
       -e PERL5LIB=/perl/lib/perl5/site_perl/5.8:/perl/lib/perl5/site_perl/5.8/cygwin:/path/to/sched/lib \
       -u utilisateur_administrateur

sched_master installation

sched_master permit to :

To do this work, the program does not require particular permission. It can run as sched/sched for example.

Using firewall

You can easly use NAT or SNAT with sched. You have to be coherent with your host configuration.


Source Destination Port/Protocol
sched_slave sched_master master_port
sched_job sched_master master_port
sched_master sched_xfer xfer_port
Mozilla sched_view http

Figure 4: Network links
\includegraphics[width=10cm]{inc/network1.eps}


Base POSTGRESQL

Add sched user :

postgres@plume:~# createuser -P sched
Enter password for new user:
Enter it again:
Shall the new user be allowed to create databases? (y/n) n
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER

Create sched database :

postgres@plume:~# createdb -O sched sched
CREATE DATABASE

Manage permission connection :

postgres@plume:~# grep sched /etc/postgresql/pg_hba.conf
local   sched     sched     password

Initialize database :

postgres@plume:~# psql -U sched -W sched < pg.sql

sched_view installation

Requirements


Apache configuration

ScriptAlias /cgi-bin/sched/ /usr/lib/cgi-bin/sched/
<Directory "/usr/lib/cgi-bin/sched">
    AllowOverride AuthConfig
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

Alias /sched /usr/share/sched/html
<Directory "/usr/share/sched/html">
    Options None
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
</Directory>

View result

Use of Mozilla (1.7) with svg support permit to view execution reports. (see on http://localhost/sched). (Fig 3)

On Debian or ubuntu system, you have to enable truetype font on /etc/mozilla/prefs.js.

pref("font.FreeType2.enable", true);

pref("font.directory.truetype.1", 
     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType");

pref("font.directory.truetype.2", "/usr/share/fonts/truetype");
pref("font.directory.truetype.3", 
     "/usr/share/fonts/truetype/openoffice");

Installation on debian system

You have to get .deb files on www.nongnu.org/sched, install them with dpkg -i *.deb and complete dependency with apt-get install -f. Sample configuration files are installed under /etc/sched, you have to verify them.

sched_master on debian

After having installed sched_master package, you have to initialise the sched database (cf 2.5) and set the connection string in /etc/sched/master.cfg and /etc/sched/cgi.cfg.

Eric 2005-12-17