Version 21 (modified by ibaldin, 8 years ago)


Eucalyptus/XCat image proxy


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.


  • Download the source (latest tag or trunk). Env. variable IMAGEPROXY_SRC marks the location of the source.
    $ svn co imageproxy
    $ cd imageproxy
    $ export IMAGEPROXY_SRC=`pwd`
  • Define the installation directory
    $ export IMAGEPROXY_HOME=/opt/imageproxy
  • 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 Axis2 download site.
    • For standalone operation unzip Axis2 zip into $IMAGEPROXY_HOME
      • Define AXIS2_HOME
        $ export AXIS2_HOME=/opt/imageproxy/axis2-1.5.4
      • Edit the Axis2 startup script ( in $AXIS2_HOME/bin) to include the Bittorrent JNI (see below) library. Modify the line that looks like
        java $XDEBUG –classpath “$AXIS2_CLASSPATH” org.apache.axis2.transport.SimpleAxis2Server -repo “$AXIS2_HOME”/repository –conf “$AXIS2_HOME”/repository –conf “$AXIS2_HOME”/conf/axis2.xml $*
      • to
        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 $*
    • 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
      • Modify the tomcat script to include the following environment variable definitions:
        export IMAGEPROXY_HOME="/opt/imageproxy"
        # java.library.path is picked up from LD_LIBRARY_PATH
  • Build ImageProxy components
    • Bittorrent JNI
      $ cd $IMAGEPROXY_SRC/bittorrent_jni
      $ ./ 
      $ ./configure --prefix=$IMAGEPROXY_HOME --with-jdk=/path/to/jdk
      $ make
      $ make install
      • NOTE1: script attempts to download and patch some software components
      • NOTE2: configure step depends on 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.
    • SOAP webservice for standalone Axis2
      $ cd $IMAGEPROXY_SRC
      $ mvn install
    • For SOAP webservice for Tomcat additionally
      $ mvn axis2-aar:aar
  • Install Eucalyptus credentials under $PROXY_EUCA_KEY_DIR by unzipping the Eucalyptus credentials archive in that directory
  • Install the scripts under $IMAGEPROXY_HOME/scripts (location of the scripts can be adjusted in file prior to compilation and deployment, however the path is always relative to $IMAGEPROXY_HOME).
    $ mkdir $IMAGEPROXY_HOME/scripts
    $ cp $IMAGEPROXY_SRC/scripts/* $IMAGEPROXY_HOME/scripts
  • Deploy the service
    • For standalone Axis2 copy the jar file and start the service
      $ cp target/imageproxy-1.0-SNAPSHOT.jar $AXIS2_HOME/repository/services/
      $ $AXIS2_HOME/
    • For running under Tomcat copy the aar file and restart tomcat
      $ cp target/imageproxy-1.0-SNAPSHOT.aar $TOMCAT_ROOT/webapps/axis2/WEB-INF/services


Using with ORCA