Defining the Autoscaling Service Configuration

The Autoscaling Service can be configured and deployed on the controller (the machine where Ansys HPC Platform Core Services are deployed) or any machine that is reachable by the controller. Before deploying it, you must create a configuration file for the service to use. This is the first step in making an autoscaling cluster available as a resource in the Ansys HPC Job Manager.

To define an Autoscaling Service configuration file:

  1. Go the Ansys Customer Portal and select Downloads > HPC Platform Services.

  2. Download the file that applies to your configuration:

    OSRequired file
    CentOS 7rep-scaling-service-centos7.tgz
    CentOS 8 or later, Ubunturep-scaling-service-default.tgz
  3. Extract the tar file from the tgz file.

  4. Extract the contents of the tar file to a folder.

    To see the available commands and options, run the rep-scaling-service executable with the --help argument. For example:

    rep-scaling-service-default --help

    There are three commands available: run, show, and write. To see the help for a specific command, run the command with the --help argument.

  5. Run the write command with the -d option and the value that corresponds to the desired cluster type. Possible values are kubernetes, slurm, pbs, uge, lsf, local, or pcluster.

    For example, to create a file with a Slurm cluster configuration, you might enter:

    rep-scaling-service-default write -d slurm

  6. Run the show command. The “data_directory” property tells you where the autoscaling configuration file is located. The configuration is specified in the scaling_config.json file.

  7. Edit the scaling_config.json file.

  8. Review and/or set the following general properties:

    PropertyDescriptionMore info
    "rep_url"The URL of the Ansys HPC Platform Core Services deployment. The format is https://hostname:8443/rep.You must specify this if the Autoscaling Service is deployed on a different machine than the machine on which the core services are deployed.
    "enable_impersonation"Allows an impersonation client (defined in Keycloak) to impersonate users when requests are submitted to the scheduling system. Impersonation is set to true by default. If you do not want to run the autoscaler with impersonation, set this to false.See User Impersonation in HPC Workflows.

    "client_id"

    "client_secret"

    These values are required when "enable_impersonation" is set to true.

    The "client_id" identifies the client defined in Keycloak which is used for authentication. This should be set to “rep-impersonation”. (If running the Autoscaling Service without impersonation, this can be set to “rep-cli”.)

    The "client secret" authorizes clients and services to contact the Job Management Service. If you have generated a new client secret, specify the generated string as the value of this property. If you have not yet generated a new client secret in Keycloak, see Generating a New Client Secret.

    See Configuring the Autoscaling Service with Impersonation.

    "username"

    "password"

    These are required when "enable_impersonation" is set to false.

    When running the Autoscaling Service without impersonation, these static credentials are used by the client (defined in “client_id”) to generate tokens for all evaluators regardless of who created the task.

    See Configuring the Autoscaling Service Without Impersonation.
  9. In the "compute_resource_sets" section of the file you can see the autoscaling properties for the cluster type that you added. The properties and default values provided reflect the typical way that a cluster of this type would be set up. You can edit these properties now by editing the scaling_config.json file or edit them in the Ansys HPC Job Manager web app once the Autoscaling Service has been deployed. See Editing Autoscaling Cluster Properties.