Changes between Version 45 and Version 46 of DICLOUD/GEC12tutorial


Ignore:
Timestamp:
10/28/11 13:12:43 (13 years ago)
Author:
David Irwin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DICLOUD/GEC12tutorial

    v45 v46  
    11= !DiCloud Tutorial at GEC12 =
    22
    3 This page summarizes the !DiCloud tutorial from GEC 12. Slides can be found here.
     3This page summarizes the !DiCloud tutorial from GEC 12. Slides can be found [http://groups.geni.net/geni/attachment/wiki/DICLOUD/GEC12tutorial/GEC12tutorial.pptx here].
    44
    55Tutorial sections:
     
    1818 * '''Tutorial: Running a Gush experiment using !DiCloud and Orca'''
    1919
    20 The sections labeled as Setup have already been performed on each tutorial participants' VM image, and can be skipped by tutorial participants. Directions on how the tutorial image for GEC12 was setup are available [http://groups.geni.net/geni/wiki/GEC12VMSetup here].  We provide them here as an example of how to setup an independent !DiCloud deployment from scratch.  Note that the setup assumes a user geni exists, and that all !DiCloud files (from [http://geni.cs.umass.edu/dicloud-tutorial.tgz here]) are located in the directory ~/Tutorials/DiCloud. 
     20The sections labeled as Setup have already been performed on each tutorial participants' VM image, and can be skipped by tutorial participants. Directions on how the tutorial image for GEC12 was setup are also available [http://groups.geni.net/geni/wiki/GEC12VMSetup here].  We provide them here as an example of how to setup an independent !DiCloud deployment from scratch.  Note that the setup assumes a user geni exists, and that all !DiCloud files (from [http://groups.geni.net/geni/attachment/wiki/DICLOUD/GEC12tutorial/dicloud-tutorial.tgz here]) are located in the directory ~/Tutorials/DiCloud. 
    2121
    2222== Tutorial: Pre-requisites ==
     
    5151$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    5252$ sudo apt-get update
     53$ sudo apt-get install keychain
    5354$ sudo apt-get install sun-java6-jdk
    5455$ sudo apt-get install maven2
     
    6263MySQL server will ask you to set a root password. Remember the password.
    6364
    64 Finally, we need to sym-link apache's /var/www directory to ~/Tutorials/DiCloud/www to make the web portal available, and change the permissions of ~/Tutorials/DiCloud/www to be owned by www-data (the apache user).
     65We need to sym-link apache's /var/www directory to ~/Tutorials/DiCloud/www to make the web portal available, and change the permissions of ~/Tutorials/DiCloud/www to be owned by www-data (the apache user).
    6566
    6667{{{
     
    7677}}}
    7778
     79Finally, we create sym-links to all the keys in the top-level directory to reduce the typing we must do in the console.
     80
     81{{{
     82sudo ln -s /home/geni/Tutorials/DiCloud/ec2/keys/geni_cert.pem /geni_cert.pem
     83sudo ln -s /home/geni/Tutorials/DiCloud/ec2/keys/geni_pk.pem /geni_pk.pem
     84sudo ln -s /home/geni/Tutorials/DiCloud/ec2/keys/geni_cert_web.pem /geni_cert_web.pem
     85sudo ln -s /home/geni/Tutorials/DiCloud/ec2/keys/geni_pk_web.pem /geni_pk_web.pem
     86sudo ln -s /home/geni/Tutorials/DiCloud/ec2/keys/geni-keypair.pem /geni-keypair.pem
     87}}}
     88
    7889== Setup: Configure !DiCloud's MySQL Server ==
    7990
     
    179190== Tutorial: Using the !DiCloud console ==
    180191
    181 Open a new terminal.  We run ntpdate to make sure the time is accurate.  Amazon will fail calls from machines with inaccurate local time.  Also, note that we will use the Amazon Machine Image ami-7f418316 for all VMs.  This is a basic VM image that runs a 32-bit version of Linux.  Amazon has thousands of images available for use, including Windows images.
     192Open a new terminal.  We run ntpdate to make sure the time is accurate.  Amazon will fail calls from machines with inaccurate local time.  Also, note that we will use the Amazon Machine Image ami-013d6c44 for all VMs in the us-west-1 region.  This is a basic VM image that runs a 32-bit version of Debian Linux.  Amazon has thousands of images available for use, including Windows images.
    182193
    183194{{{
     
    187198dicloud - not connected>connect localhost 1099
    188199Connecting to //localhost:1099/dicloud/server
    189 dicloud - //localhost:1099>ec2 start /home/geni/Tutorials/DiCloud/ec2/keys/geni_cert......
     200dicloud - //localhost:1099>ec2 start /geni_cert.pem /geni_pk.pem ami-013d6c44 1 m1.small us-west-1 geni-keypair
    190201dicloud - //localhost:1099>help
    191202Commands available for the main menu are:
     
    234245dicloud - //localhost:1099>get balance
    235246Current balance is: $99.53222835338767
    236 dicloud - //localhost:1099>ec2 probe /home/geni/Tutorials/DiCloud/ec2/keys/geni_cert.pem /home/geni/Tutorials/DiCloud/ec2/keys/geni_pk.pem i-b87b74d8 us-west-1 ascii
     247dicloud - //localhost:1099>ec2 probe /geni_cert.pem /geni_pk.pem i-b87b74d8 us-west-1 ascii
    237248Instance Id: i-b87b74d8
    238249AMI Id: ami-7f418316
     
    262273{{{
    263274dicloud - //localhost:1099>s3 create gec12-tutorial-1 us
    264 dicloud - //localhost:1099>s3 put gec12-tutorial-1 test /home/geni/Tutorials/DiCloud/dicloud/bin/dicloud.properties
    265 Uploading file /home/geni/Tutorials/DiCloud/dicloud/bin/dicloud.properties as object test in bucket gec12-tutorial-1
     275dicloud - //localhost:1099>s3 put gec12-tutorial-1 test /home/geni/Tutorials/DiCloud/s3_test
     276Uploading file /home/geni/Tutorials/DiCloud/s3_test as object test in bucket gec12-tutorial-1
    266277dicloud - //localhost:1099>s3 get gec12-tutorial-1 test /home/geni/Tutorials/DiCloud/test
    267278Downloading file /home/geni/Tutorials/DiCloud/test from object test in bucket gec12-tutorial-1dicloud - //localhost:1099>
     
    271282Example use of EBS
    272283{{{
    273 dicloud - //localhost:1099>ebs create /home/geni/Tutorials/DiCloud/ec2/keys/geni_cert.pem /home/geni/Tutorials/DiCloud/ec2/keys/geni_pk.pem 1 us-west us-west-1a
    274 dicloud - //localhost:1099>ebs delete /home/geni/Tutorials/DiCloud/ec2/keys/geni_cert.pem /home/geni/Tutorials/DiCloud/ec2/keys/geni_pk.pem <volume_id> us-west
     284dicloud - //localhost:1099>ebs create /geni_cert.pem /geni_pk.pem 1 us-west us-west-1b
     285dicloud - //localhost:1099>ebs delete /geni_cert.pem /geni_pk.pem <volume_id> us-west
    275286}}}
    276287
     
    310321{{{
    311322$ cd ~/Tutorials/DiCloud/gush/
     323$ cp ~/Tutorials/DiCloud/ec2/keys/geni-keypair.pem ~/.ssh/id_rsa
     324$ cp ~/Tutorials/DiCloud/ec2/keys/geni-keypair.pub ~/.ssh/id_rsa.pub
    312325$ keychain ~/.ssh/id_rsa
    313326$ ./gush -P 15000
     
    335348    <software name="SimpleSoftwareName" type="none">
    336349      <package name="Package" type="web">
    337         <path>http://localhost/software.tar</path>   //Software tarball
     350        <path>http://geni.cs.umass.edu/software.tar</path>   //Software tarball
    338351        <dest_path>software.tar</dest_path>
    339352      </package>
     
    398411=== Start Gush ===
    399412
    400 Now we are ready to run our example. The following shows the output from a run using two clients. You only need to type the commands that appear after "gush>".
    401 
    402 {{{
     413Now we are ready to run our example. First, we need to set the appropriate hostnames on each host.  Next, the following shows the output from a run using two clients. You only need to type the commands that appear after "gush>".
     414
     415{{{
     416$ ssh root@<Amazon IP 1> “hostname <Insert IP 1>”
     417$ ssh root@<Amazon IP 2> “hostname <Insert IP 2>”
    403418$ ./gush -P 15000
    404419gush>