{
    "properties": {
        "database": {
            "description": "MongoDB database configuration properties.",
            "properties": {
                "name": {
                    "default": "defaultdb",
                    "description": "The name of a database to be created on startup.",
                    "type": "string"
                },
                "password": {
                    "default": "password",
                    "description": "The password for a user to be created with superuser access to this database only.",
                    "type": "string"
                },
                "status_ui_auth": {
                    "default": false,
                    "description": "Enable authentication to the status web UI",
                    "type": "boolean"
                },
                "username": {
                    "default": "admin",
                    "description": "The username of a user to be created with superuser access to this database only.",
                    "type": "string"
                }
            },
            "type": "object"
        },
        "mongodb": {
            "description": "MongoDB service configuration properties.",
            "properties": {
                "cpus": {
                    "default": 0.5,
                    "description": "CPU shares to allocate to each service instance.",
                    "minimum": 0.5,
                    "type": "number"
                },
                "mem": {
                    "default": 1024.0,
                    "description": "Memory to allocate to each service instance.",
                    "minimum": 512.0,
                    "type": "number"
                }
            },
            "required": [
                "cpus",
                "mem"
            ],
            "type": "object"
        },
        "networking": {
            "description": "MongoDB networking configuration properties",
            "properties": {
                "external_access": {
                    "description": "Enable access to the service from outside the cluster through Marathon-LB.\nNOTE: this connection is unencrypted.",
                    "properties": {
                        "enable": {
                            "default": false,
                            "description": "Enable or disable creating a VIP for external access through a public node running Marathon-LB.",
                            "type": "boolean"
                        },
                        "external_access_port": {
                            "default": 27017,
                            "description": "For external access, port number to be used for clear communication in the external Marathon-LB load balancer",
                            "type": "number"
                        }
                    },
                    "type": "object"
                },
                "external_ui_access": {
                    "description": "Enable access to the web status UI page from outside the cluster through Marathon-LB.\nNOTE: this connection is unencrypted.",
                    "properties": {
                        "enable": {
                            "default": false,
                            "description": "Enable or disable creating a VIP for external access to the web status UI through a public node running Marathon-LB.",
                            "type": "boolean"
                        },
                        "external_ui_access_port": {
                            "default": 28017,
                            "description": "For external access, port number to be used for clear communication in the external Marathon-LB load balancer",
                            "type": "number"
                        },
                        "virtual_host": {
                            "default": "mongodb.example.org",
                            "description": "For external access, Virtual Host URL to be used in the external load balancer.",
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                "host_mode": {
                    "default": false,
                    "description": "Enable or disable host networking mode. NOTE: this requires the default port to be available on the target host. This also forces to have a single instance per node.",
                    "type": "boolean"
                },
                "port": {
                    "default": 27017,
                    "description": "Port number to be used for database clear communication internally to the cluster.",
                    "type": "number"
                }
            },
            "type": "object"
        },
        "service": {
            "description": "DC/OS service configuration properties.",
            "properties": {
                "name": {
                    "default": "mongodb",
                    "description": "Name of this service instance.",
                    "type": "string"
                }
            },
            "type": "object"
        },
        "storage": {
            "description": "MongoDB storage configuration properties.",
            "properties": {
                "host_volume": {
                    "default": "/tmp",
                    "description": "If using non-persistent volumes (local volumes), this sets the location of a volume on the host to be used for the service. The final location will be derived from this value plus the name set in `name` (e.g. `/mnt/host_volume/service_name`). This can be a mounted NFS drive. Note that this path must be the same on all DC/OS agents. NOTE: if you don't change the default /tmp value, YOUR DATA WILL NOT BE SAVED IN ANY WAY.",
                    "type": "string"
                },
                "persistence": {
                    "description": "Enable persistent storage.",
                    "properties": {
                        "enable": {
                            "default": false,
                            "description": "Enable or disable persistent storage.",
                            "type": "boolean"
                        },
                        "external": {
                            "description": "External persistent storage properties",
                            "properties": {
                                "driver": {
                                    "default": "rexray",
                                    "description": "Volume driver to use for storage. The default value should be correct for most use cases.",
                                    "type": "string"
                                },
                                "enable": {
                                    "default": false,
                                    "description": "Enable or disable external persistent storage. The `persistence` option must also be selected. Please note that for these to work, your DC/OS cluster MUST have been installed with the right options in `config.yaml`. Also, please note this requires a working  configuration file for the driver (e.g. `rexray.yaml`).",
                                    "type": "boolean"
                                },
                                "provider": {
                                    "default": "dvdi",
                                    "description": "Provider of the external persistent volume. The default value should be correct for most use cases.",
                                    "type": "string"
                                },
                                "volume_name": {
                                    "default": "mongodb",
                                    "description": "Name that your volume driver uses to look up your external volume. When your task is staged on an agent, the volume driver queries the storage service for a volume with this name. If one does not exist, it is created implicitly. Otherwise, the existing volume is reused.",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "volume_size": {
                            "default": 256,
                            "description": "If a new volume is to be created, this controls its size in MBs.",
                            "type": "number"
                        }
                    },
                    "type": "object"
                },
                "use_storage_engine": {
                    "description": "Use a specific storage engine.",
                    "properties": {
                        "enable": {
                            "default": false,
                            "description": "Enable or disable using a specific storage engine.",
                            "type": "boolean"
                        },
                        "storage_engine": {
                            "default": "mmapv1",
                            "description": "Specific storage engine to be used.",
                            "type": "string"
                        }
                    },
                    "type": "object"
                }
            },
            "type": "object"
        }
    }
}