Globus Online CLI and Advanced Scripting

Tutorial Agenda

Section 1: CLI walkthrough

1.1 Understand the CLI command structure:

1.2 Map your public ssh key to your Globus Online account:

$ open www.globusonline.org/account/ManageIdentities

1.3 Get help:

$ ssh lchilders@cli.globusonline.org
$ help
$ man endpoint-list

1.4 Interact with endpoints you are authorized to use:

$ endpoint-activate nersc#dtn alcf#dtn
$ endpoint-activate xsede#*
$ endpoint-list *#dtn
$ endpoint-list -v -p nersc#dtn
$ endpoint-add -h
$ endpoint-modify -h
$ exit

1.5 Initiate 1TB transfer:

$ echo "alcf#dtn/intrepid-fs0/users/childers/persistent/datasrc/sdata/10Kfiles10G/10-100files10G/ nersc#dtn/project/projectdirs/mpccc1/childers/data/dest/sdata/cdc9/10-100files10G/ -r" | ssh lchilders@cli.globusonline.org transfer
$ ssh lchilders@cli.globusonline.org details

1.6 Find a task by label, not taskid:

$ ssh lchilders@cli.globusonline.org modify --label gw12 taskid
$ ssh lchilders@cli.globusonline.org details -t label=gw12 |more

1.7 Increase the reliability of transfer submissions:

$ ssh lchilders@cli.globusonline.org transfer --generate-id
$ echo "alcf#dtn/intrepid-fs0/users/childers/persistent/datasrc/sdata/10Kfiles10G/9-100files10G/ nersc#dtn/project/projectdirs/mpccc1/childers/data/dest/sdata/cdc9/9-100files10G/ -r" | ssh lchilders@cli.globusonline.org transfer --taskid=taskid
$ echo "alcf#dtn/intrepid-fs0/users/childers/persistent/datasrc/sdata/10Kfiles10G/9-100files10G/ nersc#dtn/project/projectdirs/mpccc1/childers/data/dest/sdata/cdc9/9-100files10G/ -r" | ssh lchilders@cli.globusonline.org transfer --taskid=taskid

1.8 Play with task foregrounding and backgrounding:

$ ssh lchilders@cli.globusonline.org wait taskid
hit ctrl-c
$ ssh lchilders@cli.globusonline.org scp alcf#dtn:/intrepid-fs0/users/childers/persistent/datasrc/sdata/10Kfiles10G/2-100files10G/ nersc#dtn:/project/projectdirs/mpccc1/childers/data/dest/sdata/cdc9/ -r --label=non_detached_scp
hit ctrl-c
$ ssh lchilders@cli.globusonline.org scp alcf#dtn:/intrepid-fs0/users/childers/persistent/datasrc/sdata/10Kfiles10G/2-100files10G/ nersc#dtn:/project/projectdirs/mpccc1/childers/data/dest/sdata/cdc9/ -r -D --label=detached_scp
Note that other supported task types include rm/delete, mkdir, ls, checksum tests
$ open www.globusonline.org/xfer/ViewTransfers

1.9 Examine event logs:

$ ssh -t dtn01.nersc.gov
$ chmod u= /project/projectdirs/mpccc1/childers/data/dest/sdata/cdc9/
$ ssh lchilders@cli.globusonline.org details taskid
$ ssh lchilders@cli.globusonline.org events -f help
$ ssh lchilders@cli.globusonline.org events -f code,time -O kv taskid | tail -20
$ chmod u=rwx /project/projectdirs/mpccc1/childers/data/dest/sdata/cdc9/
$ open a report describing a prior run
$ ssh lchilders@cli.globusonline.org events -f code,time -O kv taskid | tail -40

1.10 Cancel tasks:

$ ssh lchilders@cli.globusonline.org cancel taskid
$ ssh lchilders@cli.globusonline.org events -f code,time -O kv taskid | tail -10
$ ssh lchilders@cli.globusonline.org details taskid
$ ssh lchilders@cli.globusonline.org details -t taskid | more
$ ssh lchilders@cli.globusonline.org details -t -O kv taskid | grep -c "completion_code=CANCELED"
$ ssh lchilders@cli.globusonline.org details -t -O kv -f completion_code,src_file taskid | grep "completion_code=SUCCEEDED" | more
$ ssh lchilders@cli.globusonline.org details -t -O kv -f completion_code,src_file --succeeded taskid | more

1.11 Innoculate your scripts against future GO version changes:

$ ssh lchilders@cli.globusonline.org versions
$ ssh lchilders@cli.globusonline.org v=transfer/1.2:go-dir-xfer/gw11-cli-tutorial-example endpoint-list

Section 2: Example script inspection

$ open www.globusonline.org/demo-script/

Section 3: Port script to your environment

Raise your hand for help

Section 4: Share interesting script ideas and requirements

Share your ideas during the tutorial, in our new Globus Online forum, or by sending email to support@globusonline.org