使用marathon部署服務

{
  "id": "basic-3",
  "cmd": "python3 -m http.server 8080",
  "cpus": 0.5,
  "mem": 32.0,
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "python:3",
      "network": "BRIDGE",
      "portMappings": [
        { "containerPort": 8080, "hostPort": 0, "servicePort": 10000 }
      ]
    }
  },
  "acceptedResourceRoles": [ "slave_public" ],
  "labels":{
    "HAPROXY_GROUP":"external"
  }
}

Run:

curl -X POST http://104.199.150.61:8080/v2/apps -d @test.json -H "Content-type: application/json"
dcos marathon app add nginx.json

Connect master node

dcos node ssh --leader --master-proxy
root@7a6502ed3009:/# dcos node ssh --mesos-id=15e0727f-a102-403f-93d5-c7ddf3c19c6e-S5 --master-proxy
Running `ssh -A -t [email protected] ssh -A -t [email protected]`
Last login: Wed May 11 06:49:15 2016 from 10.0.6.15
CoreOS stable (766.5.0)
Update Strategy: No Reboots
Failed Units: 1
  update-engine.service

results matching ""

    No results matching ""