CLI Reference¶
Introduction¶
The foundations CLI allows users to interact with monitors created and scheduled using Orbit's built-in scheduler.
Apart from monitor creation, all interactions can also be done via the GUI.
Quick information on these commands can be found by running foundations --help.
Commands¶
Create¶
foundations monitor create
[--name MONITOR_NAME]
[--project_name PROJECT_NAME]
[--env scheduler_config]
<job-directory>
<command>
This command uses the directory to create a scheduled monitor. The command is the python script that will be used as an entrypoint to the monitor.
Positional Arguments
job-directory: The path to the directory used to create the monitor.command: The python file used to define the tasks performed by the monitor. The file path should be given from the root of the job-directory.
Optional Arguments
--name: A custom name for the monitor. Defaults to the command argument (without the extension) if not specified.--project_name: The project in which the monitor belongs. Defaults to the job directory name if not specified.--env: The configuration file use to specify the Orbit scheduler. If none is provided, it will look for a scheduler.config.yaml in the FOUNDATIONS_HOME directory.
Delete¶
foundations monitor delete
[--env scheduler_config]
<project_name>
<name>
This command will delete monitor identified by its name from with the specified project.
Note
Deleting a monitor via the CLI does not currently delete all historical jobs associated with the monitor. It is recommended to delete monitors via the GUI.
Positional Arguments
project_name: The project in which the monitor belongsname: The unique name within the project associated with the monitor
Optional Arguments
--env: The configuration file use to specify the Orbit scheduler. If none is provided, it will look for a scheduler.config.yaml in the FOUNDATIONS_HOME directory.
Pause¶
foundations monitor pause
[--env scheduler_config]
<project_name>
<name>
This command will halt the execution of the monitor. No resources are removed.
Positional Arguments
project_name: The project in which the monitor belongsname: The unique name within the project associated with the monitor
Optional Arguments
--env: The configuration file use to specify the Orbit scheduler. If none is provided, it will look for a scheduler.config.yaml in the FOUNDATIONS_HOME directory.
Resume¶
foundations monitor resume
[--env scheduler_config]
<project_name>
<name>
The command will set the monitor state to continue its execution based on the scheduled provided.
Positional Arguments
project_name: The project in which the monitor belongsname: The unique name within the project associated with the monitor
Optional Arguments
--env: The configuration file use to specify the Orbit scheduler. If none is provided, it will look for a scheduler.config.yaml in the FOUNDATIONS_HOME directory.