Changes between Version 4 and Version 5 of DICLOUD/GEC12tutorial

10/17/11 15:31:33 (8 years ago)
David Irwin



  • DICLOUD/GEC12tutorial

    v4 v5  
    129129$ sudo chgrp www-data geni_cert_web.pem
     132== Setup Environment Variables ==
     135Step 5:  Setup environment variables
     139cd ~/Tutorials/DiCloud
     140nano environment
     142[ Insert correct from geni_aws_credentials.txt
     143    AWS_ACCESS_KEY_ID=
     144    AWS_SECRET_ACCESS_KEY= ]
     146cat environment >> ~/.bashrc
     149Add Access Key Id and Secret Access Key to .s3cfg file.
     150Copy .s3cfg file to ~geni
     153cp ~/Tutorials/DiCloud/.s3cfg ~/.s3cfg
     157== Run the DiCloud server ==
     160cd ~/Tutorials/DiCloud/dicloud/bin
     165Step 7: Using the DiCloud console
     168Open a new terminal.  We run ntpdate to make sure the time is accurate.  Amazon will fail calls from machines with inaccurate local time.
     171sudo ntpdate
     172cd ~/Tutorials/DiCloud/dicloud/bin
     174dicloud - not connected>connect localhost 1099
     175Connecting to //localhost:1099/dicloud/server
     176dicloud - //localhost:1099>ec2 start /home/geni/Tutorials/DiCloud/ec2/keys/geni_cert$
     177dicloud - //localhost:1099>help
     178Commands available for the main menu are:
     179add credit amount_of_money
     180   Add credit to the AWS account
     181billing history history_size csv|html
     182   Get the AWS account activity history in CSV or HTML format (a history of 0 retrie$
     183connect DiCloudServerHostName RmiPortNumber
     184   Connects to the DiCloud server
     185ebs attach cert.pem pk.pem ec2_region ebs_volume_id ec2_instance_id device_name
     186   Attach an EBS volume (ebs_volume_id) to the running instance (ec2_instance_id) as$
     187ebs create cert.pem pk.pem size_in_gb ec2_region ec2_availability_zone
     188   Create an EBS volume
     189ebs delete cert.pem pk.pem volume_id ec2_region
     190   Delete an EBS volume
     191ebs detach cert.pem pk.pem ec2_region ebs_volume_id
     192   Detach EBS volume ebs_volume_id from its EC2 instance
     193ebs probe cert.pem pk.pem volume_id ec2_region ascii|html
     194   Probe an EBS volume and get current status information
     195ec2 probe cert.pem pk.pem instance_id ec2_region html|ascii
     196   Check the status of a running EC2 instance
     197ec2 start cert.pem pk.pem ami_id instance_nb instance_type ec2_region ec2_keypair_na$
     198   Start a new EC2 instance
     199ec2 stop cert.pem pk.pem instance_id ec2_region ec2_keypair_name
     200   Stop an EC2 instance
     201get balance
     202   Get the AWS account balance
     204   Print this help message
     205history [<command index>]
     206   Display history of commands for the console.
     208   Quit the console
     209s3 create bucket_name region
     210   Create an S3 bucket
     211s3 delete bucket_name region
     212   Delete an S3 bucket
     213s3 get s3_bucket_name object_name file_path
     214   Get the content of an object named object_name into the specified file from the S$
     215s3 probe bucket_name region
     216   Get information about an S3 bucket
     217s3 put s3_bucket_name object_name file_path
     218   Put the content of the specified file in an object named object_name in the S3 bu$
     220   Shutdown the DiCloud server the console is currently connected to.
     221dicloud - //localhost:1099>get balance
     222Current balance is: $99.53222835338767
     223dicloud - //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-east-1 ascii
     224Instance Id: i-b87b74d8
     225AMI Id: ami-78f21911
     226Public name:
     227Private name: ip-10-244-46-161.ec2.internal
     228Public IP:
     229Private IP:
     230Instance State: running
     231Instance Type: m1.small
     232Key pair: geni-keypair
     233Start time: 2011-10-17T17:31:41+0000
     234Availability zone: us-east-1b
     235dicloud - //localhost:1099>quit
     238You can also script the DiCloud console. An example is below.
     241$ echo "connect localhost 1099
     242get balance
     243quit" > ./getbalance.txt
     244$ ./ -silent < ./getbalance.txt
     247Example use of S3
     250dicloud - //localhost:1099>s3 create gec12-tutorial-1 us
     251dicloud - //localhost:1099>s3 put gec12-tutorial-1 test /home/geni/Tutorials/DiCloud/dicloud/bin/
     252Uploading file /home/geni/Tutorials/DiCloud/dicloud/bin/ as object test in bucket gec12-tutorial-1
     253dicloud - //localhost:1099>s3 get gec12-tutorial-1 test /home/geni/Tutorials/DiCloud/test
     254Downloading file /home/geni/Tutorials/DiCloud/test from object test in bucket gec12-tutorial-1dicloud - //localhost:1099>
     255dicloud - //localhost:1099>s3 delete gec12-tutorial-1 us
     258Example use of EBS
     260dicloud - //localhost:1099>ebs create /home/geni/Tutorials/DiCloud/ec2/keys/geni_cert.pem /home/geni/Tutorials/DiCloud/ec2/keys/geni_pk.pem 1 us-east us-east-1a
     261dicloud - //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-east