Skip to content

Saga Python on OSDC

mturilli edited this page Jul 4, 2013 · 3 revisions

Setup Cloud Environment for SAGA-Python

  1. Make sure that you can log into Sullivan:

     ssh -l <user> sullivan.opensciencedatacloud.org
    
  2. Generate new key pair for use with OSDC:

      ssh-keygen -f $HOME/.ssh/osdc_rsa
    

    Leave passphrase empty (for this tutorial).

  3. Log into Admin Console

  4. Go to Access & Security

  5. Import twice the public key created above (the file is located at: $HOME/.ssh/osdc_rsa.pub) for the resource types: Sullivan Login Server and Sullivan Instances. Use the name OSDC for the keypair and note that the public key needs to be cut and pasted into the form.

Install SAGA-Python on Sullivan

See SAGA-Python documentation: http://saga-project.github.io/saga-python/.

Use SAGA-Python to manage VMs and submit jobs

  1. Use Example example-saga-osdc.py as basis. Use OSDC config file as a basis:

     export OS_USERNAME=xxxxxxxxxxxxxx
     export OS_PASSWORD=xxxxxxxxxxxxxx
     export OS_AUTH_URL="http://10.103.114.3:5000/v2.0/"
     export EC2_URL=http://10.103.114.3:8773/services/Cloud
     export EC2_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
     export EC2_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

Running the example with no options will print a help message. Explore all options (-c to create a VM, -l to list VMs, instance types and images, -u to use a VM, i.e. to submit jobs, and -d to destroy VMs. Don't forget to destroy the VMs, as to not waste resources...