The National Virtual Observatory |
This session is an introduction to the NVO Summer School (NVOSS) software provided for the course. We will review the general organisation of the NVOSS software and check that all the software you will require for the Summer School is correctly installed.
Hopefully you will have already installed the software you need on your laptop without any problems. As a reminder, installation instructions can be found:
The software page also provides a list of known issues that it is worth checking if you encounter any problems.
We have a simple test to make sure that at least the Java part of the installation is set up properly. First you should have set the environment variable NVOSS_HOME to point to the top level directory of the NVOSS software tree and run the setup script:
> cd $NVOSS_HOME > source bin/setup.csh NVOSS_HOME = /Users/mjg/Projects/nvoss/nvoss2006 JAVA_HOME = /Library/Java/Home/ ANT_HOME = /Users/mjg/Projects/nvoss/nvoss2006/java/apache-ant-1.6.5 CATALINA_HOME = /Users/mjg/Projects/nvoss/nvoss2006/java/apache-tomcat-5.5.17 All set up for the 2006 NVO Summer School.
Now change to the java subdirectory and type:
> ant
You should then see:
Buildfile: build.xml
init:
[mkdir] Created dir: .../test/classes
compile:
[echo] building
[javac] Compiling 1 source file to .../test/classes
test:
[junit] Testsuite: sumsch.TestInstall
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed 0.375 sec
clean:
[delete] Deleting directory ...test/classes
BUILD SUCCESSFUL
Note: You will need to source bin/setup.csh (or setup.sh or setup.cmd depending on your environment) every time you start a fresh login session on your laptop (this can include a new window).
Testing the setups for MySQL and Python will be covered in later sessions today.
If we do a listing of the top level directory in the Summer School software packge:
> ls $NVOSS_HOME bin iraf perl sql csharp java php voclient idl nesssi python
we see that there is a subdirectory for each of the main programming languages that we support in the Summer School and subdirectories called bin, nesssi and voclient. The latter two will be covered by later talks this week but exist at this level in the structure since they contain code in more than one language.
As a general rule, most high-level directories in the software package contain a README/readme or HOWTO file describing what the purpose of it and any subdirectories is and possibly containing further specific setup or installation instructions.
Now let's look at the bin directory:
> ls $NVOSS_HOME/bin adminclient downloadmanager.cmd topcat adminclient.cmd mirage topcat.cmd aladin mirage.cmd validate aladin.cmd setup.cmd validate.cmd bouncetomcat setup.csh voplot bouncetomcat.cmd setup.sh voplot.cmd convertADQL starttomcat wsdl2java convertADQL.cmd starttomcat.cmd wsdl2java.cmd demofits stilts xalan demofits.cmd stoptomcat xalan.cmd downloadmanager stoptomcat.cmd
This contains scripts to manage various server tools and VO applications. This directory is already in your execution path (if you have done source bin/setup.csh or the appropriate one for your platform) so you can call these from anywhere.
The VO applications will be covered in a later talk but we should say a few words about the server tools.
Apache Tomcat 5.5.17 - a Java web servlet container
Apache Axis 1.2.1 Final - a Java web services container
Apache Ant 1.6.5 - a Java-based software build tool
NOTE: While there are more current versions of Tomcat and Axis available, the recommended configurations used here are critical for correct performance of the exercises. There are dependencies between Tomcat, Axis, and JDK that require careful attention due to changes in class structure or added/deprecated features.
Ant
Ant is an very useful platform independent build system for Java and is used thoughout the NVOSS exercises for configuration and testing. It's not exactly make nor is it exactly a scripting language but it covers a little of both. Everything in ant is a task and tasks may depend on other tasks. All tasks are defined in xml files. The default name for the file is build.xml. When you type ant it looks for a file called build.xml to execute tasks. The xml file is structured as a project which contains properties and targets. The targets generally contain the tasks. Any target may be specified on the the command line after ant is invoked so to get the cone classes compiled we could do
> ant compile
NOTE: If we do not specify a target for ant then the default target is used. This is specified in the project declaration
<project name="cone build file" default="dist" base dir=".">
Tomcat
Apache Tomcat is the servlet container that is we use to serve jsp, Java servlets and Axis-deployed services. It is referred to as a 'container' because it is the software repository to which we copy and store ('deploy') our local services. Since we run Tomcat as a local server in these exercises, a few key utilities were created in the NVOSS setup file and are required when deploying a new service. You can test these by running one at a time the following commands:
> starttomcat
Using CATALINA_BASE: /Users/mjg/Projects/nvoss/nvoss2006/java/apache-tomcat-5.5.17
Using CATALINA_HOME: /Users/mjg/Projects/nvoss/nvoss2006/java/apache-tomcat-5.5.17
Using CATALINA_TMPDIR: /Users/mjg/Projects/nvoss/nvoss2006/java/apache-tomcat-5.5.17/temp
Using JRE_HOME: /Library/Java/Home/
Now have a look at http://localhost:8080.
NOTE: If you are running a firewall on your laptop, you might have to open port 8080.
> stoptomcat
Using CATALINA_BASE: /Users/mjg/Projects/nvoss/nvoss2006/java/apache-tomcat-5.5.17
Using CATALINA_HOME: /Users/mjg/Projects/nvoss/nvoss2006/java/apache-tomcat-5.5.17
Using CATALINA_TMPDIR: /Users/mjg/Projects/nvoss/nvoss2006/java/apache-tomcat-5.5.17/temp
Using JRE_HOME: /Library/Java/Home/
> bouncetomcat
Axis
We are using Apache Axis to implement SOAP ("Simple Object Access Protocol") for the development of Java Web Services. Axis also provides several Java libraries for serializing and deserializing objects. It is the tool which allows us to convert web services created in other languages into a set of Java classes. You will see several instances of this used throughout the course. This will be covered in greater depth in a later talk.
Finally let's have a look at the Java language directory:
> ls $NVOSS_HOME/java README_DOS.txt bin test README_linux.txt build.xml vomegaplot-1.0 apache-ant-1.6.5 data voplot-1.3 apache-tomcat-5.5.17 lib voplot3d-1.0 axis-1_2_1 mirage basicjava src
There are a number of legacy items here, directories for various applications, a data directory which is used by several applications, a lib directory containing Java jar files and the src directory. This last directory contains a subdirectory for each Java software package which themselves should contain a README and a build.xml file.
The NVO Summer School is made possible through the support of the National Science Foundation and the National Aeronautics and Space Administration.
![]() |