Skip to content

Latest commit

 

History

History
266 lines (214 loc) · 8.03 KB

features.md

File metadata and controls

266 lines (214 loc) · 8.03 KB

Proctor CLI Feature

proctor config

Set configuration to run proctor. Proctor client keep the configuration on ~/.proctor/proctor.yaml

Params

Key Description Required
PROCTOR_HOST Host address of proctor service yes
EMAIL_ID Email account for auth process no
ACCESS_TOKEN Account access token for auth process no

Example

foo@bar:~$ proctor config PROCTOR_HOST=proctor.com [email protected] ACCESS_TOKEN=MR_PROCTOR
Proctor client configured successfully

proctor config show

Use this command to show current configuration

Example

foo@bar:~$ proctor config show
PROCTOR_HOST: proctor.com
EMAIL_ID: [email protected]
ACCESS_TOKEN: MR_PROCTOR

proctor describe <proc>

Use this command to learn more about <proc>

Params

Key Description Required
<proc> Name of proc yes

Example

foo@bar:~$ proctor describe echo-worker
Description                              I will echo your name
Contributors                             Mr.Proctor
Organization                             Proctor
Authorized Groups                        []

Args
name                                     name to echo

proctor execute <proc> <params>

Execute proc on server with specified params

Params

Key Description Required
<proc> Name of proc yes

Other params depend on proc requirements

Example

foo@bar:~$ proctor execute echo-worker name=Mr.Proctor
Executing Proc                           echo-worker
With Variables
name                                     Mr.Proctor

Execution Created
ID                                       1826735143124102
Name                                     proctor-1289c792631

Streaming logs
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor

Execution completed.

proctor help

Show proctor client help text

Example

foo@bar~:$ proctor help
A command-line interface to run procs

Usage:
  proctor [command]

Available Commands:
  config      Configure proctor client
  describe    Help on executing a proc
  execute     Execute a proc with given arguments
  help        Help about any command
  list        List procs available for execution
  logs        Get logs of an execution context
  schedule    Create scheduled procs
  status      Get status of an execution context
  template    Get input template of a procs
  version     Print version of Proctor command-line tool

Flags:
  -h, --help   help for proctor

Use "proctor [command] --help" for more information about a command.

proctor list

Show list of available procs

Example

foo@bar~:$ proctor list
List of Procs:

echo-worker                              echo-worker

For detailed information of any proc, run:
proctor describe <proc>

proctor logs <execution-id>

Stream logs from executed proc, this process will continue until execution complete

Params

Key Description Required
<execution-id> Execution ID generated by execute command yes

Other params depend on proc requirements

Example

foo@bar:~$ proctor logs 1826735143124102
Getting logs
ID                                       1826735143124102

Streaming logs
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor
Mr.Proctor


Execution completed.

proctor schedule <proc> <params>

Run a proc on scheduled basis specified with cron format

Params

Key Description Required
<proc> Proc name to scheduled yes

Flags

Flag Description Required
--cron -c Schedule in cron format (link) yes
--group -g Group Name yes
--notify -n Email to notify schedule progress yes
--tags -T Schedule tags for management purpose yes

Example

foo@bar:~$ proctor schedule echo-worker name=Mr.Proctor -g proctor -c '0 2 * * *' -T 'proctor' -n [email protected]
Creating Scheduled Job                   echo-worker
With Variables
name                                     Mr.Proctor
Scheduled Job UUID : 269349349056612582

proctor schedule describe <schedule-id>

Get more information about scheduled proc

Params

Key Description Required
<schedule-id> Schedule id to learn yes

Example

foo@bar:~$ proctor schedule describe 269349349056612582
ID                                       269349349056612582
PROC NAME                                echo-worker
GROUP NAME                               proctor
TAGS                                     proctor
Cron                                     0 0 2 * * *
Notifier                                 [email protected]

Args
name                                     Mr.Proctor

proctor schedule list

Get list of scheduled procs

Example

foo@bar:~$ proctor schedule list
ID                                       PROC NAME                      GROUP NAME           TAGS
269349349056612582                       diagnose-vm                    system-test          test,proctor

proctor schedule remove <\schedule-id>

Remove scheduled procs

Params

Key Description Required
<schedule-id> Schedule id to remove yes

Example

foo@bar:~$ proctor schedule remove 269349349056612582
Sucessfully removed the scheduled job ID: 269349349056612582

proctor status <execution-id>

Get status of executed proc

Params

Key Description Required
<execution-id> Execution id to get yes

Example

foo@bar:~$ proctor status 1826735143124102
Getting status
ID                                       1826735143124102
Job Name                                 echo-worker
Status                                   FINISHED
Updated At                               2019-10-03 04:00:58.083798 +0000 +0000
Execution completed.