mesosphere / marathon

Deploy and manage containers (including Docker) on top of Apache Mesos at scale.
https://mesosphere.github.io/marathon/
Apache License 2.0
4.07k stars 845 forks source link

Questions Marathon-Mesos-Docker #3400

Closed jazzista88 closed 7 years ago

jazzista88 commented 8 years ago

Hi all

As i have written here https://github.com/mesosphere/marathon/issues/2555 i'm making my master thesis on the usage of marathon mesos and docker, and in the next months also on project calico. Since i am completely new to this world i would like to understand how the thing works. First of all in the past week i used openstack to instantiate 5 virtual machines. i selected the master on which i have installed marathon mesos chronos and docker and making: sudo service marathon start sudo service mesos-master start going to the related addresses like localhost:8080 i see marathon UI and localhot:5050 i see mesos UI. then i followed the same installation procedure fo all the other VMs, and correclty set the hosts files on each one and the etc/mesos/zk filein order to see the selected master. On each VM i run: sudo service mesos-slave start Then i see on mesos that all the four slaves are on. -Here comes a first question: i see all the slaves, but in offers tab i can't see anything? is it correct? And if yes, when i can see something in offers tab? So i tried to deploy the following simple web: python -m SimpleHTTPSrver $PORT and it works. Now i'm studying how to make web apps using docker containers. First i started to understand how docker works, so i downloaded a Fedora and ubuntu basic images, and tried to run them only on the master, just to make some examples. After that i would like to use marathon to start a containerized application using docker. First of all, should i download the desired image on all the VMs? if yes in which directory? and then should i specify this directory in marathon UI when i create the app? Since i don't know these infos,i tried to follow this tutorial: i made this tutorial using only my marathon-mesos master, and i reached the point in which he runs:

sudo docker run --publish 6060:8080 --name test --rm outyet

i tested through the browser and the app was running. Another question is, how to reproduce the tutorial till here, but using a slave?

Then i stopped the app with ctrl+c and continued the tutorial. i read: "Create a Marathon application that runs this command, but using the Marathon Docker support " (what does it mean exactly?) Continuing: Once the outyet application is loaded onto the VM (but if i run the app on marathon the app jump between waiting and run states) you can create a new app using JSON and curl. First make the file names /vagrant/outyet.json (in these tutorials he always assumes vagrant to run VMs, but i don't, so which should be the correspondence between that path and mine? Since i'm using an ubuntu virtual machine could it be simply /home/ubuntu/outyet.json?). Then i fill the json file as indicated, and run the commands to allow docker, but if i run this on slaves, where mesos-slave command is running, it does not work (because docker is already allowed?) So at the end i'm stuck. The results is that outyet app is running waiting, running waiting, infinte times finding no stable state. As you can see, i tried to follow the tutorial, but i miss some basic things i guess. Could you please suggest me how to make this app runnable? And in general which is the correct procedure to run a containerized app on marathon?

Thanks to all and sorry for this long discussion.

Best regards.

meichstedt commented 7 years ago

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-2676. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.

meichstedt commented 7 years ago

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-2676. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.