SQL MA Installation guide r1.3 v1
From GEANT2-JRA1 Wiki
Contents |
[edit]
Step 1 - Installing Java Development Kit (JDK) 2 Platform
- Current version of Java is recommended
- Download and extract Java from http://java.sun.com/javase/downloads/index.jsp
- Set env variable JAVA_HOME pointing Java, example:
export JAVA_HOME=/usr/share/jdk1.6.0
[edit]
Step 2 - Installing Apache Ant
- Apache Ant is a Java-based build tool
- Download Ant from http://ant.apache.org/bindownload.cgi and install.
- Set env variable ANT_HOME pointing Ant, example:
export ANT_HOME=/usr/share/apache-ant-1.7.0
[edit]
Step 3 - Extracting perfSONAR package
- Execute the following command to extract files from tar file
tar xvfz perfSONAR-SQL-MA-1.3.tar.gz
- Clear o unset env variable CLASSPATH
unset CLASSPATH
(From now on created directory is called $PERFSONAR)
[edit]
Step 4 - Pre-install step
- Execute the following command in $PERFSONAR/perfsonar/ant directory to make basic service configuration
ant -q pre-install
Warning: You have to install xml database eXist (the way you will do it, as a web application in your instance of Tomcat or stand-alone one, it's up to you)!
- Pre-install script asks the following questions:
- 'Enter the name of the service [perfSONAR-SQL-MA-1.3]' - The script asks for symbolic name. This name will be present in the address URL of the service. In square brackets you can find suggested name.
- 'Enter the path where you want to install the service [/opt/perfsonar/webapps]' - The script asks for the location of the service files to be stored. In square brackets you can find suggested path.
- 'Do you want me to download and install the application server Tomcat (apache-tomcat-6.0.7) for you? (y,n)' - Application server Tomcat is a container for the service. It contains the implementation of HTTP protocol which is used by the service to send and receive messages (NMWG). If you already have it in your system you can answer 'n'.Tomcat version 6.0.7 is suggested.
- 'Enter the path for the Tomcat installation: [/opt/perfsonar/apache-tomcat-6.0.7]' - If you wanted to download Tomcat then the script asks you where to put it. The location path is suggested in square brackets.
- 'Enter a URL of the Tomcat download (mirrors can be found on http://tomcat.apache.org/) [1]' - The script suggests mirror server to be used for downloading.
- 'Enter the address (ip or hostname) of your application server Tomcat [localhost]' - The script asks for the address of Tomcat which will be used to run the service. This address is suggested in square brackets.
- 'Enter the port which will be used by your application server Tomcat [8080]' - The script asks for port number which will be used by Tomcat and the service to send and receive messages (HTTP). The port number is suggested in square brackets. If you want to have other port number then you have to setup Tomcat to use this new one as well. To do it open Tomcat's configuration file conf/server.xml and alter the port number in the Connector element :<Connector port="8080" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000"redirectPort="8443" />
- 'Usage of eXist xml database is recommended for the service. Installing/configuring this database as a web application in your Tomcat is also suggested. Do you want me to do this for you? (y,n)' - The service contains the metadata configuration which is suggested to be stored in the xml database eXist. If you want to have the metadata configuration as a plain text file you may expect that the service will be slower in generating responses. Using eXist as a web application you can use your Tomcat to install the xml database.
- 'Do you want me to download eXist web application package (if not you have to do it manually)? (y,n)' - The script can download xml database eXist as a web application package automatically. It is possible the time of downloading might be long. In such case download eXist manually.
- 'Enter a URL of eXist web application package (exist-1.0.1.war) [2]' - If you wanted the script to download eXist then you can see suggested server to be used for downloading.
- 'Enter the path of directory where eXist war file will be located [/opt/perfsonar]' - If you wanted the script to download eXist then you can see suggested location where eXist will be stored.
- 'Enter the eXist user name' - The script asks for xml database user name (it could be for example sqlmaservice).
- 'Enter the pasword for eXist user' -The script asks for the password for xml database user.
- 'Enter the password for admin eXist user []' - The script asks for the password for xml database admin user. If this is the first installation of eXist then the password is empty.
- 'Do you want me to download eXist web application package (if not you have to do it manually)? (y,n)' - The script can download xml database eXist as a web application package automatically. It is possible the time of downloading might be long. In such case download eXist manually.
[edit]
Step 5 - Configure step
- Execute the following command in $PERFSONAR/ant directory to make operational service configuration
ant -q configure
- Configure script asks the following questions:
- 'Enter the path of sql metadata config file [/opt/perfsonar/conf/sql-database_TEST.xml]' - The script asks for the metadata configuration file. This file contains the description of measurement data stored in relation database. The test file in square brackets is suggested only for test purposes (you can use it for the first test service installation).
- 'Do you want the service to accept messages with measurement data and store them? (y,n)' - The service can receive messages with measurement data and store them in relational database.
- 'Turn on service registration to Lookup Service? (y,n)' - The service can register itself to the Lookup Service. The Lookup Service stores the information about running perfSONAR services in the network.
[edit]
Step 6 - Deploy step
- Execute the following command in $PERFSONAR/ant directory to deploy the service in Tomcat application server
ant -q deploy
- Deploy script asks the following questions:
- 'Do you want me to start the application server Tomcat for you? (y,n)' - The script can start Tomcat with the service inside but there is also a possibility to do it manually.
- The script will ask you to check if Tomcat has finished its startup phase. You can use web browser and connect to your Tomcat's web page or take a look at Tomcat's log file logs/catalina.out (after startup phase you should find there a line 'INFO: Server startup in xxx ms')
- 'Do you want me to add new user sqlmaservice (provided in the pre-install step) and initiate the xml database eXist (If your eXist is already configured and initialized for SQL MA answer 'n'. But probably it's your first run of this installation script so you have not added this user and initialized the database yet.) ? (y,n)' - In case of use of the xml database eXist it needs to be set up (this means it must have an account and the metadata configuration specified in the pre-install and configure steps of the installation procedure). If the xml database already has been set up the answer should be 'n'.
[edit]
Step 7 - Test step (optional)
- Execute the following command in $PERFSONAR/ant directory to test whether the service has been installed correctly
ant test
[edit]
Step 8 - Undeploy step (optional)
- Execute the following command in $PERFSONAR/ant directory to undeploy the service from Tomcat application service
ant -q undeploy
- Undeploy script asks the following question:
- 'Do you want me to shutdown the application server Tomcat for you? (y,n)' - The script can shutdown Tomcat with the service.
[edit]
Useful commands
[edit]
Pause the service which is already deployed
ant -q stop (now the service does not respond) ant -q start (now the service can respond)
[edit]
Change the admin password in eXist xml database
By default admin password is not set up in eXist xml database. To set up a new password for admin user run the following command
ant -q xmldb-password-sqlma
[edit]
Change the metadata configuration file while the service is already deployed and running
- Change the name of the metadata configuration file in $PERFSONAR/conf/service.properties file (property service.ma.conf_file)
- Execute the following command in $PERFSONAR/ant directory
ant xmldb-init-sqlma
