Looky 1.0.7
SourceForge.net Logo  
main page
docs
cmd args
configuration
install
commands LB
redirection
statistics


back  print  site

sourceforge

Looky Installation Routing

Table Of Content


1  Setup Server / Apache Server

You must be root or have permissions to create setup a WEB server to proceed the steps described in this section.

  1. Assume that you have an Apache WEB server. If not, you must adopt this document to the configuration of your WEB server.

  2. Assume that WWW:WWW is the user and the group of the user running your WEB server.

  3. Assume that $DOWNLOAD names the directory where you have downloaded the package files.

  4. Create directory /opt/looky and make this directory readable and writeable to your Apache server:
    #> cd /opt
    #> mkdir looky
    #> chown WWW:WWW looky
    #> chmod 755 looky


  5. Copy files urload.pl and urload.pbp to this directory /opt/looky
    #> cd /opt
    #> cp $DOWNLOAD/urload.pl looky
    #> cp $DOWNLOAD/urload.pbp looky
    #> chmod 755 looky/urload.pl
    #> chmod 644 looky/urload.pbp
    #> chown -R WWW:WWW looky


  6. Edit shebang of file /opt/looky/urload.pl to match your local perl:
    #> cd /opt
    #> type perl 
    perl is /usr/bin/perl
    #> vi looky/urload.pl
    (ESC-i)#!/usr/bin/perl(ESC-wq)


  7. Add a script alias entry to your httpd.conf file.
    ScriptAlias /looky/ /opt/looky/


  8. Restart your Apache server.

2  Install packages

The looky project uses a package installer called 'pkg-by-pkg'. This package isntaller provides a platform independant way in installing WEB based perl applications.

A pkg-by-pkg installation consists of two general steps:
  • step 1: urloading
  • step 2: install application


Within the urload phase, the package installer is installed by itself: this is done by a stand-alone perl script named urload.pl. This scripts takes a pkg-by-pkg file that provides the pkg-by-pkg software.

Once this pkg-by-pkg software is installed, you get an admin interface to maintain your looky installation. By default, your looky installation consist only of infrastructure as provided by the urload process. So you have to upload a looky core package (looky-1.0.7-core.pbp) to your site first.

Once this is uploaded, the package must be 'imported'. During import the pkg-by-pkg installer creates necessary subdirectories and installs perl libaries and applications. After this is done the looky installation must be configured and is ready for use.

If a new looky release has been posted, you could 'install' the next release package files. The pkg-by-pkg installer replaces necessary files but site dependant files (e.g. your configuration file) are unchanged during this process.

The looky project provides three packages:
  • looky-1.0.7-core.pbp: the looky core: libaries and applications to run looky.

  • looky-1.0.7-doc.pbp: this documentation.

  • looky-1.0.7-rc.pbp: a set of rc scripts (to make looky bootable) and application looky-killer.pl (to shut down looky server)

If the pkg-by-pkg software has been changed, an other package (looky-1.0.7-pkg.pbp) is shiped in a looky release. This package is needed to update the infrastructure as created by urload process of your looky installation. The package is only needed if you already have a looky installation.

This sounds rather complex, but actually it is quite easy. The installation routing is demonstrated in the following two sections.

2.1  Urload

  1. To run the urload process, use a web browser with URL
    http://<server>/looky/urload.pl
    to urload pkg-by-pkg structure to directory /opt/looky. If you set up your Apache server als described in previous section, the urload start screen is [shown].

    On this screen two substeps steps are shown:

    First some very basic checks are done:
    • The urload.pbp file is checked, if this file exists and if it is readable or not. The file has to be readable.
    • The installation directory is checked if an pkg-by-pkg instances already exists. Warning: you should not install a pkg-by-pkg instance on an other instance: this is done at your own risk!


    If this checks are passed successfully the urloader tries to guess the binary path to your perl interpreter and the root directory where looky has to be installed (/opt/looky).

    Please check the values quite carefully. This cannot be changed later, so you must enter the correct values (In case you fail here: just delete the complete directory root directory /opt/looky and start again)

  2. On the next [screen], the given values for root-directory and perl interpreter are checked. If this is ok, the package file urload.pbp is opened and content is shown to you.

    Just click 'accept' button to proceed.

  3. Now the pkg-by-pkg infrastructure is created. The result of this step is shown on the next [screen].

    Once the pkg-by-pkg infrastructure is available, the urload.pl script tries to use the perl packages as urloaded from urload.pbp file. If this fails, a perl error message is shown.

  4. On the next [screen], the package requirements are checked. This phase may lead to a perl error that is shown to you: in this case you have to fetch listed package from cpan.

  5. Finally, on the last [screen], the files urload.pl and urload.php are deleted .

    Instead of these a new file admin.pl has been created to manage your looky installation. Just select [continue].

