Lunarc Application Portal

Installation

The Lunarc Application Portal is a Python-based application portal for running jobs on grid-resources. The portal is based on the WebWare for Python application server and the NorduGrid/ARC Middleware. However, the portals also have the following extra dependencies:

The general steps in installing the portal are as follows:

  1. Download and install WebWare for Python.
  2. Create a WebWare application instance for the Lunarc Application Portal.
  3. Download and install dependencies.
  4. Download the Lunarc Application Portal source and extract it in the previously created application intance.
  5. Configure the Lunarc Application Portal.
  6. Configure the Apache webserver.
  7. Start the Lunarc Application server.
  8. Start the Apache webserver.

To make it easier to install the Lunarc Application Portal a special installation script can be used to install and configure the portal, which is also the recommended way of installing the portal. Using the portal installer - setup-lap.py

The installer can be downloaded using the following steps:

# cd /tmp
# wget http://heanet.dl.sourceforge.net/sourceforge/...
    laportal/setup-lap.py
    ...
100%[=========================>] 35,237       169K/s   in 0.2s   
 
13:55:14 (169 KB/s) - `setup-lap.py' saved [35237/35237]
 
# chmod +x setup-lap.py

The installer is the started by entering ./setup-lap.py. The installer first checks that all requirements are installed. If all goes well an initial configuration menu is shown:

# ./setup-lap.py
 
---------------------------------------
Checking for prerequisites.
---------------------------------------
 
Checking for wget.  Found.
Checking for tar.  Found.
Checking for uname.  Found.
Checking for gunzip.  Found.
Checking for ARC client tools.  Found.
Checking for Apache Extension Tool (APXS).  Found.
Checking for ARC installation dir. Found.
Checking for Python based ARCLib.  Found.
 
---------------------------------------
Lunarc Application Portal - Setup 0.1
---------------------------------------
 
Please set the installation options:
 
        1.  Portal application directory name    : lap
        2.  Portal version                       : 0.8.4
        3.  Target installation directory        : /opt
        4.  WebWare version                      : 0.9.4
 
Enter option to change. (Enter = accept, 0 = quit) :

The installer now displays a menu of configuration options with default values. Most of the values can be accepted. The default installation directory of the portal is /opt/lap. This can be changed in with the 1 and 3 menu options. A configuration option can be changed by entering a number in the menu and pressing the [Enter] key. As shown below:

Enter option to change. (Enter = accept, 0 = quit) :1
1
 
Portal application directory name = lap
 
New value (Enter = No Change) : 

Press [Enter] to accept the default value or enter a new value and press [Enter].´The installation options are accepted by pressing [Enter] in the configuration menu. If the installation should be aborted, enter zero and press [Enter].

The installation continues by downloading and installing WebWare for Python:

---------------------------------------
Installing WebWare for Python
---------------------------------------
 
Downloading WebWare...
--> Webware-0.9.2.tar.gz                [Downloaded]
Extracting WebWare...
Setting up WebWare...
...
..
.
Welcome to Webware!
 
...

Installation is finished.

...

Webware installed at: /opt/Webware-0.9.2

In the next step, the apache interface module is built and installed.

---------------------------------------
Building WebWare Apache Module
---------------------------------------
 
/usr/sbin/apxs -i -n webkit mod_webkit.la
/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/apr-1/...
/usr/lib/apr-1/build/libtool --mode=install cp mod_webkit.la ...
cp .libs/mod_webkit.so /usr/lib/httpd/modules/mod_webkit.so
cp .libs/mod_webkit.lai /usr/lib/httpd/modules/mod_webkit.la
cp .libs/mod_webkit.a /usr/lib/httpd/modules/mod_webkit.a
chmod 644 /usr/lib/httpd/modules/mod_webkit.a
ranlib /usr/lib/httpd/modules/mod_webkit.a
PATH="$PATH:/sbin" ldconfig -n /usr/lib/httpd/modules
-----------------------------------------------------------------
Libraries have been installed in:
   /usr/lib/httpd/modules
 
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
  - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
  - add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
  - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
  - have your system administrator add LIBDIR to `/etc/ld.so.conf'
 
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
-----------------------------------------------------------------
chmod 755 /usr/lib/httpd/modules/mod_webkit.so

Now the WebWare install is complete and a WebWare application instance can be created.

---------------------------------------
Creating WebWare application instance
---------------------------------------
 
Creating application dir...
Executing,  ./MakeAppWorkDir.py -c context /opt/lap
The target directory already exists.
Adding everything needed for a WebKit runtime directory...
 
Creating the directory tree...
...
Copying config files...
...
Copying other files...
...
Creating the launcher scripts...
...
Creating default context...
...
Updating config for default context...
        /opt/lap/Configs/Application.config
 
Congratulations, you've just created a runtime 
working directory for Webware.

To start the app server you can run this command:
 
    /opt/lap/AppServer
 
.
.
.
 
Have fun!

Now most of the prerequisites for the portal have been installed, so in the next step, the portal itself is installed and any needed dependencies.

---------------------------------------
Downloading Lunarc Application portal
---------------------------------------
 
Downloading portal...
--> lap-config-0.8.4-20070427.tar.gz            [Downloaded]
--> lap-layout-0.8.4-20070427.tar.gz            [Downloaded]
--> lap-plugins-0.8.4-20070427.tar.gz           [Downloaded]
--> lap-source-0.8.4-20070427.tar.gz            [Downloaded]
Extracting portal...
 
---------------------------------------
Downloading and installing dependencies
---------------------------------------
 
Downloading dependencies...
Downloading jsdomenubar 1.1.1...
...
Downloading HyperText 1.0.1...
...
Installing jsdomenubar...
Patching jsdommenubar...
patching file jsdomenubar.js
Installing HyperText...

The portal instance is now completed. The next step is to configure the portal. A special configuration menu is shown.

---------------------------------------
Configuring Lunarc Application Portal
---------------------------------------
 
Please set the portal configuration options
 
1.  Portal installation directory                : xxx
2.  Portal dependency installation directory     : xxx
3.  Portal startup log file                      : xxxx
4.  Portal log file                              : xxx
5.  NorduGrid ARC installation directory         : xxxx
6.  Portal plugin directory                      : xxxx
7.  Default mail server                          : xxxxx
8.  Portal group id                              : xxxx
9.  Portal process id file                       : xxxxx
10. Portal user id                               : xxxx
11. Portal job session directory                 : xxxxx
12. Portal Virtual Organisation administrator    : xxx
13. WebWare installation directory               : xxxx
14. WebWare log file                             : xx
 
Enter option to change. (Enter = accept, 0 = quit) :

Most of the options can be accepted, however review the directory structure and make sure it is ok for your system. Important! Make sure the groupid and userid, options 8 and 10, in the menu corresponds to a valid user on your system. When the options are accepted, the installer will create the following configuration files:

To use the portal the init-script must be installed in /etc/init.d. The installer-script handles init-scripts for RH/CentOS based Linux-distributions, but it should not be difficult to modify the script for other distributions as well. The script is installed using the following procedure:

# cp /opt/lap/init/lap /etc/init.d
# chkconfig --add lap

To test the portal, start the apache web-server, and then start the portal using:

# service lap start
Starting LAP:                                         [  OK  ]

To make sure the portal is enter the following command:

# ps aux |grep ThreadedAppServer
apache   ....   14:41   0:00 python ./Launch.py ThreadedAppServer

The portal is now ready to be used. Direct the browser to https://localhost/lap/ and the initial page of the portal should be shown.