{
  "$schema": "http://json-schema.org/schema#",
  "properties": {
    "service": {
      "type": "object",
      "description": "DC/OS service configuration properties.",
      "properties": {
        "name": {
          "description": "Name of this service instance.",
          "type": "string",
          "default": "mongodb-admin"
        }
      }
    },
    "mongodb-admin": {
      "type": "object",
      "description": "mongodb-admin service configuration properties.",
      "properties": {
        "cpus": {
          "description": "CPU shares to allocate to this mongodb-admin instance.",
          "type": "number",
          "default": 0.3,
          "minimum": 0.3
        },
        "mem": {
          "description": "Memory to allocate to this mongodb-admin instance.",
          "type": "number",
          "default": 256.0,
          "minimum": 256.0
        },
        "host_volume": {
          "description": "The location of a volume on the host to be used for persisting  data. The final location will be derived from this value plus the name set in `name` (e.g. `/mnt/host_volume/mongodb-admin`). This can be a mounted NFS drive. Note that this path must be the same on all DC/OS agents.",
          "type": "string",
          "default": "/tmp"
        }
      },
      "required": [
        "cpus",
        "mem"
      ]
    },
    "auth": {
      "type": "object",
      "description": "mongodb-admin credentials.",
      "properties": {
        "enable": {
          "description": "enable mongodb-admin authentication on login.",
          "type": "boolean",
          "default": true
        },
        "password": {
          "description": "mongodb-admin web password.",
          "type": "string",
          "default": "password"
        }
      }
    },
    "database": {
      "type": "object",
      "description": "mongodb database connection.",
      "properties": {
        "db_username": {
          "description": "The username for the database connection.",
          "type": "string",
          "default": "admin"
        },
        "db_password": {
          "description": "The password fot the database user.",
          "type": "string",
          "default": "password"
        },
        "db_location": {
          "description": "The name of the database location to connect to.",
          "type": "string",
          "default": "mongodb"
        },
        "db_port": {
          "description": "The port where the database is listening on in the location above.",
          "type": "string",
          "default": "27017"
        }
      }
    },
    "networking": {
      "type": "object",
      "description": "mongodb admin networking configuration properties",
      "properties": {
        "external_access": {
          "type": "object",
          "description": "Enable access from outside the cluster through Marathon-LB.\n PLEASE NOTE THIS CONNECTION IS UNENCRYPTED. USE FOR DEVELOPMENT AND TESTING ONLY.",
          "properties": {
            "enable": {
              "description": "Enable or disable creating a VIP for external access through a public node running Marathon-LB.",
              "type": "boolean",
              "default": true
            },
            "external_access_port": {
              "description": "For external access, port number to be used for clear communication in the external Marathon-LB load balancer",
              "type": "number",
              "default": 27018
            },
            "virtual_host": {
              "description": "For external access, Virtual Host URL to be used in the external load balancer.",
              "type": "string",
              "default": "mongodb-admin.example.org"
            }
          }
        }
      }
    }
  }
}