Scheduler Customization

Follow the steps below to integrate the Autoscaling Service with a scheduler that is not natively supported or with a supported scheduler that has wrappers created around it which modify its CLI options or output in some way.

  1. Use the write command to create an Autoscaling Service configuration file for one of the supported scheduler types (lsf, pbs, slurm, uge). By choosing a supported scheduler type, a default configuration is automatically created in the file which you can customize. If you are integrating a different scheduler, choose the type that is the most similar to the scheduler that you want to integrate (or use slurm if you are not sure).

    For example, to create a file with a configuration for LSF, you might enter:

    hps-scaling-service-default write -d lsf

    In the command output, note the location to which the scaling_config.json file was written.

  2. Create a directory for the storage of the customization code. For example:

    mdkir -p /path/to/customization
  3. Edit the scaling_config.json file. (Its location is indicated in the output of the command run in step 1.)

  4. In the "compute_resource_sets" section, locate the four *_override settings and direct them to put files in your newly created customization directory. The files do not (and should not) exist yet. By directing the Autoscaling Service to use non-existent files, it will write these files with the default scripts and code used by the scheduler chosen for customization.

    For example:

    "compute_resource_sets": [
        {
            "name": "LSF Cluster",
            "backend": {
                "plugin_name": "orchestration_interfaces",
                "scheduler_type": "lsf",
                
                ...
                "scheduler_command_override": "/path/to/customization/command_override.json",
                "scheduler_script_override": "/path/to/customization/script_override.sh",
                "scheduler_parsing_override": "/path/to/customization/parsing_script_override.py",
                "evaluator_script_override": "/path/to/customization/evaluator_script.sh",
                ...
                
                }
            },
            "scaling_strategy": {
                "plugin_name": "max_available_resource_scaling"
            },
            "available_resources": {},
            "available_applications": [..]
        }
  5. Edit the generated override files to define custom behavior.