The urload is finshed by this screen. Now you should add looky packages to this installation. This is described in next section.

2.2  Install Looky Core

  1. The admin script provides the following main [screen].

    To upload the looky core package file, select [upload package]

  2. Select the looky-1.0.7-core.pbp file and upload file by button [upload].

  3. The file is uploaded (this may take a while). If the upload was successfully a positve result is [shown].

    Select [import] to jump to the import page.

  4. All uploaded files are [shown] to the user.

    Just select [import] of the uploaded looky-1.0.7-core.pbp file to start import of the uploaded package.

  5. The package is extracted and its content is [shown] to the user.

    Just select [import] to import the package.

  6. The package is installed and the result of this process is [shown] to the user.

    Just select [continue] to proceed

  7. The imported package has added two links to the admin.pl [script].

    The installation process is done.

3  Configuration

Finally you have to setup the configuration. There are 4 things to be done:
  • define pools
  • assign resource to pools
  • setup security and finally
  • setup redirection urls.


3.1  Define Pools

The definition of pools is a fundamental work. In general you have to answer a simple question: it is necessary from organzational, monentary or technical reasons to split you consumers into several groups?

The answer to this question provides you the number of pools you should define: for each group one pool. However one pool has to be defined ... :-)

The next question is a little bit more complex: you have to assign a usefull seed method, a latency time and a distribution mode. The answer depends on your application.

Goal Settings
You just want to distribute your consumers to the resource with a constant factor: e.g. 100:100:50 Use distribution mode '(auto-)queue'. Set seed method to weighted or parallel. Set latency time to a short value.
You want to garantee that not more sessions are started than provided on resource. Use distribution mode 'sticky'. Set a very high latency time (e.g. 200 days). Set any seed method you like. Use the looky-sessioner.pl script to controll number of sessions.
You want to do control distribution by resource load. Use distribution mode 'sticky'. Set a very high latency time (e.g. 200 days). Set any seed method you like. Define opt and max load values for each resource. Use the looky-controller.pl server to master the looky-sever. Define a high optimal and maximal 'have' value. Use the looky-probe client to collect load from system.


3.2  Define Resources

Next step is to assign resources to the pools. This is quite easy: just assign the number of sessions you want to run on this resources as 'have' value of the resource.

Think if you have the need to have a resource located in more than one pool. If this is true, think if this resource is shared or coupled.

3.3  Setup Security

This is quite easy: If you run the looky server on the same server than the apache hosting the LBC, the default ACL to access the looky server is ok.

If you plan to run the looky server on an other host than the LBC's, you should add this host to the 'allow' list in looky configuration.

If you use looky-sessioner clients, you have to modify the ACLs of the looky server to grant access for the servers hosting the looky sessioner clients. If you use looky probe clients, you have to do the same for the ACL of the looky controller.

3.4  Setup Redirection

3.4.1  Setup up error redirection

However this is quite easy: Create three HTML files on the same WEB server hosting the LBC: one file to signal to the consumer, that no further resource exist (no-resource.html), one file to signal to the consumer, that the looky server is offline (no-server.html) and one file to signal to the consumer that he had entered an invalid url (invalid-url.html)

3.4.2  Setup up standard redirection

This is the last step of the procedure. To speed up the loadbalancing stuff, it is highly recommended to run the LBC by mod_perl.

PerlModule Apache::Registry

# ----- map location 'load' to be run by LBC
#
ScriptAliasMatch ^/load/.* /opt/looky/looky-client-cgi.pl

# ----- host this location by mod_perl
#
<Location /load/>
    SetHandler perl-script
    PerlHandler Apache::Registry
    Options +ExecCGI
    PerlSendHeader On
    allow from all
</Location>


Once this is done, the following is recommended for redirection.
http://<server>/load/<pool>/<start>/<url>/<of>?<your>=<application>
                     `----´ `----------------´ `------------------´
                       |       |                              |
 get pool from this segment   make path transient             |
                              from segment 2                  |
                                                    just use query part
                                                    as given by url
If pools are set, compute the pool from the following segment (here segment '1'). Copy the rest of the path as transient value to redirection URL. Pass query part unchanged.

As a result from this, you get the following configuration:

redirect:http://%{resource}/%{path}%{url/query:?%{url/query}}%{url/fragment:#%{url/fragment}}
compute.pool:path/1
transient.path:2


4  Start processes

This step is quite easy: Just start the looky server like this:
$>cd /opt/looky
$>perl looky-server.pl -q &


If you have installed the looky-1.0.7-rc.pbp package you may start the looky server by this script.


 
HTML by: WebByWeb V1.3
last update: 2003-05-18 11:23
contact:./o about us