Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a folder (ex: SciGaP) in a preferable location in your local machine to clone the PHP samples from GitHub. 
  2. Open the created SciGaP folder (...../ cd SciGaP) and clone the files using GitHuB ‘HTTPS clone URL’    
    git clone https://github.com/SciGaP/Airavata-PHP-Client-Samplesgit-wip-us.apache.org/repos/asf?p=airavata.git 
    Once the cloning is completed you would get a completed message. 
  3. Open the folder which contains the PHP sample scripts. 
    SciGaP → Airavata-PHP-Client-Samples → client-samples → airavata/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples
  4. client-samples  folder contains PHP scripts to exercise currently existing Airavata API methods;
    1. GetAPIVersion.php (a sanity check)
    2. add-compute-resources.php
    3. createProject.php
    4. updateProject.php
    5. getAllUserProjects.php
    6. createExperiment.php
    7. getExperiment.php
    8. updateExperiment.php
    9. cloneExperiment.php
    10. getAllExperimentsInProject.php
    11. getAllUserExperiments.php
    12. launchExperiment.php
    13. getExperimentStatus.php
    14. getExperimentOutputs.php
    15. terminateExperiment.php
    16. list-application-interfaces.php
    17. list-compute-resources.php
    18. airavata-client-api-tester.php
  5. Apart for the scripts for the API methods the folder contains;
    1. airavata-client-properties.ini - contains the server. port and timeout period information
    2. README-PHP-CLI-Examples.txt - Gives the script execution order
  6. Navigation to working directory; 
    cd SciGaP/Airavata-PHP-Client-Samples/client/airavata/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples

Tutorial II - Sanity Check

...

  1. To clone above modified experiment use cloneExperiment.php.
  2. Cloning will create exact copy of the existing experiment with a new experiment ID in CREATED state. 
  3. To clone the experiment use;
    1. php cloneExperiment.php
    2. Format:
      php cloneExperiment.php<space><exp_ID>
  4. Experiment modification confirmation message;
    1. Experiment<space><exp_ID><space>cloned!
  5. User can clone any experiment created by him/her irrespective of the experiment status.
  6. User can change existing information by updating the newly created experiment.
  7. Tutorial tryout;
    1. Try adding parameters to the script to change other data in the new experiment. E.g.: Exp name, Application, Resource, etc… and execute.

Tutorial VI - Search Experiments

...

Get All Experiments In Project

...

  1. To view all experiments created by a single user we use getAllUserExperiments.php.
    1. Format:
      php getAllUserExperiments.php<space><username>
  2. All the experiments and their details created by the given user/username will be listed.
Search Experiment by Experiment Name
  1. Experiments can be searched by providing username along with experiment name or part of the experiment name.
    1. Format;
      php search_experiments_by_name.php<space><username><space><experiment_name>
    2. Example;
      php search_experiments_by_name.php Test_User Exp
  2. When the script is executed; all the experiments which has the given text as part of the name will be listed along with all experiment information.

Search E

Tutorial VII - Launch & Cancel Experiments

...

  1. Once the experiment is COMPLETED (Status of the experiment is checked using above getExperimentStatus.php) user can check the output. 
  2. To check the output  
    1. Format; 
      php getExperimentOutputs.php<space><experiment_id>

 

Image - Sample output

Tutorial IX - List Applications

...

List Application Interfaces

...