Overview
If you have a supercomputing allocation, then your workflow will involve some of these steps.
The first is how do you perform authentication in the context of a (non-interactive) submitted job - use the delegate command.
pshell can be then run from the command line to perform stand alone commands.
It can also be given a script containing any number of commands that will be executed sequentially.
iblis:~> pshell -h usage: pshell [-h] [-c CONFIG] [-i SCRIPT] [-d] [command] pshell help positional arguments: command optional arguments: -h, --help show this help message and exit -c CONFIG The server in $HOME/.mf_config to connect to -i SCRIPT Input script file containing commands -d Turn debugging on
Exercises
Exercise 1 - create a delegate and check that pshell is using it.
Perform the following:
- run pshell and log in using your Pawsey credentials
- examine your identity
- create a delegate
- exit and restart pshell
- check your identity
You will only be able to do this exercise if you've logged in with a Pawsey user account. Delegate identities are not allowed to create further delegates.
Exercise 2 - running commands from the shell
Run pshell from the command line to:
- check your identity,
- list the contents of the Data Team/testfiles remote folder,
- download a single file.
Exercise 3 - script a task to download a file in your directory.
Perform the following:
- create a text file to change into the Demo/<yourname> directory and download a file
- use this script as input to pshell
Exercise 4 - script a task that attempts to perform something that will fail (eg remove a directory that doesn't exist) and correctly report that the script encountered an error.
Perform the following:
- write a shell (eg bash) script to run a single pshell command that will fail
- based on the exit code being 0 if successfull and non 0 on failure, report a problem