Skip to content

remotescripts app

Expanding on the trackermaps app, this app tries to generalize remote script execution from certhelper, mainly to facilitate adding and customizing execution of tools which must be run on other computers (such as the vocms066).

A script configuration is composed of:

  • The script itself,
  • Input Arguments (either positional or keyword) and
  • File products generated by the script

flowchart LR
    arg1[Positional Argument 1] --> script[Script Configuration] 
    arg2[Positional Argument 2] --> script
    argdot[Positional Argument ...] --> script  
    kwarg1[Keyword Argument 1] --> script
    kwarg2[Keyword Argument 2] --> script   
    kwargdot[Keyword Argument ...] --> script       
    script --> fp1[File Product 1]
    script --> fp2[File Product 2]  
    script --> fpdot[File Product ...]  
An overview of the dataflow for executing a script can be seen below:

flowchart LR
    User --> View[View w/ Automatically generated form]
    View -- Using script configuration --> thread[Thread]
    thread -- Execute script via SSH --> remote[Remote Machine]
    remote -- stdout + file products --> thread
    thread -- WebSocket --> fe["FrontEnd (stdout + file products)"]

WebSockets are used for real-time updating of the front-end with the scripts' console output, status updates and images created. This is implemented by using Django Channels, channels_redis and a Redis server which acts as the backing store.