Skip to content
Mike Holt edited this page Oct 23, 2018 · 2 revisions

The resources document is a JSON document that defines a set of named resources with floating point values.

Example resources configuration

{
   "version": "1.0",
   "resources": {
      "cpus": 1.5,
      "mem": 64.0,
      "foo": 3.1
   }
}

In this example there are 1.5 CPUs, 64.0 MiB of memory, and 3.1 units of foo.

Resources Specification Version 1.0

A valid resources document is a JSON document with the following structure:

{
   "version": STRING,
   "resources": {STRING: NUMBER}
}

version

Type: String
Required: No


Defines the version of the resources specification used. This allows updates to be made to the specification while maintaining backwards compatibility by allowing Scale to recognize an older version and convert it to the current version. The default value, if not included, is the latest version (currently 1.0).

resources

Type: JSON Object
Required: Yes


Contains the resource names and their values (floating point allowed) as key/value pairs. Arbitrary resources names are supported, but a few resource names have pre-defined meanings:
  • cpus: The number of CPUs
  • mem: The amount of memory in MiB
  • disk: THe amount of local disk space in MiB
Clone this wiki locally