Skip to content

Instruction on How to Run the Video Processing Prototype

kyolee310 edited this page Mar 19, 2013 · 3 revisions

Return to Introduction to Video Processing Cloud Application

Instructions on How to Run the Video-Processing Prototype

Prior to running the video-processing prototype, it is necessary that you understand the inner-workings of the instance image and the user-data in Eucalyptus.
Please read the wiki page How to Prepare an Instance Image for Dynamic Tasks for detailed information.

Preparations

Eucalyptus -

  • Verify that Eucalyptus (higher than 2.0) is running and functioning properly.

Instance Image -

  • Prepare the Ubuntu instance image by following the instructions on the page How to Prepare an Instance Image for Dynamic Tasks.
  • Verify that the prepared instance image is loaded to Walrus (More Information at http://open.eucalyptus.com/wiki/images).

    $ euca-describe-images
    IMAGE emi-9BD01749 tmpUsFuEvLYK2/renderer-ubuntu-070211-x86_64.img.manifest.xml admin available public x86_64 machine eki-B2F713A4 eri-836B12D4
    IMAGE eri-836B12D4 tmpiOBbt4G4EA/initrd-2.6.27.21-0.1-xen.manifest.xml admin available public x86_64 ramdisk
    IMAGE eki-B2F713A4 tmpaVHex7R0hR/vmlinuz-2.6.27.21-0.1-xen.manifest.xml admin available public x86_64 kernel

File Server -

  • Set up the file server whose directory "www/scriptserver" is reachable by the cloud instances. Please check out the section “Setting up the File Server” on the page How to Prepare an Instance Image for Dynamic Tasks for details.
  • Store all the necessary files (listed in the section “Script used in the prototype” below) under the directory "www/scriptserver".
  • Verify that the files are downloadable from the instances via 'wget'
    ex. Given the File Server IP 192.168.7.77,
    wget http://192.168.7.77/scriptserver/collector.pl

How to Run the Prototype.

1. Upload the input video file "lovemycat.avi" to the file server’s directory "www/scriptserver"

  • Verify the input video file is downloadable via 'wget'
    wget http://192.168.7.77/scriptserver/lovemycat.avi

2. Start the collector instance

  • User-Data Syntax: -d "<instance_script_name> <file_server_IP> [ <input_video_name ]"
    Ex.
    euca-run-instances emi-9BD01749 -k mykey0 -n 1 -g group0 -t c1.medium -d “collector.pl 192.168.7.77 [lovemycat.avi]”
  • Identify the private IP of the collector instance via 'euca-describe-instances'
    Ex.

    $ euca-describe-instances
    RESERVATION r-2C4B055E admin group0
    INSTANCE i-4C43097C emi-9BD01749 192.168.10.221 10.219.1.2 running mykey0 0 c1.medium 2011-11-18T05:47:24.954Z test00 eki-B2F713A4 eri-836B12D4

3. Start the processor instances

  • User-Data Syntax: -d "<instance_script_name> <file_server_IP> [ <collector_IP> <GIMP_script_name> ]"
    Ex.
    euca-run-instances emi-9BD01749 -k mykey0 -n 3 -g group0 -t c1.medium -d “processor.pl 192.168.7.77 [10.219.1.2 neon.scm]”

4. Wait until all the processor instances go away

5. Retrieve the processed video file from the collector instance

  • Log into the collector instance using its public IP
    Ex.
    ssh -i mykey0.priv root@192.168.10.221
  • Check the directory '/export/storage' for an AVI file

Scripts used in the prototype

Instance Scripts

  • collector.pl – Creates the “collector” cloud instance
  • processor.pl – Creates the “processor” cloud instance

GIMP Image-filter Scripts

The scripts below are used by the open-source software GIMP for image-processing.

  • mblur.scm
  • gblur.scm
  • neon.scm
  • edge.scm
  • invert.scm
  • threshold.scm

Other Scripts

  • whatami.pl – Reads the “user-data” and runs another script. Baked into the instance image.
  • rc.local – Modified to run the script "whatami.pl" at boot-up. Baked into the instance image.
  • s3curl.pl – Optional. Needed if using S3 for storage.

Be sure to store all the files under the directory "www/scriptserver" of the File Server.

You can’t perform that action at this time.