Skip to content

Standalone CLI client tool

Jorge edited this page Jan 22, 2022 · 12 revisions

Standalone pfconclient CLI client

The CLI client provides seven subcommands:

  1. auth: Fetch and print authorization token from remote pfcon service
  2. run: Run plugin until finished and get the resulting files in a local directory
  3. submit: Submit plugin for execution and return without waiting for the plugin to finish
  4. poll: Keep polling for the execution status of a previously submitted plugin until it finishes
  5. status: Perform a single check on the execution status of a previously submitted plugin
  6. download: Download the output files of a previously submitted plugin that has already finished
  7. delete: Delete a a previously submitted plugin from the remote compute

auth subcommand

$> pfconclient http://localhost:30006/api/v1/ auth --pfcon_user pfcon --pfcon_password pfcon1234

run subcommand

Run fs plugin until finished using any local input directory and get the resulting files in a local output directory:

$> pfconclient http://localhost:30006/api/v1/ -a <token> run --jid chris-jid-10 --cmd_args '--saveinputmeta --saveoutputmeta --dir cube/uploads' --cmd_path_flags='--dir' --auid cube --number_of_workers 1 --cpu_limit 1000 --memory_limit 200 --gpu_limit 0 --image fnndsc/pl-simplefsapp --selfexec simplefsapp --selfpath /usr/local/bin --execshell python3 --type fs /tmp/sbin/in /tmp/sbin/out/chris-jid-10

Run ds plugin until finished using the local output directory of a previous plugin as its input directory and get the resulting files in a local output directory:

$> pfconclient http://localhost:30006/api/v1/ -a <token> run --jid chris-jid-11 --cmd_args '--saveinputmeta --saveoutputmeta --prefix lolo' --auid cube --number_of_workers 1 --cpu_limit 1000 --memory_limit 200 --gpu_limit 0 --image fnndsc/pl-simpledsapp --selfexec simpledsapp --selfpath /usr/local/bin --execshell python3 --type ds /tmp/sbin/out/chris-jid-10 /tmp/sbin/out/chris-jid-11

submit subcommand

Submit fs plugin for execution using any local input directory and return without waiting for the plugin to finish:

$> pfconclient http://localhost:30006/api/v1/ -a <token> submit --jid chris-jid-12 --cmd_args '--saveinputmeta --saveoutputmeta --dir cube/uploads' --cmd_path_flags='--dir' --auid cube --number_of_workers 1 --cpu_limit 1000 --memory_limit 200 --gpu_limit 0 --image fnndsc/pl-simplefsapp --selfexec simplefsapp --selfpath /usr/local/bin --execshell python3 --type fs /tmp/sbin/in

Submit ds plugin for execution using the local output directory of a previously finished plugin as its input directory and return without waiting for the plugin to finish:

$> pfconclient http://localhost:30006/api/v1/ -a <token> submit --jid chris-jid-13 --cmd_args '--saveinputmeta --saveoutputmeta --prefix lolo' --auid cube --number_of_workers 1 --cpu_limit 1000 --memory_limit 200 --gpu_limit 0 --image fnndsc/pl-simpledsapp --selfexec simpledsapp --selfpath /usr/local/bin --execshell python3 --type ds /tmp/sbin/out/chris-jid-11

poll subcommand

Keep polling for the execution status of a previously submitted plugin until it finishes:

$> pfconclient http://localhost:30006/api/v1/ -a <token> poll --jid chris-jid-12

status subcommand

Perform a single check on the execution status of a previously submitted plugin:

$> pfconclient http://localhost:30006/api/v1/ -a <token> status --jid chris-jid-13

download subcommand

Download the output files of a previously submitted plugin that has already finished:

$> pfconclient http://localhost:30006/api/v1/ -a <token> download --jid chris-jid-13 /tmp/sbin/out/chris-jid-13

delete subcommand

Delete a previously submitted plugin from the remote compute:

$> pfconclient http://localhost:30006/api/v1/ -a <token> delete --jid chris-jid-13
Clone this wiki locally