node-mesos icon indicating copy to clipboard operation
node-mesos copied to clipboard

Marathon & Docker?

Open megastef opened this issue 11 years ago • 3 comments

Hi,

how to do this using node-mesos? https://mesosphere.com/2014/09/25/marathon-0.7.0-released/

Docker Containerization with Marathon 0.7.0, Mesos 0.20.0

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json"
localhost:8080/v2/apps -d ' { "container": { "type": "DOCKER", "docker": { "image": "libmesos/ubuntu" }, "volumes" : [ { "containerPath": "/etc/a", "hostPath": "/var/data/a", "mode": "RO" }, { "containerPath": "/etc/b", "hostPath": "/var/data/b", "mode": "RW" } ] }, "id": "ubuntu", "instances": "1", "cpus": "0.5", "mem": "512", "uris": [], "cmd": "while sleep 10; do date -u +%T; done" }'

megastef avatar Nov 04 '14 18:11 megastef

Cool, looks like they added a bunch of new features in the 7.x API. I'll start getting Docker support and the other new features added.

silas avatar Nov 05 '14 05:11 silas

I currently think of combination of node-mesos / marathon to launch nodejs servers, then feed hipache proxy with port/ip from Marathon to proxy to the right server (well I would need to be notified when a process is moved/changed). Do you know something like this? Or a better / simpler way to do? Special for HTTP but most services use it today. Thx.

megastef avatar Nov 05 '14 22:11 megastef

I see the haproxy_marathon_bridge - using cron is doing it somehow.

megastef avatar Nov 05 '14 22:11 megastef