Latest commit 04ffc29 Feb 17, 2017 @mrbrowning mrbrowning committed with gabrielhartmann Allow tasks to override mesos-DNS name with explicit prefix (#532)
* Allow tasks to override mesos-DNS name with explicit prefix

* Add DiscoverySpec and YAML field  to allow specification of task visibility if desired

* Add documentation

* changes, changes

* Check existence of A record in discovery test

* Use discovery instead of dns for filenames

* Fix symlink

Refer to the top-level tutorial document.

Sample configuration files

Four sample configuration files are given here (change the name of the input yml file at "universe/marathon.json.mustache"):

  • svc.yml: Two pods, with volumes. Used in the 'official' hello-world package.
  • svc_simple.yml: Bare minimum example. Just one pod, with no extra features.
  • svc_plan.yml: Two pods, with healthcheck, volumes, ports, and with a plan structure.
  • svc_uri.yml: Sample pod and task-specific URIs that are downloaded before task launch.

Framework API Port

Please note that Marathon dynamically selects a port number, and passes this information to the framework (PORT0 in our examples). We start the API service on that given port number. You can start the framework by giving a specific port number, if you are sure that the port is available to you. This is very unlikely, so the api-port should be set to a variable as shown below:

    api-port : {{PORT0}}

See marathon.json.mustache for more information:

    "DCOS_MIGRATION_API_PATH": "/v1/plan",
    "DCOS_SERVICE_NAME": "{{}}",
  "portDefinitions": [
      "port": 0,
      "protocol": "tcp",
      "name": "api",
      "labels": { "VIP_0": "/api.{{}}:80" }