mesos-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Young <tyo...@guidewire.com>
Subject Docker port-forwarding in mesos 0.20.0
Date Fri, 05 Sep 2014 01:28:28 GMT
I need port-forwarding for my Docker containers, so I guess my question is, can I still use
the mesos-docker executor that I used in 0.16.0 with 0.20.0 if I have to? Has the API for
executors change enough that it wouldn't be worth it?

;ted

From: Ted Young
Sent: Wednesday, September 03, 2014 6:14 PM
To: user@mesos.apache.org
Subject: RE: Docker -p hostPort:containerPort in mesos 0.20.0

Hi,

I we are looking at upgrading to the latest Mesos + Marathon, but we need support of the Docker
port forwarding (we had a modified version of the mesos-docker executor that worked nicely).
Is there an existing way (using an alternate containerizer) that still supports Docker port
forwarding for a container? Building from source is probably fine, if there's no released
support yet.

Thanks,
;ted


From: Tim Chen [mailto:tim@mesosphere.io]
Sent: Thursday, August 28, 2014 6:40 PM
To: user@mesos.apache.org<mailto:user@mesos.apache.org>
Subject: Re: Docker -p hostPort:containerPort in mesos 0.20.0

Hi Steve,

Yes the plan is to put it in the next release.

Tim



On Thu, Aug 28, 2014 at 4:08 PM, Steve Domin <steve@gocardless.com<mailto:steve@gocardless.com>>
wrote:
Hi Tim,

Do you think that's going to be part of the next release of Mesos?

Steve




On Thu, Aug 28, 2014 at 11:56 PM, Tim Chen <tim@mesosphere.io<mailto:tim@mesosphere.io>>
wrote:
Hi Javier,

Like Ryan said the network mode is not configurable at the moment, I'm planning to add bridge
network and port mappings next.

Thanks,

Tim

On Thu, Aug 28, 2014 at 3:51 PM, Ryan Thomas <r.n.thomas@gmail.com<mailto:r.n.thomas@gmail.com>>
wrote:

I believe that the docker containerizer in mesos is hard coded to use host-based networking
at the moment. i.e. the --net=host flag.

This means that the ports the container binds to internally will be on the slaves interface
and exposed.
On 29 Aug 2014 08:45, "Javier Ruiz Jiménez" <jruiz@tecsisa.com<mailto:jruiz@tecsisa.com>>
wrote:
Hi All

I am translating all our Marathon API calls to new format for Marathon 0.7.0-SNAPSHOT as we
have upgraded to Mesos 0.20.0.

I used to map some container ports to well known host ports.

Example from when using Deimos:

 "options" : ["-p","9000:9000"]

Following Marathon upgrade guide in https://mesosphere.github.io/marathon/docs/upgrade/06xto070.html

{
  "container": {
    "image": "docker:///megacorp/product:1.2.3",
    "options": [
      "-v", "/var/data/a:/etc/a:ro",
      "-v", "/var/data/b:/etc/b:rw",
      "-e", "FOO=bar",
      "-p", "443:443"
    ]
  }
}

Gets translated to:

{
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "megacorp/product:1.2.3"
    },
    "volumes": [
      {
        "hostPath": "/var/data/a",
        "containerPath": "/etc/a",
        "mode": "RO"
      },
      {
        "hostPath": "/var/data/b",
        "containerPath": "/etc/b",
        "mode": "RW"
      }
    ]
  },
  "env": {
    "FOO": "bar"
  },
  "ports": [443],
  "requirePorts": true
}

But if I do the same, docker ps shows no port mappings for the container. No ports are mapped.

Any suggestions?
How can I see the "docker run command " that mesos executes?

Thanks,
Javier




Mime
View raw message