Changes between Version 27 and Version 28 of image-proxy

Show
Ignore:
Timestamp:
03/07/11 01:54:52 (8 years ago)
Author:
vjo (IP: 71.120.219.13)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • image-proxy

    v27 v28  
    33== Overview == 
    44 
    5 !ImageProxy is the mechanism used make same guest image available across multiple independent Eucalyptus sites. It downloads images based on their URLs (including support for Bittorrent) and registers them with appropriate cloud mechanism (e.g. Eucalyptus) using local user credentials. !ImageProxy is implemented as an Axis SOAP service that is provided with an image URL and a unique GUID and, which returns the EMI of the registered image. If the image is not present in the system, it is downloaded and registered, otherwise the EMI of the previously registered image is returned. 
     5!ImageProxy is a mechanism used to make the same guest image available across multiple independent Orca sites. It downloads images named by URLs (including support for Bittorrent URLs) and registers them with the site's cloud provider (e.g. Eucalyptus) using local user credentials. !ImageProxy is implemented as an Axis2 SOAP service that, when provided with an URL for an image and a site-unique GUID to name it, returns the EMI of the registered image. If the image is not present within the system, it is downloaded and registered; otherwise the EMI of the previously registered image is returned. 
    66 
    77== Installation == 
     
    1414}}} 
    1515 
    16  * edit the properties in configuration file "$IMAGEPROXY_SRC/trunk/src/main/resources/orca/imageproxy/imageproxy-settings.properties" concerning the real circumstance. E.g. 
     16 * Alter the properties file "$IMAGEPROXY_SRC/trunk/src/main/resources/orca/imageproxy/imageproxy-settings.properties" as desired for your site, e.g. 
    1717{{{ 
    1818# relative to installation directory IMAGEPROXY_HOME 
     
    2828... 
    2929}}} 
     30   Be sure to set impTestMode to "false" for a production environment. 
    3031 
    31  * Define the installation directory 
     32 * Define the following two environment variables as appropriate for your site.  
    3233{{{ 
    3334$ export IMAGEPROXY_HOME=/opt/imageproxy 
     
    3536}}} 
    3637 
    37  * !ImageProxy requires using an Axis2-capable servlet container. You can use one that comes with Axis2 distribution or for production deployment add Axis2 support to Tomcat. Download Axis2 (either binary distribution for stand-alone operation or WAR for running under Tomcat) from [http://axis.apache.org/axis2/java/core/download.cgi Axis2 download site]. 
    38   * For standalone operation unzip Axis2 zip into $IMAGEPROXY_HOME 
    39    * Define AXIS2_HOME 
    40 {{{ 
    41 $ export AXIS2_HOME=/opt/imageproxy/axis2-1.5.4 
    42 }}} 
    43    * Edit the Axis2 startup script (axis2server.sh in $AXIS2_HOME/bin) to include the Bittorrent  JNI (see below) library. Modify the line that looks like 
    44 {{{ 
    45 java $XDEBUG –classpath “$AXIS2_CLASSPATH” org.apache.axis2.transport.SimpleAxis2Server -repo “$AXIS2_HOME”/repository –conf “$AXIS2_HOME”/repository –conf “$AXIS2_HOME”/conf/axis2.xml $* 
    46 }}}  
    47    * to  
    48 {{{ 
    49 java $XDEBUG –Djava.library.path=”$IMAGEPROXY_HOME/lib” –classpath “$AXIS2_CLASSPATH” org.apache.axis2.transport.SimpleAxis2Server -repo “$AXIS2_HOME”/repository –conf “$AXIS2_HOME”/repository –conf “$AXIS2_HOME”/conf/axis2.xml $* 
    50 }}} 
    51   * For tomcat operation, install tomcat, place the Axis2 war into tomcat/webapps. Test by going to the Tomcat URL /axis2 e.g. http://localhost:8080/axis2 
    52    * Modify the tomcat startup.sh script to include the following environment variable definitions: 
     38 * !ImageProxy requires using an Axis2-capable servlet container. You can use the one that comes with the Axis2 distribution or, for a production deployment, add Axis2 support to Tomcat. Download Axis2 (either the binary distribution for stand-alone operation or WAR for running under Tomcat) from [http://axis.apache.org/axis2/java/core/download.cgi the Axis2 download site]. 
     39  * For standalone operation, unzip Axis2 zip into $IMAGEPROXY_HOME 
     40   * Modify the Axis2 start script (axis2server.sh in $AXIS2_HOME/bin) to include the following environment variable definitions: 
    5341{{{ 
    5442export IMAGEPROXY_HOME="/opt/imageproxy" 
    55 # java.library.path is picked up from LD_LIBRARY_PATH 
     43export LD_LIBRARY_PATH="$IMAGEPROXY_HOME/lib:$LD_LIBRARY_PATH" 
     44export PROXY_EUCA_KEY_DIR="$IMAGEPROXY_HOME/ec2" 
     45}}} 
     46  * For deployment under Tomcat, place the Axis2 war into the webapps directory in your Tomcat installation. Ensure that Tomcat is running, and test the installation by checking the following URL: http://$TOMCAT_HOST:$TOMCAT_PORT/axis2 
     47   * Modify the Tomcat startup.sh script to include the following environment variable definitions: 
     48{{{ 
     49export IMAGEPROXY_HOME="/opt/imageproxy" 
    5650export LD_LIBRARY_PATH="$IMAGEPROXY_HOME/lib:$LD_LIBRARY_PATH" 
    5751export PROXY_EUCA_KEY_DIR="$IMAGEPROXY_HOME/ec2" 
     
    6761}}} 
    6862   * '''NOTE1:''' prep_build.sh script attempts to download and patch some software components 
    69    * '''NOTE2:''' configure step depends on [http://monkey.org/~provos/libevent/ libevent library] and headers present in the system. If your system does not have libevent installed, it can be compiled and installed from source. Use the latest libevent from 1.4 series. To point configure step at the location of libevent headers and binaries, you can use CFLAGS and LDFLAGS environment variables. 
    70   * SOAP webservice for standalone Axis2 
     63   * '''NOTE2:''' configure step depends on having the [http://monkey.org/~provos/libevent/ libevent library] and headers present in the system. If your system does not have libevent installed, it can be compiled and installed from source. Use the latest libevent from 1.4 series. To point configure step at the location of libevent headers and binaries, you can use CFLAGS and LDFLAGS environment variables. 
     64   * '''NOTE3:''' Additional library and header dependencies checked for by configure are: OpenSSL, zlib, and libCURL. 
     65  * Compiling the SOAP webservice 
    7166{{{ 
    7267$ cd $IMAGEPROXY_SRC 
    73 $ mvn install 
    74 }}} 
    75   * For SOAP webservice for Tomcat additionally 
    76 {{{ 
    77 $ mvn axis2-aar:aar 
     68$ mvn install axis2-aar:aar 
    7869}}} 
    7970 * Install Eucalyptus credentials under $PROXY_EUCA_KEY_DIR by unzipping the Eucalyptus credentials archive in that directory 
    80  * Install the scripts under $IMAGEPROXY_HOME/scripts (location of the scripts can be adjusted in imageproxy-settings.properties file prior to compilation and deployment, however the path is always relative to $IMAGEPROXY_HOME). 
     71 * Install the scripts under $IMAGEPROXY_HOME/scripts (the location of the scripts can be adjusted in imageproxy-settings.properties file prior to compilation and deployment, however the path is always relative to $IMAGEPROXY_HOME). 
    8172{{{ 
    8273$ mkdir $IMAGEPROXY_HOME/scripts 
     
    8475}}} 
    8576 * Deploy the service 
    86   * For standalone Axis2 copy the jar file and start the service  
     77  * For standalone Axis2, copy the jar file into the services directory and start the service  
    8778{{{ 
    8879$ cp target/imageproxy-1.0-SNAPSHOT.jar $AXIS2_HOME/repository/services/ 
    8980$ $AXIS2_HOME/axis2server.sh 
    9081}}} 
    91   * For running under Tomcat copy the aar file and restart tomcat 
     82  * For running under Tomcat, copy the aar file into the services directory and restart Tomcat 
    9283{{{ 
    9384$ cp target/imageproxy-1.0-SNAPSHOT.aar $TOMCAT_ROOT/webapps/axis2/WEB-INF/services 
    9485$ $TOMCAT_ROOT/shutdown.sh; $TOMCAT_ROOT/startup.sh 
    9586}}} 
    96  * Start the seeding process for BT download: 
     87 * Start the seeding process for Bittorrent downloads: 
    9788{{{ 
    98 $ $IMAGEPROXY_HOME/bin/seeding $IMAGEPROXY_HOME 
     89$ cd $IMAGEPROXY_HOME 
     90$ nohup ./bin/seeding $IMAGEPROXY_HOME > $IMAGEPROXY_HOME/logs/seeding.log & 
    9991}}} 
    10092 
    10193== Testing == 
    102  
    103  * Visit the axis2 server http://localhost:8080/axis2/services and observe the IMAGEPROXY service  
    104  * Run the client site to register an image 
     94 * Ensure that the IMAGEPROXY service is present by visiting the appropriate URL. 
     95  * By default under the Axis2 standalone container: http://localhost:8080/axis2/services 
     96  * Under Tomcat: http://$TOMCAT_HOST:$TOMCAT_PORT/axis2/services  
     97 * Run the test client to register an image. A brief usage description can be obtained by running: 
    10598{{{ 
    10699$ $IMAGEPROXY_HOME/scripts/run.sh --help