r3 - 20 Jun 2005 - 15:52:58 - DaveMorrisYou are here: TWiki >  Astrogrid Web  >  DaveMorris > LedasDataCenterNotes

Install notes for Galahad data center

Install notes from installing PAL for the LEDAS data center. -- DaveMorris - 17 Jun 2005

Download the war file

Download latest war file astrogrid-pal-skycatserver-1.0.1-b003pl.war from our maven repository http://www.astrogrid.org/maven/org.astrogrid/wars/

Either using a web browser and SaveAs?, or command line in linux

curl \
--output astrogrid-pal-skycatserver-1.0.1-b003pl.war \
--url http://www.astrogrid.org/maven/org.astrogrid/wars/astrogrid-pal-skycatserver-1.0.1-b003pl.war

Install the war file

Copy the war file into the target tomcat webapp directory.

Unix command :

cp astrogrid-pal-skycatserver-1.0.1-b003pl.war $CATALINA_HOME/webapps/

File system :

$CATALINA_HOME
    |
    +-- bin
    |
    +- ....
    |
    +-- webapps
           |
           +- ....
           |
           +-- astrogrid-pal-skycatserver-1.0.1-b003pl.war

If tomcat is configured to auto-detect new webapps (on by default), then it will automatically unpack the war file and install the webapp. If not, you may need to re-start Tomcat to get it to recognise the new webapp.

Tomcat logs :

    [java] 17-Jun-2005 14:26:32 org.apache.catalina.core.StandardHostDeployer install
    [java] INFO: Installing web application at context path /astrogrid-pal-skycatserver-1.0.1-b003pl from URL file:$CATALINA_HOME/webapps/astrogrid-pal-skycatserver-1.0.1-b003pl

File system :

$CATALINA_HOME
    |
    +-- bin
    |
    +- ....
    |
    +-- webapps
           |
           +- ....
           |
           +-- astrogrid-pal-skycatserver-1.0.1-b003pl.war
           |
           +-- astrogrid-pal-skycatserver-1.0.1-b003pl
                   |
                   +- ....
                   |
                   +-- META-INF
                   |
                   +-- WEB-INF

This will have installed the basic vanilla PAL webapp as astrogrid-pal-skycatserver-1.0.1-b003pl.

You can check this works by pointing your browser at http://localhost:8080/astrogrid-pal-skycatserver-1.0.1-b003pl/.

Bug 1246 :

  • This fails because the webapp has not been configured yet.
  • The basic JSP pages fail if datacenter.url is not set in the webapp properties.

Fix :

  • Edit the default properties in WEB-INF/classes/default.properties.
  • Uncomment the default datacenter.url property.
  • Reload the webapp in TomcatManager? to load the new properties.
  • It is the wrong URL, but it lets you use the main JSP pages.
  • Configuring the right URL comes later.

Creating a new context

In many situations, a data center will need to publish several different PAL services, typically one for each dataset.

The LEDAS data center is a typical examples of this. The complete LEDAS data center has over 400 data sets, each of which will need to be published as a separate PAL service.

It is possible to deploy over 400 copies of the WAR file into Tomcat. However, this would mean 400 copies of all of the files in the webapp, 107 items, totalling 10.7 MB for each webapp.

A better way to handle this is to use Tomcat context files to add multiple webapps based on the same document root.

Create an XML file called ledas-one-context.xml containing the following element :

<Context path="/ledas-one"
   docBase="astrogrid-pal-skycatserver-1.0.1-b003pl"
   debug="9"
   reloadable="true"
   >
</Context>

Add this new context file to the Tomcat context files in $CATALINA_HOME/conf/Catalina/localhost.

File system :

$CATALINA_HOME
    |
    +-- bin
    |
    +- ....
    |
    +-- conf
         |
         +- ....
         |
         +-- Catalina
                |
                +-- localhost
                       |
                       +-- admin.xml
                       |
                       +-- ....
                       |
                       +-- ledas-one-context.xml

If tomcat is configured to auto-detect changes to context files (on by default), then it will automatically detect the new context file and deploy a new webapp. If not, you may need to re-start Tomcat to get it to recognise the new context file.

Tomcat logs :

    [java] 17-Jun-2005 16:03:42 org.apache.catalina.core.StandardHostDeployer install
    [java] INFO: Processing Context configuration file URL file:$CATALINA_HOME/conf/Catalina/localhost/ledas-one-context.xml

Once Tomcat has processed the new context file, we should now have two instances of the PAL webapp deployed in tomcat.

The second webapp uses the same set of source files, but creates a completely separate webapp using the path defined in the contect file.

If you look in the Tomcat work directory, you will see that it has created a separate working directory for the new webapp.

File system :

$CATALINA_HOME
    |
    +-- bin
    |
    +- ....
    |
    +-- work
         |
         +- ....
         |
         +-- Catalina
                |
                +-- localhost
                       |
                       +-- ....
                       |
                       +-- astrogrid-pal-skycatserver-1.0.1-b003pl
                       |        |
                       |        +-- ....
                       |
                       +-- ledas-one
                                |
                                +-- ....

Configuring new context

We can now use the new context file to configure the ledas-one webapp without affecting the original astrogrid-pal-skycatserver-1.0.1-b003pl webapp.

Start by adding the following to the context file.

<Context path="/ledas-one"
   docBase="astrogrid-pal-skycatserver-1.0.1-b003pl"
   debug="9"
   reloadable="true"
   >
   <!--+
      | Name and description.
      +-->
   <Environment name="datacenter.name" override="false" type="java.lang.String"
      value="LEDAS datacenter one"/>
   <Environment name="datacenter.description" override="false" type="java.lang.String"
      value="LEDAS datacenter one serice ...."/>
   <!--+
      | The URL 'stem' that would be used by other tools to reach this service.
      | Note : This MUST end in '/'
      +-->
   <Environment name="datacenter.url" override="false" type="java.lang.String"
      value="http://localhost:8080/ledas-one/"/>
</Context>

These settings are used to describe the service so that it can be discovered and used by othet Virtual Observatory tools.

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
AstroGrid Service Click here for the
AstroGrid Service Web
This is the AstroGrid
Development Wiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback