|
||||||||||
Looky Installation Routing1 Setup Server / Apache ServerYou must be root or have permissions to create setup a WEB server to proceed the steps described in this section.
2 Install packagesThe 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:
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:
This sounds rather complex, but actually it is quite easy. The installation routing is demonstrated in the following two sections. 2.1 Urload
2.2 Install Looky Core
3 ConfigurationFinally you have to setup the configuration. There are 4 things to be done:
3.1 Define PoolsThe 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.
3.2 Define ResourcesNext 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 SecurityThis 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 Redirection3.4.1 Setup up error redirectionHowever 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 redirectionThis 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 par\
\t
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/fra\
\gment:#%{url/fragment}}
compute.pool:path/1
transient.path:2
4 Start processesThis 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. |
||||||||||