Commands¶
After installing opengris-scaler, the following CLI commands are available:
Command |
Description |
|---|---|
Start a full stack from one TOML file (scheduler + one or more worker managers). |
|
Start only the scheduler process (and auto-start object storage when needed). |
|
Start one worker manager using a subcommand ( |
|
Start only the object storage server. |
|
Start the terminal monitoring dashboard for a scheduler monitor endpoint. |
|
Start the web monitoring GUI for a scheduler monitor endpoint. |
Command Arguments/Config Conventions¶
All commands support either command line or --config <toml config>/-c <toml config>. In practice, most deployments use TOML files.
Precedence:
Command-line flags > TOML settings > built-in defaults.Key naming: long CLI flags converted to snake case (for example,
--max-task-concurrency->max_task_concurrency).Unified launcher:
scalerreads[scheduler],[[worker_manager]],[object_storage_server],[top], and[gui]sections.
Command |
TOML section |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scaler¶
scaler is the all-in-one launcher. It reads one TOML file and starts any recognized
sections as separate processes.
[scheduler]starts the scheduler.[[worker_manager]]starts one worker manager per table entry.If
object_storage_addressis omitted in[scheduler], the scheduler auto-starts object storage atscheduler_address.port + 1.
$ scaler <toml config file>
Scaler examples¶
[scheduler]
scheduler_address = "tcp://127.0.0.1:6378"
# for following object_storage_address
# - if omitted, object storage is auto-started at scheduler port + 1
# - if specified, scheduler will connect to specified address without start one
# object_storage_address = "tcp://127.0.0.1:6379"
monitor_address = "tcp://127.0.0.1:6380"
policy_engine_type = "simple"
policy_content = "allocate=even_load; scaling=no"
logging_level = "INFO"
[gui]
monitor_address = "tcp://127.0.0.1:6380"
gui_address = "127.0.0.1:50001"
logging_level = "INFO"
[[worker_manager]]
type = "baremetal_native"
scheduler_address = "tcp://127.0.0.1:6378"
worker_manager_id = "wm-native"
mode = "dynamic"
max_task_concurrency = 8
event_loop = "builtin"
io_threads = 2
[[worker_manager]]
type = "aws_raw_ecs"
scheduler_address = "tcp://127.0.0.1:6378"
object_storage_address = "tcp://127.0.0.1:6379"
worker_manager_id = "wm-ecs"
ecs_subnets = "subnet-0abc123,subnet-0def456"
ecs_cluster = "scaler-cluster"
ecs_task_definition = "scaler-task-definition"
ecs_task_image = "public.ecr.aws/v4u8j8r6/scaler:latest"
aws_region = "us-east-1"
[[worker_manager]]
type = "aws_hpc"
scheduler_address = "tcp://127.0.0.1:6378"
object_storage_address = "tcp://127.0.0.1:6379"
worker_manager_id = "wm-batch"
job_queue = "scaler-job-queue"
job_definition = "scaler-job-definition"
s3_bucket = "my-scaler-bucket"
aws_region = "us-east-1"
Run command:
$ scaler config.toml
$ scaler config.toml
Scaler arguments¶
Argument |
Required |
Description |
|---|---|---|
|
Yes |
Path to a TOML file that contains |
If no recognized sections are present, scaler exits with an error.
scaler_scheduler¶
scaler_scheduler starts only the scheduler process. If --object-storage-address is
not supplied, object storage is created automatically on scheduler port + 1.
$ scaler_scheduler [options] <scheduler_address>
Scheduler examples¶
[scheduler]
scheduler_address = "tcp://127.0.0.1:6378"
# for following object_storage_address
# - if omitted, object storage is auto-started at scheduler port + 1
# - if specified, scheduler will connect to specified address without start one
# object_storage_address = "tcp://127.0.0.1:6379"
monitor_address = "tcp://127.0.0.1:6380"
policy_engine_type = "simple"
policy_content = "allocate=even_load; scaling=no"
logging_level = "INFO"
Run command:
$ scaler_scheduler --config scheduler.toml tcp://127.0.0.1:6378
$ scaler_scheduler tcp://127.0.0.1:6378 \
--object-storage-address tcp://127.0.0.1:6379 \
--monitor-address tcp://127.0.0.1:6380 \
--policy-engine-type simple \
--policy-content "allocate=even_load; scaling=no" \
--logging-level INFO
Scheduler arguments¶
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
Scheduler bind address (for example |
|
|
No |
Auto from scheduler address |
Object storage address (must be |
|
No |
Auto from scheduler address |
Monitor endpoint, defaults to |
|
No |
|
Protect scheduler/workers from client shutdown requests. |
|
No |
|
Max queued tasks while workers are saturated ( |
|
No |
|
Client heartbeat timeout. |
|
No |
|
Worker heartbeat timeout. |
|
No |
|
Object retention timeout. |
|
No |
|
Load-balance interval in seconds. |
|
No |
|
Consecutive identical balance advisories required before rebalance is triggered. |
|
No |
|
Event loop backend ( |
|
No |
|
I/O backend thread count. |
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
No |
|
Policy engine type selector. |
|
No |
|
Policy definition string. |
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
No |
|
Logging verbosity. |
|
No |
|
One or more logging outputs. |
|
No |
|
Python logging |
Argument |
Required |
Description |
|---|---|---|
|
No |
TOML config file path (uses |
Scheduler behavior notes¶
Protected mode¶
When --protected is enabled, client shutdown requests cannot stop the scheduler and workers.
$ scaler_scheduler tcp://127.0.0.1:8516 --protected
Event loop selection¶
The scheduler uses builtin event loop by default. You can switch to uvloop.
$ pip install uvloop
$ scaler_scheduler tcp://127.0.0.1:8516 -el uvloop
scaler_worker_manager¶
scaler_worker_manager is the unified worker-manager entry point. You select an adapter
with a subcommand and then pass shared and adapter-specific options.
$ scaler_worker_manager <subcommand> [options] <scheduler_address>
Available subcommands:
baremetal_nativesymphonyaws_raw_ecsaws_hpcorb_aws_ec2
When --config/-c is supplied, scaler_worker_manager reads the [[worker_manager]]
array from the TOML file and picks the entry whose type field matches the subcommand.
It is an error if no entry matches or if more than one entry matches.
Command-line flags always override TOML values.
Worker runtime notes¶
Preload hook¶
Workers can run initialization logic before processing tasks via --preload.
$ scaler_worker_manager baremetal_native tcp://127.0.0.1:6378 --worker-manager-id wm-preload --preload "mypackage.init:setup"
$ scaler_worker_manager baremetal_native tcp://127.0.0.1:6378 --worker-manager-id wm-preload --preload "mypackage.init:configure('production', debug=False)"
Death timeout¶
--death-timeout-seconds controls how long a worker can stay disconnected from scheduler before exiting.
$ scaler_worker_manager baremetal_native tcp://127.0.0.1:6378 --worker-manager-id wm-fixed --mode fixed --max-task-concurrency 10 -dts 300
Subcommand: baremetal_native¶
Local-process worker manager (dynamic auto-scaling or fixed pre-spawned workers).
$ scaler_worker_manager baremetal_native [options] <scheduler_address>
[[worker_manager]]
type = "baremetal_native"
scheduler_address = "tcp://127.0.0.1:6378"
worker_manager_id = "wm-native"
mode = "dynamic"
max_task_concurrency = 8
Run command:
$ scaler config.toml
$ scaler_worker_manager baremetal_native tcp://127.0.0.1:6378 \
--worker-manager-id wm-native \
--mode dynamic \
--max-task-concurrency 8
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
No |
|
|
|
No |
Auto |
Worker ID prefix override. |
|
No |
Backward-compatible alias for |
Subcommand: symphony¶
IBM Spectrum Symphony worker manager.
$ scaler_worker_manager symphony [options] <scheduler_address>
[[worker_manager]]
type = "symphony"
scheduler_address = "tcp://127.0.0.1:6378"
worker_manager_id = "wm-symphony"
service_name = "ScalerService"
Run command:
$ scaler config.toml
$ scaler_worker_manager symphony tcp://127.0.0.1:6378 \
--worker-manager-id wm-symphony \
--service-name ScalerService
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
Symphony service name to use for submitted workers. |
Subcommand: aws_raw_ecs¶
AWS ECS (Fargate) worker manager.
$ scaler_worker_manager aws_raw_ecs [options] <scheduler_address>
[[worker_manager]]
type = "aws_raw_ecs"
scheduler_address = "tcp://127.0.0.1:6378"
object_storage_address = "tcp://127.0.0.1:6379"
worker_manager_id = "wm-ecs"
ecs_subnets = "subnet-0abc123,subnet-0def456"
ecs_cluster = "scaler-cluster"
ecs_task_definition = "scaler-task-definition"
aws_region = "us-east-1"
Run command:
$ scaler config.toml
$ scaler_worker_manager aws_raw_ecs tcp://127.0.0.1:6378 \
--object-storage-address tcp://127.0.0.1:6379 \
--worker-manager-id wm-ecs \
--ecs-subnets subnet-0abc123,subnet-0def456 \
--ecs-cluster scaler-cluster \
--ecs-task-definition scaler-task-definition \
--aws-region us-east-1
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
No |
|
AWS access key ID (or use |
|
No |
|
AWS secret key (or use |
|
No |
|
AWS region. |
|
Yes |
Comma-separated subnet IDs for ECS task networking. |
|
|
No |
|
ECS cluster name. |
|
No |
|
Container image used for workers. |
|
No |
|
Python dependency string passed to task runtime. |
|
No |
|
Python runtime version for ECS task. |
|
No |
|
ECS task definition name. |
|
No |
|
ECS vCPU count. |
|
No |
|
ECS task memory in GB. |
Subcommand: aws_hpc¶
AWS Batch worker manager.
$ scaler_worker_manager aws_hpc [options] <scheduler_address>
[[worker_manager]]
type = "aws_hpc"
scheduler_address = "tcp://127.0.0.1:6378"
object_storage_address = "tcp://127.0.0.1:6379"
worker_manager_id = "wm-batch"
job_queue = "scaler-job-queue"
job_definition = "scaler-job-definition"
s3_bucket = "my-scaler-bucket"
aws_region = "us-east-1"
Run command:
$ scaler config.toml
$ scaler_worker_manager aws_hpc tcp://127.0.0.1:6378 \
--object-storage-address tcp://127.0.0.1:6379 \
--worker-manager-id wm-batch \
--job-queue scaler-job-queue \
--job-definition scaler-job-definition \
--s3-bucket my-scaler-bucket \
--aws-region us-east-1
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
AWS Batch queue name. |
|
|
Yes |
AWS Batch job definition name. |
|
|
Yes |
S3 bucket used for task data. |
|
|
No |
|
AWS HPC backend type. |
|
No |
|
Worker name override. |
|
No |
|
AWS region. |
|
No |
|
S3 key prefix for task data. |
|
No |
|
Maximum concurrently running AWS Batch jobs. |
|
No |
|
Timeout for each submitted job. |
Subcommand: orb_aws_ec2¶
ORB (Open Resource Broker) worker manager — dynamically provisions workers on AWS EC2 instances.
$ scaler_worker_manager orb_aws_ec2 [options] <scheduler_address>
[[worker_manager]]
type = "orb_aws_ec2"
scheduler_address = "tcp://127.0.0.1:6378"
object_storage_address = "tcp://127.0.0.1:6379"
image_id = "ami-0528819f94f4f5fa5"
instance_type = "t3.medium"
aws_region = "us-east-1"
Run command:
$ scaler config.toml
$ scaler_worker_manager orb_aws_ec2 tcp://127.0.0.1:6378 \
--object-storage-address tcp://127.0.0.1:6379 \
--image-id ami-0528819f94f4f5fa5 \
--instance-type t3.medium \
--aws-region us-east-1
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
AMI ID for the worker EC2 instances. |
|
|
No |
|
EC2 instance type. |
|
No |
|
AWS region. |
|
No |
|
AWS key pair name. A temporary key pair is created if omitted. |
|
No |
|
AWS subnet ID. Defaults to the default subnet in the default VPC. |
|
No |
|
Comma-separated AWS security group IDs. A temporary group is created if omitted. |
For full details, see ORB AWS EC2 Worker Manager.
scaler_object_storage_server¶
scaler_object_storage_server starts the standalone object storage server.
$ scaler_object_storage_server [options] <object_storage_address>
Object storage examples¶
[object_storage_server]
object_storage_address = "tcp://127.0.0.1:6379"
Run command:
$ scaler_object_storage_server --config object_storage.toml tcp://127.0.0.1:6379
$ scaler_object_storage_server tcp://127.0.0.1:6379
Object storage arguments¶
Argument |
Required |
Description |
|---|---|---|
|
Yes |
Storage bind address in |
|
No |
TOML config file path (uses |
scaler_top¶
scaler_top starts a terminal dashboard that streams scheduler metrics from a monitor
endpoint.
$ scaler_top [options] <monitor_address>
Top examples¶
[top]
monitor_address = "tcp://127.0.0.1:6380"
timeout = 5
Run command:
$ scaler_top --config top.toml tcp://127.0.0.1:6380
$ scaler_top tcp://127.0.0.1:6380 --timeout 5
Top arguments¶
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
Scheduler monitor address to subscribe to. |
|
|
No |
|
Subscriber timeout in seconds. |
|
No |
|
TOML config file path (uses |
scaler_gui¶
scaler_gui starts the web monitoring GUI and connects it to a scheduler monitor endpoint.
$ scaler_gui [options] <monitor_address>
UI examples¶
[gui]
monitor_address = "tcp://127.0.0.1:6380"
gui_address = "127.0.0.1:50001"
logging_level = "INFO"
Run command:
$ scaler_gui --config gui.toml tcp://127.0.0.1:6380
$ scaler_gui tcp://127.0.0.1:6380 --gui-address 127.0.0.1:50001
UI arguments¶
Argument |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
Scheduler monitor address to subscribe to. |
|
|
No |
|
Host and port for the web server. |
|
No |
|
Logging verbosity. |
|
No |
|
One or more log outputs. |
|
No |
|
Python logging |
|
No |
|
TOML config file path (uses |