Configuring Universe Services

Discovering and changing default parameters

Each Universe service installs with a set of default parameters. You can discover the default parameters and change them as desired.

This topic describes how to use the DC/OS CLI to configure services. You can also customize services by using the Services tab in the DC/OS UI.

  1. View the available configuration options for the service with the dcos package describe --config <package-name> command.

    dcos package describe --config marathon
    

    The output should be something like:

    {
    ...
      "service": {
        "additionalProperties": false,
        "description": "Marathon app configuration properties.",
        "properties": {
          "cpus": {
            "default": 2,
            "description": "CPU shares to allocate to each Marathon instance.",
            "minimum": 0,
            "type": "number"
          },
          ...
          "instances": {
            "default": 1,
            "description": "Number of Marathon instances to run.",
            "minimum": 0,
            "type": "integer"
          },
          "mem": {
            "default": 1536,
            "description": "Memory (MB) to allocate to each Marathon instance.",
            "minimum": 512,
            "type": "number"
          }
        },
        ...
      }
    }
    
  2. Create a JSON configuration file. You can choose an arbitrary name, but you might want to choose a pattern like <package-name>-config.json. For example, marathon-config.json.

    nano marathon-config.json
    
  3. Use the properties objects to build your JSON options file. For example, to change the number of Marathon CPU shares to 3 and memory allocation to 2048:

    {
      "service": {
        "cpus": 3.0, "mem": 2048.0
       }
    }
    
  4. From the DC/OS CLI, install the DC/OS service with the custom options file specified:

    dcos package install --options=marathon-config.json marathon
    

For more information, see the dcos package documentation.