Installing and Customizing

Installing and Customizing

Prerequisites:

Default installation

  1. From the DC/OS CLI, enter this command:

    $ dcos package install marathon-lb
    

    Tip: You can also install from the DC/OS GUI.

Custom installation

  1. From the DC/OS CLI, view the available Marathon-LB config options:

    $ dcos package describe --config marathon-lb
    

    The output should look similar to this:

    {
      "$schema": "http://json-schema.org/schema#",
      "properties": {
        "marathon-lb": {
          "properties": {
            "auto-assign-service-ports": {
              "default": false,
              "description": "Auto assign service ports for tasks which use IP-per-task. See https://githu
    b.com/mesosphere/marathon-lb#mesos-with-ip-per-task-support for details.",
              "type": "boolean"
            },
            "bind-http-https": {
              "default": true,
              "description": "Reserve ports 80 and 443 for the LB. Use this if you intend to use virtual h
    osts.",
              "type": "boolean"
            },
    ...
    
  2. Create a JSON configuration file with your customizations. You can choose an arbitrary name, but you might want to choose a pattern like marathon-lb-config.json. For example, to change the CPU shares to 3 and memory allocation to 2048:

    {
      "marathon-lb": {
        "instances": 3.0, "mem": 2048.0
       }
    }
    
  3. From the DC/OS CLI, install Marathon-LB with your custom options file specified.

    $ dcos package install --options=<filename>.json marathon-lb
    

Next steps