Changes between Version 1 and Version 2 of PetascopeEmbedded


Ignore:
Timestamp:
Dec 18, 2015 1:04:40 PM (22 months ago)
Author:
pbaumann
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PetascopeEmbedded

    v1 v2  
    33= Embedded petascope with Jetty (Alpha phase) =
    44
    5 ''This is the temporary for preparing next enhance of Rasdaman Server. User could have a look but could not follow yet (because it is still testing to make sure it work stably)''
     5== Overview ==
     6Jetty is a Web server and javax.servlet container which can be bundled with an application.
     7Petascope can be deployed with a standard servlet container like tomcat, or it can make use of the bundled jetty container to run out of the box without any further installation and configuration.
    68
    7 == What is Jetty? ==
    8 Jetty provides a Web server and javax.servlet container, plus support for SPDY, WebSocket, OSGi, JMX, JNDI, JAAS and many other integrations. These components are open source and available for commercial use and distribution. Small to large enterprise applications. SaaS (such as Zimbra), Cloud Applications( such as Google AppEngine), Applications Servers(such as Apache Geronimo) [[http://www.eclipse.org/jetty/]]
     9Following successful installation of rasdaman with jetty enabled, the petascope Web service gets automatically started by the general rasdaman launch script `start_rasdaman.sh`.
    910
    10 == Why embedded? ==
    11 Jetty has a slogan, "Don't deploy your application in Jetty, deploy Jetty in your application." What this means is that as an alternative to bundling your application as a standard WAR to be deployed in Jetty, Jetty is designed to be a software component that can be instantiated and used in a Java program jrather than putting your application into an HTTP server. [https://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty]
     11After successful start, petascope accepts requests according to OGC W*S standards at `http://localhost:8080/rasdaman/ows`.
     12Further, the SECORE Coordinate Reference System Resolver (CRS) service is available at `http://localhost:8080/def`.
    1213
    13 == How to install embedded petascope ==
     14== How to run petascope with jetty ==
    1415
    15 === Where is Jetty folder in Rasdaman source code? ===
     16In the download directory, jetty is located in rasdaman folder `$RMANHOME/applications/petascope/jetty`.
     17This folder contains:
     18* def.war # this is the CRS (Coordinate Reference System) for Petascope.
     19* jetty.jar # this is Jetty Servlet application is embedded to Petascope Web application.
     20* README.txt # a file to help you how to build Jetty embedded with Petascope with java JDK by manually. (User need to copy file rasdaman.war (View 3.2 above) to this directory to run it).
     21* start_petascope.class # a compiled java application to start Jetty with Petascope (view README.txt to see how to run this application).
     22* start_petascope.java # a java source code application to start Jetty with Petascope (user could change port, extracted temporary folder of Jetty, view README.txt to see how to compile this application).
    1623
    17 
    18 When user download rasdaman source code, the default folder of Jetty with start_petascope application in ''YourDownloadedPath/rasdaman/applications/petascope/jetty'' (Usually user need to create username 'rasdaman', so the default path is ''/home/rasdaman/rasdaman/applications/pettascope/jetty'')
    19 
    20 
    21 === Should I need to install Petascope with Jetty alone? ===
    22 
    23 
    24 User don't need to install Petascope with Jetty alone, it is added in "compile and install" when user "./configure && make && make install" before.
    25 '''NOTE:''' If you want to rebuild Petascope by hand, you could do this (after you type './configure' in main folder 'YourDownloadedPath/rasdaman/')
    26 {{{
    27 #!sh
    28    cd YourDownloadedPath/rasdaman/applications/petascope/
    29    make  # this will rebuild Petascope and create rasdaman.war file in folder YourDownloadedPath/rasdaman/applications/petascope/build/dist (*)
    30    make install # this will copy Jetty files in folder YourDownloadedPath/rasdaman/applications/petascope/jetty with rasdaman.war in (*) to default folder for Petascope and Jetty (NOTE: now is: /usr/local/rasdaman/share/rasdaman/war)
    31    
    32 }}}
    33 
    34 ===  What is inside Jetty folder? ===
    35 {{{
    36 #!sh
    37 Jetty folder of YourDownloadedPath/rasdaman/applications/petascope/jetty includes:
    38 
    39   + def.war # this is the CRS (Coordinate Reference System) for Petascope.
    40 
    41   + jetty.jar # this is Jetty Servlet application is embedded to Petascope Web application.
    42 
    43   + README.txt # a file to help you how to build Jetty embedded with Petascope with java JDK by manually. (User need to copy file rasdaman.war (View 3.2 above) to this directory to run it).
    44 
    45   + start_petascope.class # a compiled java application to start Jetty with Petascope (view README.txt to see how to run this application).
    46 
    47   + start_petascope.java # a java source code application to start Jetty with Petascope (user could change port, extracted temporary folder of Jetty, view README.txt to see how to compile this application).
    48 
    49 }}}
     24The configuration and `make install` process produces `$RMANHOME/share/rasdaman/war/rasdaman.war`.
    5025
    5126=== How to start Jetty embedded with Petascope? === 
    5227
    53 
    54 Automatically, when you start rasdaman by running script ''start_rasdaman.sh'' (default is in /usr/local/rasdaman/bin/start_rasdaman.sh), this script will check Jetty embedded with Petascope has been started or not (if you've run it by manually before).
    55 User could view that Jetty has worked or not by checking:
    56 {{{
    57 #!sh
    58    ps -ef | grep [r]asdaman/war/jetty.jar # This could make sure only view the Jetty embedded with Petascope not your Jetty server
    59    
    60    To check Jetty has done, check the address localhost:PORT/rasdaman/ows # PORT: default is 8080, but you could change to another port to avoid conflict with your existed web/application (view below).
    61  
    62    To start rasdaman server, in terminal type: start_rasdaman.sh
    63 }}}
    6428
    6529=== How to stop Jetty embedded with Petascope? ===
     
    9155== Troubleshooting ==   
    9256
     57Q: Cannot start petascope/jetty to listen for Web requests.
     58* A: In most cases, the reason is that the default port is in use by another web service application program. View 3.4 and 3.6 above to figure out and handle this problem.
    9359
    94 In most cases, Jetty could not start by default port has been taken from another web, application program, view 3.4 and 3.6 above to figure out and handle this problem.
     60Q: How can I check whether jetty is up and running?
     61* A: You can check the process table, and contact the service endpoint to see whether it gives a response:
     62{{{
     63#!sh
     64ps -ef | grep asdaman/war/jetty.jar
     65wget http://localhost:8080/rasdaman/ows
     66}}}
    9567
    9668
    97 '''NOTE:''' The other problems will belong to Petascope when user could start web page http://localhost:PORT/rasdaman/ows and this will be tested to make sure no problem from Jetty will effect to Petascope.
     69== For developers ==
    9870
    99 '''(to be updated for new errors in next beta version)'''
     71Rebuilding petascope manually can be done as follows (after having run './configure' in `$RMANHOME`):
     72{{{
     73#!sh
     74   cd $RMANHOME/applications/petascope/
     75   make  # this will rebuild Petascope and create rasdaman.war file in folder YourDownloadedPath/rasdaman/applications/petascope/build/dist (*)
     76   make install # this will copy Jetty files in folder YourDownloadedPath/rasdaman/applications/petascope/jetty with rasdaman.war in (*) to default folder for Petascope and Jetty (NOTE: now is: /usr/local/rasdaman)
     77   
     78}}}