Upload and run your own processor
In this section, we learn how to integrate a new processor on the CTEP.
Suitable processors include:
- Linux executables
- shell scripts
- python scripts Other script languages can be supported, please contact us if you have a specific need.
In a first step, we start with a very basic shell script which adds two integers and returns the result in a text file. This example illustrates how the integration mechanism works.
The shell script is the following:
The script has to start with #!/bin/sh
, and must have execution rights applied (chmod +rx
). Notice that the script has two input variables $1
and $2
, and that output results are placed in the CTEP_OUTPUT_DIR
folder. The last point is important: this will allow the CTEP to know where to retrieve the processing results.
To upload the processor, create a targz archive with this file. Assuming the file is called proc1.sh
, the command is
tar cvzf proc1.sh.tar.gz proc1.sh
.
Now we need to create new processor on the CTEP and define its parameters. Go to the Processor Integration interface.
Use the interface to create a new processor ("New" button), then edit it. The "Info" tab lets you define the processor name and provide a short description. The "Visibility" button lets you share your processor with other users once you consider it validated.
Now go to the "Inputs" tab to define input parameters:

Note that a processor needs at least one input parameter to run correctly.
Go to the execution panel and enter the path of your processor. The path is relative to the root directory of your archive file.
We have now completely documented the processor. Press "create" to register it in the CTEP.
The last step is uploading the processor archive. Go back to the main page by clicking on "All Processors".
The processor status is "Waiting for a binary". Click on the Upload button and select your compressed file.

Once the upload is completed, refresh the page: the status should be "Ready".

Going back to the Geobrowser, you will see the new processor in the "Processors" tab:

If you launch the processor, the submission form will match the input parameters that you have defined:

When debugging a new processor, it is useful to check the execution log. In the processing Results tab, click on the info button 'i'.