You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Stefano Bianchi <ja...@gmail.com> on 2016/04/26 14:24:54 UTC

Launch docker container from Marathon UI

Hi guys

i'm trying to follow the instructions on mesosphere documentation, but it
is a little bit unlear for me that i am new to this world.
i' would like to launch a wordpress container, present on docker hub here
https://hub.docker.com/_/wordpress/ , from marathon UI but i don't
understand the mechanism.
I understood that i don't have to specify a command in "Command" field, but
i don't know how to fill the dockers fields in marathon UI to launch
wordpress container.
Could you please help me or tell me where i can find a clearer
documentation?

Thanks.

Re: Launch docker container from Marathon UI

Posted by June Taylor <ju...@umn.edu>.
The docker container you're using seems to be expecting environment
variables which you have not supplied.


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 8:56 AM, Stefano Bianchi <ja...@gmail.com>
wrote:

> jupyter is working fine.
> i tried to run wordpress and i get this error in stderr of mesos:
>
> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
> variables
>
>   Did you forget to --link some_mysql_container:mysql or set an external db
>
>   with -e WORDPRESS_DB_HOST=hostname:port?
>
>
>
> Some one of you know this issue?
>
>
>
>
>
>
>
>
>
>
>
>
> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> However thank you so much to all!
>>
>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> i found the answer by my self sorry if i disturbed you.
>>>
>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>>> Now that it is running, how can i check the User Interface?
>>>>
>>>>
>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>
>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>>> i have done these 2 commands, now jupyter is in deploying in
>>>>>> marathon, staging in mesos.
>>>>>> Is there some additional configuration needed?
>>>>>>
>>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>>> June i tried to run your json, but the task is waiting, and if
>>>>>>> starts it failed immediately.
>>>>>>>
>>>>>>> I guess because i did not type this commands:
>>>>>>>
>>>>>>>
>>>>>>>    1.
>>>>>>>
>>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>>
>>>>>>>    2.
>>>>>>>
>>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>>
>>>>>>>
>>>>>>> Could it be the problem?
>>>>>>>
>>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>>>> if it is not disturbing you, i try jupyter notebook as well, just
>>>>>>>> to make some tests on how to launch marathon.
>>>>>>>> stay tuned :)
>>>>>>>>
>>>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>>> thanks haosdent.
>>>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>>>
>>>>>>>>> {
>>>>>>>>>   "container": {
>>>>>>>>>     "type": "DOCKER",
>>>>>>>>>     "docker": {
>>>>>>>>>       "network": "HOST",
>>>>>>>>>       "image": "group/image"
>>>>>>>>>     },
>>>>>>>>>     "volumes": [
>>>>>>>>>       {
>>>>>>>>>         "containerPath": "/etc/a",
>>>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>>>         "mode": "RO"
>>>>>>>>>       },
>>>>>>>>>       {
>>>>>>>>>         "containerPath": "/etc/b",
>>>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>>>         "mode": "RW"
>>>>>>>>>       }
>>>>>>>>>     ]
>>>>>>>>>   }}
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>>>>> what is written in this json.
>>>>>>>>> What i need to understand is, what i should write in:
>>>>>>>>>
>>>>>>>>>  "image": "group/image"
>>>>>>>>>
>>>>>>>>> i mean, with what i have to replace group and image?
>>>>>>>>> For instance, if i would run wordpress container on docker hub
>>>>>>>>> what i should put replacing "group/image" ?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>>>
>>>>>>>>>> This is marathon REST API document:
>>>>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>>>>
>>>>>>>>>> For example, create tasks.json which content is
>>>>>>>>>>
>>>>>>>>>> ```
>>>>>>>>>> {
>>>>>>>>>> "id": "/test-sleep",
>>>>>>>>>> "cmd": "sleep 200"
>>>>>>>>>> }
>>>>>>>>>> ```
>>>>>>>>>>
>>>>>>>>>> And
>>>>>>>>>>
>>>>>>>>>> ```
>>>>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>>>>> -d @tasks.json
>>>>>>>>>> ```
>>>>>>>>>>
>>>>>>>>>> You could find more field definitions in their document.
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi guys
>>>>>>>>>>>
>>>>>>>>>>> i'm trying to follow the instructions on mesosphere
>>>>>>>>>>> documentation, but it is a little bit unlear for me that i am new to this
>>>>>>>>>>> world.
>>>>>>>>>>> i' would like to launch a wordpress container, present on docker
>>>>>>>>>>> hub here https://hub.docker.com/_/wordpress/ , from marathon UI
>>>>>>>>>>> but i don't understand the mechanism.
>>>>>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>>>>>> launch wordpress container.
>>>>>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>>>>>> documentation?
>>>>>>>>>>>
>>>>>>>>>>> Thanks.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards,
>>>>>>>>>> Haosdent Huang
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

RE: Launch docker container from Marathon UI

Posted by Aaron Carey <ac...@ilm.com>.
Then you need to tell marathon to run the mysql container first, and then submit the wordpress container.

Sorry I think I misunderstood!


--

Aaron Carey
Production Engineer - Cloud Pipeline
Industrial Light & Magic
London
020 3751 9150

________________________________
From: Stefano Bianchi [jazzista88@gmail.com]
Sent: 26 April 2016 16:43
To: user@mesos.apache.org
Subject: RE: Launch docker container from Marathon UI


My problem is this, where can i find the mysql container? I have just said to marathon to rim a wordpress docker container, without specify mysql one.

Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com>> ha scritto:
If you run the wordpress container on a different host to the mysql container and use --link on the command line, does that work?


--

Aaron Carey
Production Engineer - Cloud Pipeline
Industrial Light & Magic
London
020 3751 9150

________________________________
From: Stefano Bianchi [jazzista88@gmail.com<ma...@gmail.com>]
Sent: 26 April 2016 16:23
To: user@mesos.apache.org<ma...@mesos.apache.org>
Subject: RE: Launch docker container from Marathon UI


Hi Aaron
Actually both mesos-dns and calico are running even though these containers im running are not, yet, using the calico ipaddr specific in json description.
So i guess it is a problem of bridging, i guess simply specify HOST option on container field in Marathon UI

Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com>> ha scritto:
--link in docker should really be avoided when using marathon/mesos as it implies the containers are on the same host, but this will not always be the case when mesos schedules your containers (also I think it's being deprecated in docker anyway.. not sure though?).

This problem looks like one of service discovery within the mesos cluster: how does one service contact the other when it doesn't know which host the other service may have landed on?

There are several different solutions for service discovery, you can look into some like Project Calico to offer a network layer to docker or try dns based solutions like Mesos-dns or Consul (along with mesos-consul). I think marathon also has some concept of service discovery built in too if you use something like haproxy.

I hope this helps!

Aaron


--

Aaron Carey
Production Engineer - Cloud Pipeline
Industrial Light & Magic
London
020 3751 9150

________________________________
From: June Taylor [june@umn.edu<ma...@umn.edu>]
Sent: 26 April 2016 15:22
To: user@mesos.apache.org<ma...@mesos.apache.org>
Subject: Re: Launch docker container from Marathon UI

Stefano,

The docker run flag --link is intended to connect the container to another running container. I do not know how this would operate in marathon. Perhaps it would be an application group which starts up the mysql docker image first, then the Wordpress docker image after it.


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <ja...@gmail.com>> wrote:
Thanks Rad Gruchalski, actually i'm trying to make a json file that "translate" this command in marathon:

docker run --name some-wordpress --link some-mysql:mysql -d wordpress

i guess the error is relate to the fact that i'm not specifying --link some-mysql:mysql
My problem is that i don't know how to do that, i tried to fill environment variable fields:

Key = link
Value = some-mysql:mysql

But in this way the app does not work as well. How can i configure these env variables?

2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>>:
It says exactly what the problem is.

Start a marathon task with correct environment variables in env and you will be fine.


Best regards,

Radek Gruchalski

radek@gruchalski.com<ma...@gruchalski.com>
<ma...@gruchalski.com>
de.linkedin.com/in/radgruchalski/<http://de.linkedin.com/in/radgruchalski/>

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.

On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:

jupyter is working fine.
i tried to run wordpress and i get this error in stderr of mesos:


error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment variables

  Did you forget to --link some_mysql_container:mysql or set an external db

  with -e WORDPRESS_DB_HOST=hostname:port?



Some one of you know this issue?












2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
However thank you so much to all!

2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
i found the answer by my self sorry if i disturbed you.

2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Now that it is running, how can i check the User Interface?


2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Yes, now it's running!!! June you are awesome!!!

2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
i have done these 2 commands, now jupyter is in deploying in marathon, staging in mesos.
Is there some additional configuration needed?

2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
June i tried to run your json, but the task is waiting, and if starts it failed immediately.

I guess because i did not type this commands:


  1.

echo 'docker,mesos' > /etc/mesos-slave/containerizers

  2.

$ echo '5mins' > /etc/mesos-slave/executor_registration_timeout

Could it be the problem?

2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Thank you June taylor, it is axactly what i was intending.
if it is not disturbing you, i try jupyter notebook as well, just to make some tests on how to launch marathon.
stay tuned :)

2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
thanks haosdent.
actually i have run this kind of apps through rest api.
Now i want learn how to laung docker files. I found this exaple:


{
  "container": {
    "type": "DOCKER",
    "docker": {
      "network": "HOST",
      "image": "group/image"
    },
    "volumes": [
      {
        "containerPath": "/etc/a",
        "hostPath": "/var/data/a",
        "mode": "RO"
      },
      {
        "containerPath": "/etc/b",
        "hostPath": "/var/data/b",
        "mode": "RW"
      }
    ]
  }
}

I am able to link the correspondent field in the marathon UI with what is written in this json.
What i need to understand is, what i should write in:

 "image": "group/image"

i mean, with what i have to replace group and image?
For instance, if i would run wordpress container on docker hub what i should put replacing "group/image" ?







2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>>:
This is marathon REST API document: https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps . Usually we define a task json file and call the rest api.

For example, create tasks.json which content is

```
{
"id": "/test-sleep",
"cmd": "sleep 200"
}
```

And

```
curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps -d @tasks.json
```

You could find more field definitions in their document.

On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>> wrote:
Hi guys

i'm trying to follow the instructions on mesosphere documentation, but it is a little bit unlear for me that i am new to this world.
i' would like to launch a wordpress container, present on docker hub here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't understand the mechanism.
I understood that i don't have to specify a command in "Command" field, but i don't know how to fill the dockers fields in marathon UI to launch wordpress container.
Could you please help me or tell me where i can find a clearer documentation?

Thanks.



--
Best Regards,
Haosdent Huang













Re: Launch docker container from Marathon UI

Posted by June Taylor <ju...@umn.edu>.
The answer to your question is not very simple. I am still figuring this
out myself, but you can look at certain projects such as mesos-dns which
publish SRV records for running docker containers, allowing you to
programmatically find services you have started up. For example, here I
have started up a container that publishes an HTTP interface. Mesos starts
it up on a random node, and assigns it a random high TCP port. All I know
is that it is called "tomsflask" and that it has a TCP port. With this
information, I ask the mesos-dns system where is it running, as you can see
in the NSLOOKUP command below, requesting the SRV record which mesos-dns
automatically created when the container started. In the next command, I
use CURL to show what content is being produced on the port (31427) and
hostname I had received from the SRV command.

june@cluster:~$ nslookup -type=SRV _tomsflask._tcp.marathon.mesos

_tomsflask._tcp.marathon.mesos service = 0 0 31427 tomsflask-5p8ho-s83.
marathon.slave.mesos.

june@cluster:~$ curl http://tomsflask-5p8ho-s83.marathon.slave.mesos:31427

Hello World from Flask (default)


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 11:52 AM, Stefano Bianchi <ja...@gmail.com>
wrote:

> Yes i guess i understood, so when i star a socker container like wordpress
> this app could have the need to contact another container as mysql, here
> project calico should be an efficient way to make this.
> Ok i will try, just to understand, first i run the mysql, then mesos will
> allocate it on a certain slave, then i need to run wordpress. How can i
> specify where is the mysql container in marathon UI?
>
> 2016-04-26 17:48 GMT+02:00 June Taylor <ju...@umn.edu>:
>
>> Stefano,
>>
>> You would want to search for an appropriate image on Docker Hub. Here is
>> one I have NO experience with: https://hub.docker.com/_/mysql/
>>
>> You would then need to learn about how the image is expecting to be
>> configured, so you can set it up appropriately.
>>
>> This is not really a fully thought out solution. I assume you're trying
>> to do this for more of a proof-of-concept, though. So it may be fine for
>> your needs.
>>
>>
>> Thanks,
>> June Taylor
>> System Administrator, Minnesota Population Center
>> University of Minnesota
>>
>> On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <ja...@gmail.com>
>> wrote:
>>
>>> My problem is this, where can i find the mysql container? I have just
>>> said to marathon to rim a wordpress docker container, without specify mysql
>>> one.
>>> Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>
>>>> If you run the wordpress container on a different host to the mysql
>>>> container and use --link on the command line, does that work?
>>>>
>>>> --
>>>>
>>>> Aaron Carey
>>>> Production Engineer - Cloud Pipeline
>>>> Industrial Light & Magic
>>>> London
>>>> 020 3751 9150
>>>>
>>>> ------------------------------
>>>> *From:* Stefano Bianchi [jazzista88@gmail.com]
>>>> *Sent:* 26 April 2016 16:23
>>>> *To:* user@mesos.apache.org
>>>> *Subject:* RE: Launch docker container from Marathon UI
>>>>
>>>> Hi Aaron
>>>> Actually both mesos-dns and calico are running even though these
>>>> containers im running are not, yet, using the calico ipaddr specific in
>>>> json description.
>>>> So i guess it is a problem of bridging, i guess simply specify HOST
>>>> option on container field in Marathon UI
>>>> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>
>>>>> --link in docker should really be avoided when using marathon/mesos as
>>>>> it implies the containers are on the same host, but this will not always be
>>>>> the case when mesos schedules your containers (also I think it's being
>>>>> deprecated in docker anyway.. not sure though?).
>>>>>
>>>>> This problem looks like one of service discovery within the mesos
>>>>> cluster: how does one service contact the other when it doesn't know which
>>>>> host the other service may have landed on?
>>>>>
>>>>> There are several different solutions for service discovery, you can
>>>>> look into some like Project Calico to offer a network layer to docker or
>>>>> try dns based solutions like Mesos-dns or Consul (along with mesos-consul).
>>>>> I think marathon also has some concept of service discovery built in too if
>>>>> you use something like haproxy.
>>>>>
>>>>> I hope this helps!
>>>>>
>>>>> Aaron
>>>>>
>>>>> --
>>>>>
>>>>> Aaron Carey
>>>>> Production Engineer - Cloud Pipeline
>>>>> Industrial Light & Magic
>>>>> London
>>>>> 020 3751 9150
>>>>>
>>>>> ------------------------------
>>>>> *From:* June Taylor [june@umn.edu]
>>>>> *Sent:* 26 April 2016 15:22
>>>>> *To:* user@mesos.apache.org
>>>>> *Subject:* Re: Launch docker container from Marathon UI
>>>>>
>>>>> Stefano,
>>>>>
>>>>> The docker run flag --link is intended to connect the container to
>>>>> another running container. I do not know how this would operate in
>>>>> marathon. Perhaps it would be an application group which starts up the
>>>>> mysql docker image first, then the Wordpress docker image after it.
>>>>>
>>>>>
>>>>> Thanks,
>>>>> June Taylor
>>>>> System Administrator, Minnesota Population Center
>>>>> University of Minnesota
>>>>>
>>>>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <jazzista88@gmail.com
>>>>> > wrote:
>>>>>
>>>>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file
>>>>>> that "translate" this command in marathon:
>>>>>>
>>>>>> docker run --name some-wordpress --link some-mysql:mysql -d wordpress
>>>>>>
>>>>>> i guess the error is relate to the fact that i'm not specifying --link
>>>>>> some-mysql:mysql
>>>>>> My problem is that i don't know how to do that, i tried to fill
>>>>>> environment variable fields:
>>>>>>
>>>>>> Key = link
>>>>>> Value = some-mysql:mysql
>>>>>>
>>>>>> But in this way the app does not work as well. How can i configure
>>>>>> these env variables?
>>>>>>
>>>>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>>>>
>>>>>>> It says exactly what the problem is.
>>>>>>>
>>>>>>> Start a marathon task with correct environment variables in env and
>>>>>>> you will be fine.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Radek Gruchalski
>>>>>>> radek@gruchalski.com <ra...@gruchalski.com>
>>>>>>> de.linkedin.com/in/radgruchalski/
>>>>>>>
>>>>>>>
>>>>>>> *Confidentiality: *This communication is intended for the
>>>>>>> above-named person and may be confidential and/or legally privileged.
>>>>>>> If it has come to you in error you must take no action based on it,
>>>>>>> nor must you copy or show it to anyone; please delete/destroy and inform
>>>>>>> the sender immediately.
>>>>>>>
>>>>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>>>>
>>>>>>> jupyter is working fine.
>>>>>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>>>>>
>>>>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
>>>>>>> variables
>>>>>>>
>>>>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>>>>> external db
>>>>>>>
>>>>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Some one of you know this issue?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> However thank you so much to all!
>>>>>>>
>>>>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> i found the answer by my self sorry if i disturbed you.
>>>>>>>
>>>>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> Now that it is running, how can i check the User Interface?
>>>>>>>
>>>>>>>
>>>>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>>>
>>>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> i have done these 2 commands, now jupyter is in deploying in
>>>>>>> marathon, staging in mesos.
>>>>>>> Is there some additional configuration needed?
>>>>>>>
>>>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> June i tried to run your json, but the task is waiting, and if
>>>>>>> starts it failed immediately.
>>>>>>>
>>>>>>> I guess because i did not type this commands:
>>>>>>>
>>>>>>>
>>>>>>>    1.
>>>>>>>
>>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>>
>>>>>>>    2.
>>>>>>>
>>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>>
>>>>>>>
>>>>>>> Could it be the problem?
>>>>>>>
>>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>>>>> make some tests on how to launch marathon.
>>>>>>> stay tuned :)
>>>>>>>
>>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> thanks haosdent.
>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>
>>>>>>> {
>>>>>>>   "container": {
>>>>>>>     "type": "DOCKER",
>>>>>>>     "docker": {
>>>>>>>       "network": "HOST",
>>>>>>>       "image": "group/image"
>>>>>>>     },
>>>>>>>     "volumes": [
>>>>>>>       {
>>>>>>>         "containerPath": "/etc/a",
>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>         "mode": "RO"
>>>>>>>       },
>>>>>>>       {
>>>>>>>         "containerPath": "/etc/b",
>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>         "mode": "RW"
>>>>>>>       }
>>>>>>>     ]
>>>>>>>   }}
>>>>>>>
>>>>>>>
>>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>>> what is written in this json.
>>>>>>> What i need to understand is, what i should write in:
>>>>>>>
>>>>>>>  "image": "group/image"
>>>>>>>
>>>>>>> i mean, with what i have to replace group and image?
>>>>>>> For instance, if i would run wordpress container on docker hub what
>>>>>>> i should put replacing "group/image" ?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>
>>>>>>> This is marathon REST API document:
>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>
>>>>>>> For example, create tasks.json which content is
>>>>>>>
>>>>>>> ```
>>>>>>> {
>>>>>>> "id": "/test-sleep",
>>>>>>> "cmd": "sleep 200"
>>>>>>> }
>>>>>>> ```
>>>>>>>
>>>>>>> And
>>>>>>>
>>>>>>> ```
>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>> -d @tasks.json
>>>>>>> ```
>>>>>>>
>>>>>>> You could find more field definitions in their document.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>
>>>>>>> Hi guys
>>>>>>>
>>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>>> i' would like to launch a wordpress container, present on docker hub
>>>>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>>>>> don't understand the mechanism.
>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>> launch wordpress container.
>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>> documentation?
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Haosdent Huang
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by haosdent <ha...@gmail.com>.
Do you mean hadoop ports? You could find hadoop default ports at here.
http://blog.cloudera.com/blog/2009/08/hadoop-default-ports-quick-reference/

On Wed, Apr 27, 2016 at 9:59 PM, Stefano Bianchi <ja...@gmail.com>
wrote:

> of course the port is opened
>
> 2016-04-27 15:53 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> ok now i started hadoop, i have just to wait the pull process end.
>> mesos assign a port to this task but if i go to the SLAVE_IP:PORT i
>> cannot see anything.
>> On which pot hadoop is commonly viewable?
>>
>> 2016-04-27 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> Since i already mentioned, anyone of you tried to run hadoop as docker
>>> container from marathon?
>>> i tried with this simple json:
>>>
>>> {
>>>
>>>   "id": "hadoop",
>>>
>>>   "cpus": 1,
>>>
>>>   "mem": 1000,
>>>
>>>   "container": {
>>>
>>>     "type": "DOCKER",
>>>
>>>     "docker": {
>>>
>>>       "image": "sequenceiq/hadoop-docker:2.7.1",
>>>
>>>       "network": "HOST"
>>>
>>>     }
>>>
>>>   }
>>>
>>> }
>>>
>>> the app appears as running but the bar is yellow and on mesos i see
>>> staged.
>>> The container is more or less 800 MB probably i need to wait that pull
>>> operation ends? Maybe the i need to give more ram and also some storage?
>>>
>>> 2016-04-27 14:07 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>>> Thank you Guillermo Rodriguez
>>>> I will try your solution as soon as possible since wordpress is not the
>>>> goal task i wanna run, it was just an example to understand how to launch a
>>>> docker container, and of course i have chosen the easiest one :P
>>>> However, i correctly run Jenkins, Jupyter and Owncloud, now i'm trying
>>>> to do the same with hadoop.
>>>> Thanks to all guys.
>>>>
>>>> 2016-04-27 12:54 GMT+02:00 Guillermo Rodriguez <gu...@spritekin.com>:
>>>>
>>>>> Sorry if it has been answered before.
>>>>> You need mesos-dns.
>>>>> Start your mysql service on marathon, then mesos-dns will have an
>>>>> entry called mysql.marathon.mesos regardless of where the service is
>>>>> started you can always use that URL to resolve the mysql service.
>>>>>
>>>>> Then you start wordpress and specify that your mysql server is
>>>>> mysql.marathon.mesos. If you need to setup an env variable in the wordpress
>>>>> definition you use the env section like:
>>>>> {
>>>>>   "id": "wordpress",
>>>>>   "cpus": 1,
>>>>>   "mem": 512,
>>>>>   "container": {
>>>>>     "type": "DOCKER",
>>>>>     "docker": {
>>>>>       "image": "wordpress",
>>>>>       "network": "HOST"
>>>>>     }
>>>>>   },
>>>>>   "env": {
>>>>>       "WORDPRESS_DB_HOST": "mysql.marathon.mesos:3306",
>>>>>   }
>>>>> }
>>>>>
>>>>> Marathon also allows to add dependencies on startup so you can request
>>>>> marathon to start the mysql service before starting the wordpress.service.
>>>>> Search for the Marathon REST API for more information.
>>>>>
>>>>> Luck!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------
>>>>> *From*: "Stefano Bianchi" <ja...@gmail.com>
>>>>> *Sent*: Wednesday, April 27, 2016 2:53 AM
>>>>>
>>>>> *To*: user@mesos.apache.org
>>>>> *Subject*: Re: Launch docker container from Marathon UI
>>>>>
>>>>> Yes i guess i understood, so when i star a socker container like
>>>>> wordpress this app could have the need to contact another container as
>>>>> mysql, here project calico should be an efficient way to make this.
>>>>> Ok i will try, just to understand, first i run the mysql, then mesos
>>>>> will allocate it on a certain slave, then i need to run wordpress. How can
>>>>> i specify where is the mysql container in marathon UI?
>>>>>
>>>>> 2016-04-26 17:48 GMT+02:00 June Taylor <ju...@umn.edu>:
>>>>>
>>>>>> Stefano,
>>>>>>
>>>>>> You would want to search for an appropriate image on Docker Hub. Here
>>>>>> is one I have NO experience with: https://hub.docker.com/_/mysql/
>>>>>>
>>>>>> You would then need to learn about how the image is expecting to be
>>>>>> configured, so you can set it up appropriately.
>>>>>>
>>>>>> This is not really a fully thought out solution. I assume you're
>>>>>> trying to do this for more of a proof-of-concept, though. So it may be fine
>>>>>> for your needs.
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> June Taylor
>>>>>> System Administrator, Minnesota Population Center
>>>>>> University of Minnesota
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <
>>>>>> jazzista88@gmail.com> wrote:
>>>>>>
>>>>>>> My problem is this, where can i find the mysql container? I have
>>>>>>> just said to marathon to rim a wordpress docker container, without specify
>>>>>>> mysql one.
>>>>>>> Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>>>>
>>>>>>>> If you run the wordpress container on a different host to the mysql
>>>>>>>> container and use --link on the command line, does that work?
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> Aaron Carey
>>>>>>>> Production Engineer - Cloud Pipeline
>>>>>>>> Industrial Light & Magic
>>>>>>>> London020 3751 9150
>>>>>>>>
>>>>>>>> ------------------------------
>>>>>>>> *From:* Stefano Bianchi [jazzista88@gmail.com]
>>>>>>>> *Sent:* 26 April 2016 16:23
>>>>>>>> *To:* user@mesos.apache.org
>>>>>>>> *Subject:* RE: Launch docker container from Marathon UI
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Aaron
>>>>>>>> Actually both mesos-dns and calico are running even though these
>>>>>>>> containers im running are not, yet, using the calico ipaddr specific in
>>>>>>>> json description.
>>>>>>>> So i guess it is a problem of bridging, i guess simply specify HOST
>>>>>>>> option on container field in Marathon UI
>>>>>>>> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>>>>>
>>>>>>>>> --link in docker should really be avoided when using
>>>>>>>>> marathon/mesos as it implies the containers are on the same host, but this
>>>>>>>>> will not always be the case when mesos schedules your containers (also I
>>>>>>>>> think it's being deprecated in docker anyway.. not sure though?).
>>>>>>>>>
>>>>>>>>> This problem looks like one of service discovery within the mesos
>>>>>>>>> cluster: how does one service contact the other when it doesn't know which
>>>>>>>>> host the other service may have landed on?
>>>>>>>>>
>>>>>>>>> There are several different solutions for service discovery, you
>>>>>>>>> can look into some like Project Calico to offer a network layer to docker
>>>>>>>>> or try dns based solutions like Mesos-dns or Consul (along with
>>>>>>>>> mesos-consul). I think marathon also has some concept of service discovery
>>>>>>>>> built in too if you use something like haproxy.
>>>>>>>>>
>>>>>>>>> I hope this helps!
>>>>>>>>>
>>>>>>>>> Aaron
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Aaron Carey
>>>>>>>>> Production Engineer - Cloud Pipeline
>>>>>>>>> Industrial Light & Magic
>>>>>>>>> London020 3751 9150
>>>>>>>>>
>>>>>>>>> ------------------------------
>>>>>>>>> *From:* June Taylor [june@umn.edu]
>>>>>>>>> *Sent:* 26 April 2016 15:22
>>>>>>>>> *To:* user@mesos.apache.org
>>>>>>>>> *Subject:* Re: Launch docker container from Marathon UI
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Stefano,
>>>>>>>>>
>>>>>>>>> The docker run flag --link is intended to connect the container to
>>>>>>>>> another running container. I do not know how this would operate in
>>>>>>>>> marathon. Perhaps it would be an application group which starts up the
>>>>>>>>> mysql docker image first, then the Wordpress docker image after it.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> June Taylor
>>>>>>>>> System Administrator, Minnesota Population Center
>>>>>>>>> University of Minnesota
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <
>>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file
>>>>>>>>>> that "translate" this command in marathon:
>>>>>>>>>>
>>>>>>>>>> docker run --name some-wordpress --link some-mysql:mysql -d
>>>>>>>>>> wordpress
>>>>>>>>>>
>>>>>>>>>> i guess the error is relate to the fact that i'm not specifying --link
>>>>>>>>>> some-mysql:mysql
>>>>>>>>>> My problem is that i don't know how to do that, i tried to fill
>>>>>>>>>> environment variable fields:
>>>>>>>>>>
>>>>>>>>>> Key = link
>>>>>>>>>> Value = some-mysql:mysql
>>>>>>>>>>
>>>>>>>>>> But in this way the app does not work as well. How can i
>>>>>>>>>> configure these env variables?
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> It says exactly what the problem is.
>>>>>>>>>>>
>>>>>>>>>>> Start a marathon task with correct environment variables in env
>>>>>>>>>>> and you will be fine.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Best regards,?
>>>>>>>>>>> Radek Gruchalski
>>>>>>>>>>> ?radek@gruchalski.com? <ra...@gruchalski.com>
>>>>>>>>>>>
>>>>>>>>>>> de.linkedin.com/in/radgruchalski/
>>>>>>>>>>>
>>>>>>>>>>> *Confidentiality:*
>>>>>>>>>>> This communication is intended for the above-named person and
>>>>>>>>>>> may be confidential and/or legally privileged.
>>>>>>>>>>> If it has come to you in error you must take no action based on
>>>>>>>>>>> it, nor must you copy or show it to anyone; please delete/destroy and
>>>>>>>>>>> inform the sender immediately.
>>>>>>>>>>>
>>>>>>>>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>>>>>>>>
>>>>>>>>>>> jupyter is working fine.
>>>>>>>>>>> i tried to run wordpress and i get this error in stderr of
>>>>>>>>>>> mesos:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP
>>>>>>>>>>> environment variables
>>>>>>>>>>>
>>>>>>>>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>>>>>>>>> external db
>>>>>>>>>>>
>>>>>>>>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Some one of you know this issue?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com
>>>>>>>>>>> >:
>>>>>>>>>>>
>>>>>>>>>>> However thank you so much to all!
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com
>>>>>>>>>>> >:
>>>>>>>>>>>
>>>>>>>>>>> i found the answer by my self sorry if i disturbed you.
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com
>>>>>>>>>>> >:
>>>>>>>>>>>
>>>>>>>>>>> Now that it is running, how can i check the User Interface?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com
>>>>>>>>>>> >:
>>>>>>>>>>>
>>>>>>>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com
>>>>>>>>>>> >:
>>>>>>>>>>>
>>>>>>>>>>> i have done these 2 commands, now jupyter is in deploying in
>>>>>>>>>>> marathon, staging in mesos.
>>>>>>>>>>> Is there some additional configuration needed?
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com
>>>>>>>>>>> >:
>>>>>>>>>>>
>>>>>>>>>>> June i tried to run your json, but the task is waiting, and if
>>>>>>>>>>> starts it failed immediately.
>>>>>>>>>>>
>>>>>>>>>>> I guess because i did not type this commands:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>    1.
>>>>>>>>>>>
>>>>>>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>>>>>>
>>>>>>>>>>>    2.
>>>>>>>>>>>
>>>>>>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Could it be the problem?
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com
>>>>>>>>>>> >:
>>>>>>>>>>>
>>>>>>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>>>>>>> if it is not disturbing you, i try jupyter notebook as well,
>>>>>>>>>>> just to make some tests on how to launch marathon.
>>>>>>>>>>> stay tuned :)
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com
>>>>>>>>>>> >:
>>>>>>>>>>>
>>>>>>>>>>> thanks haosdent.
>>>>>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> {
>>>>>>>>>>>   "container": {
>>>>>>>>>>>     "type": "DOCKER",
>>>>>>>>>>>     "docker": {
>>>>>>>>>>>       "network": "HOST",
>>>>>>>>>>>       "image": "group/image"
>>>>>>>>>>>     },
>>>>>>>>>>>     "volumes": [
>>>>>>>>>>>       {
>>>>>>>>>>>         "containerPath": "/etc/a",
>>>>>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>>>>>         "mode": "RO"
>>>>>>>>>>>       },
>>>>>>>>>>>       {
>>>>>>>>>>>         "containerPath": "/etc/b",
>>>>>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>>>>>         "mode": "RW"
>>>>>>>>>>>       }
>>>>>>>>>>>     ]
>>>>>>>>>>>   }}
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I am able to link the correspondent field in the marathon UI
>>>>>>>>>>> with what is written in this json.
>>>>>>>>>>> What i need to understand is, what i should write in:
>>>>>>>>>>>
>>>>>>>>>>>  "image": "group/image"
>>>>>>>>>>>
>>>>>>>>>>> i mean, with what i have to replace group and image?
>>>>>>>>>>> For instance, if i would run wordpress container on docker hub
>>>>>>>>>>> what i should put replacing "group/image" ?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> This is marathon REST API document:
>>>>>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>>>>>
>>>>>>>>>>> For example, create tasks.json which content is
>>>>>>>>>>>
>>>>>>>>>>> ```
>>>>>>>>>>> {
>>>>>>>>>>> "id": "/test-sleep",
>>>>>>>>>>> "cmd": "sleep 200"
>>>>>>>>>>> }
>>>>>>>>>>> ```
>>>>>>>>>>>
>>>>>>>>>>> And
>>>>>>>>>>>
>>>>>>>>>>> ```
>>>>>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>>>>>> -d @tasks.json
>>>>>>>>>>> ```
>>>>>>>>>>>
>>>>>>>>>>> You could find more field definitions in their document.
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi guys
>>>>>>>>>>>
>>>>>>>>>>> i'm trying to follow the instructions on mesosphere
>>>>>>>>>>> documentation, but it is a little bit unlear for me that i am new to this
>>>>>>>>>>> world.
>>>>>>>>>>> i' would like to launch a wordpress container, present on docker
>>>>>>>>>>> hub here https://hub.docker.com/_/wordpress/ , from marathon UI
>>>>>>>>>>> but i don't understand the mechanism.
>>>>>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>>>>>> launch wordpress container.
>>>>>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>>>>>> documentation?
>>>>>>>>>>>
>>>>>>>>>>> Thanks.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Best Regards,
>>>>>>>>>>> Haosdent Huang
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>
>>>
>>
>


-- 
Best Regards,
Haosdent Huang

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
of course the port is opened

2016-04-27 15:53 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> ok now i started hadoop, i have just to wait the pull process end.
> mesos assign a port to this task but if i go to the SLAVE_IP:PORT i cannot
> see anything.
> On which pot hadoop is commonly viewable?
>
> 2016-04-27 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> Since i already mentioned, anyone of you tried to run hadoop as docker
>> container from marathon?
>> i tried with this simple json:
>>
>> {
>>
>>   "id": "hadoop",
>>
>>   "cpus": 1,
>>
>>   "mem": 1000,
>>
>>   "container": {
>>
>>     "type": "DOCKER",
>>
>>     "docker": {
>>
>>       "image": "sequenceiq/hadoop-docker:2.7.1",
>>
>>       "network": "HOST"
>>
>>     }
>>
>>   }
>>
>> }
>>
>> the app appears as running but the bar is yellow and on mesos i see
>> staged.
>> The container is more or less 800 MB probably i need to wait that pull
>> operation ends? Maybe the i need to give more ram and also some storage?
>>
>> 2016-04-27 14:07 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> Thank you Guillermo Rodriguez
>>> I will try your solution as soon as possible since wordpress is not the
>>> goal task i wanna run, it was just an example to understand how to launch a
>>> docker container, and of course i have chosen the easiest one :P
>>> However, i correctly run Jenkins, Jupyter and Owncloud, now i'm trying
>>> to do the same with hadoop.
>>> Thanks to all guys.
>>>
>>> 2016-04-27 12:54 GMT+02:00 Guillermo Rodriguez <gu...@spritekin.com>:
>>>
>>>> Sorry if it has been answered before.
>>>> You need mesos-dns.
>>>> Start your mysql service on marathon, then mesos-dns will have an entry
>>>> called mysql.marathon.mesos regardless of where the service is started you
>>>> can always use that URL to resolve the mysql service.
>>>>
>>>> Then you start wordpress and specify that your mysql server is
>>>> mysql.marathon.mesos. If you need to setup an env variable in the wordpress
>>>> definition you use the env section like:
>>>> {
>>>>   "id": "wordpress",
>>>>   "cpus": 1,
>>>>   "mem": 512,
>>>>   "container": {
>>>>     "type": "DOCKER",
>>>>     "docker": {
>>>>       "image": "wordpress",
>>>>       "network": "HOST"
>>>>     }
>>>>   },
>>>>   "env": {
>>>>       "WORDPRESS_DB_HOST": "mysql.marathon.mesos:3306",
>>>>   }
>>>> }
>>>>
>>>> Marathon also allows to add dependencies on startup so you can request
>>>> marathon to start the mysql service before starting the wordpress.service.
>>>> Search for the Marathon REST API for more information.
>>>>
>>>> Luck!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>> *From*: "Stefano Bianchi" <ja...@gmail.com>
>>>> *Sent*: Wednesday, April 27, 2016 2:53 AM
>>>>
>>>> *To*: user@mesos.apache.org
>>>> *Subject*: Re: Launch docker container from Marathon UI
>>>>
>>>> Yes i guess i understood, so when i star a socker container like
>>>> wordpress this app could have the need to contact another container as
>>>> mysql, here project calico should be an efficient way to make this.
>>>> Ok i will try, just to understand, first i run the mysql, then mesos
>>>> will allocate it on a certain slave, then i need to run wordpress. How can
>>>> i specify where is the mysql container in marathon UI?
>>>>
>>>> 2016-04-26 17:48 GMT+02:00 June Taylor <ju...@umn.edu>:
>>>>
>>>>> Stefano,
>>>>>
>>>>> You would want to search for an appropriate image on Docker Hub. Here
>>>>> is one I have NO experience with: https://hub.docker.com/_/mysql/
>>>>>
>>>>> You would then need to learn about how the image is expecting to be
>>>>> configured, so you can set it up appropriately.
>>>>>
>>>>> This is not really a fully thought out solution. I assume you're
>>>>> trying to do this for more of a proof-of-concept, though. So it may be fine
>>>>> for your needs.
>>>>>
>>>>>
>>>>> Thanks,
>>>>> June Taylor
>>>>> System Administrator, Minnesota Population Center
>>>>> University of Minnesota
>>>>>
>>>>> On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <
>>>>> jazzista88@gmail.com> wrote:
>>>>>
>>>>>> My problem is this, where can i find the mysql container? I have just
>>>>>> said to marathon to rim a wordpress docker container, without specify mysql
>>>>>> one.
>>>>>> Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>>>
>>>>>>> If you run the wordpress container on a different host to the mysql
>>>>>>> container and use --link on the command line, does that work?
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Aaron Carey
>>>>>>> Production Engineer - Cloud Pipeline
>>>>>>> Industrial Light & Magic
>>>>>>> London020 3751 9150
>>>>>>>
>>>>>>> ------------------------------
>>>>>>> *From:* Stefano Bianchi [jazzista88@gmail.com]
>>>>>>> *Sent:* 26 April 2016 16:23
>>>>>>> *To:* user@mesos.apache.org
>>>>>>> *Subject:* RE: Launch docker container from Marathon UI
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi Aaron
>>>>>>> Actually both mesos-dns and calico are running even though these
>>>>>>> containers im running are not, yet, using the calico ipaddr specific in
>>>>>>> json description.
>>>>>>> So i guess it is a problem of bridging, i guess simply specify HOST
>>>>>>> option on container field in Marathon UI
>>>>>>> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>>>>
>>>>>>>> --link in docker should really be avoided when using marathon/mesos
>>>>>>>> as it implies the containers are on the same host, but this will not always
>>>>>>>> be the case when mesos schedules your containers (also I think it's being
>>>>>>>> deprecated in docker anyway.. not sure though?).
>>>>>>>>
>>>>>>>> This problem looks like one of service discovery within the mesos
>>>>>>>> cluster: how does one service contact the other when it doesn't know which
>>>>>>>> host the other service may have landed on?
>>>>>>>>
>>>>>>>> There are several different solutions for service discovery, you
>>>>>>>> can look into some like Project Calico to offer a network layer to docker
>>>>>>>> or try dns based solutions like Mesos-dns or Consul (along with
>>>>>>>> mesos-consul). I think marathon also has some concept of service discovery
>>>>>>>> built in too if you use something like haproxy.
>>>>>>>>
>>>>>>>> I hope this helps!
>>>>>>>>
>>>>>>>> Aaron
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> Aaron Carey
>>>>>>>> Production Engineer - Cloud Pipeline
>>>>>>>> Industrial Light & Magic
>>>>>>>> London020 3751 9150
>>>>>>>>
>>>>>>>> ------------------------------
>>>>>>>> *From:* June Taylor [june@umn.edu]
>>>>>>>> *Sent:* 26 April 2016 15:22
>>>>>>>> *To:* user@mesos.apache.org
>>>>>>>> *Subject:* Re: Launch docker container from Marathon UI
>>>>>>>>
>>>>>>>>
>>>>>>>> Stefano,
>>>>>>>>
>>>>>>>> The docker run flag --link is intended to connect the container to
>>>>>>>> another running container. I do not know how this would operate in
>>>>>>>> marathon. Perhaps it would be an application group which starts up the
>>>>>>>> mysql docker image first, then the Wordpress docker image after it.
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> June Taylor
>>>>>>>> System Administrator, Minnesota Population Center
>>>>>>>> University of Minnesota
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <
>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file
>>>>>>>>> that "translate" this command in marathon:
>>>>>>>>>
>>>>>>>>> docker run --name some-wordpress --link some-mysql:mysql -d
>>>>>>>>> wordpress
>>>>>>>>>
>>>>>>>>> i guess the error is relate to the fact that i'm not specifying --link
>>>>>>>>> some-mysql:mysql
>>>>>>>>> My problem is that i don't know how to do that, i tried to fill
>>>>>>>>> environment variable fields:
>>>>>>>>>
>>>>>>>>> Key = link
>>>>>>>>> Value = some-mysql:mysql
>>>>>>>>>
>>>>>>>>> But in this way the app does not work as well. How can i configure
>>>>>>>>> these env variables?
>>>>>>>>>
>>>>>>>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>>>>>>>
>>>>>>>>>> It says exactly what the problem is.
>>>>>>>>>>
>>>>>>>>>> Start a marathon task with correct environment variables in env
>>>>>>>>>> and you will be fine.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Best regards,?
>>>>>>>>>> Radek Gruchalski
>>>>>>>>>> ?radek@gruchalski.com? <ra...@gruchalski.com>
>>>>>>>>>>
>>>>>>>>>> de.linkedin.com/in/radgruchalski/
>>>>>>>>>>
>>>>>>>>>> *Confidentiality:*
>>>>>>>>>> This communication is intended for the above-named person and may
>>>>>>>>>> be confidential and/or legally privileged.
>>>>>>>>>> If it has come to you in error you must take no action based on
>>>>>>>>>> it, nor must you copy or show it to anyone; please delete/destroy and
>>>>>>>>>> inform the sender immediately.
>>>>>>>>>>
>>>>>>>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>>>>>>>
>>>>>>>>>> jupyter is working fine.
>>>>>>>>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP
>>>>>>>>>> environment variables
>>>>>>>>>>
>>>>>>>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>>>>>>>> external db
>>>>>>>>>>
>>>>>>>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Some one of you know this issue?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> However thank you so much to all!
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> i found the answer by my self sorry if i disturbed you.
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> Now that it is running, how can i check the User Interface?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> i have done these 2 commands, now jupyter is in deploying in
>>>>>>>>>> marathon, staging in mesos.
>>>>>>>>>> Is there some additional configuration needed?
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> June i tried to run your json, but the task is waiting, and if
>>>>>>>>>> starts it failed immediately.
>>>>>>>>>>
>>>>>>>>>> I guess because i did not type this commands:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>    1.
>>>>>>>>>>
>>>>>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>>>>>
>>>>>>>>>>    2.
>>>>>>>>>>
>>>>>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Could it be the problem?
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>>>>>> if it is not disturbing you, i try jupyter notebook as well, just
>>>>>>>>>> to make some tests on how to launch marathon.
>>>>>>>>>> stay tuned :)
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> thanks haosdent.
>>>>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> {
>>>>>>>>>>   "container": {
>>>>>>>>>>     "type": "DOCKER",
>>>>>>>>>>     "docker": {
>>>>>>>>>>       "network": "HOST",
>>>>>>>>>>       "image": "group/image"
>>>>>>>>>>     },
>>>>>>>>>>     "volumes": [
>>>>>>>>>>       {
>>>>>>>>>>         "containerPath": "/etc/a",
>>>>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>>>>         "mode": "RO"
>>>>>>>>>>       },
>>>>>>>>>>       {
>>>>>>>>>>         "containerPath": "/etc/b",
>>>>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>>>>         "mode": "RW"
>>>>>>>>>>       }
>>>>>>>>>>     ]
>>>>>>>>>>   }}
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>>>>>> what is written in this json.
>>>>>>>>>> What i need to understand is, what i should write in:
>>>>>>>>>>
>>>>>>>>>>  "image": "group/image"
>>>>>>>>>>
>>>>>>>>>> i mean, with what i have to replace group and image?
>>>>>>>>>> For instance, if i would run wordpress container on docker hub
>>>>>>>>>> what i should put replacing "group/image" ?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>>>>
>>>>>>>>>> This is marathon REST API document:
>>>>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>>>>
>>>>>>>>>> For example, create tasks.json which content is
>>>>>>>>>>
>>>>>>>>>> ```
>>>>>>>>>> {
>>>>>>>>>> "id": "/test-sleep",
>>>>>>>>>> "cmd": "sleep 200"
>>>>>>>>>> }
>>>>>>>>>> ```
>>>>>>>>>>
>>>>>>>>>> And
>>>>>>>>>>
>>>>>>>>>> ```
>>>>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>>>>> -d @tasks.json
>>>>>>>>>> ```
>>>>>>>>>>
>>>>>>>>>> You could find more field definitions in their document.
>>>>>>>>>>
>>>>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>> Hi guys
>>>>>>>>>>
>>>>>>>>>> i'm trying to follow the instructions on mesosphere
>>>>>>>>>> documentation, but it is a little bit unlear for me that i am new to this
>>>>>>>>>> world.
>>>>>>>>>> i' would like to launch a wordpress container, present on docker
>>>>>>>>>> hub here https://hub.docker.com/_/wordpress/ , from marathon UI
>>>>>>>>>> but i don't understand the mechanism.
>>>>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>>>>> launch wordpress container.
>>>>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>>>>> documentation?
>>>>>>>>>>
>>>>>>>>>> Thanks.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards,
>>>>>>>>>> Haosdent Huang
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
ok now i started hadoop, i have just to wait the pull process end.
mesos assign a port to this task but if i go to the SLAVE_IP:PORT i cannot
see anything.
On which pot hadoop is commonly viewable?

2016-04-27 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> Since i already mentioned, anyone of you tried to run hadoop as docker
> container from marathon?
> i tried with this simple json:
>
> {
>
>   "id": "hadoop",
>
>   "cpus": 1,
>
>   "mem": 1000,
>
>   "container": {
>
>     "type": "DOCKER",
>
>     "docker": {
>
>       "image": "sequenceiq/hadoop-docker:2.7.1",
>
>       "network": "HOST"
>
>     }
>
>   }
>
> }
>
> the app appears as running but the bar is yellow and on mesos i see staged.
> The container is more or less 800 MB probably i need to wait that pull
> operation ends? Maybe the i need to give more ram and also some storage?
>
> 2016-04-27 14:07 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> Thank you Guillermo Rodriguez
>> I will try your solution as soon as possible since wordpress is not the
>> goal task i wanna run, it was just an example to understand how to launch a
>> docker container, and of course i have chosen the easiest one :P
>> However, i correctly run Jenkins, Jupyter and Owncloud, now i'm trying to
>> do the same with hadoop.
>> Thanks to all guys.
>>
>> 2016-04-27 12:54 GMT+02:00 Guillermo Rodriguez <gu...@spritekin.com>:
>>
>>> Sorry if it has been answered before.
>>> You need mesos-dns.
>>> Start your mysql service on marathon, then mesos-dns will have an entry
>>> called mysql.marathon.mesos regardless of where the service is started you
>>> can always use that URL to resolve the mysql service.
>>>
>>> Then you start wordpress and specify that your mysql server is
>>> mysql.marathon.mesos. If you need to setup an env variable in the wordpress
>>> definition you use the env section like:
>>> {
>>>   "id": "wordpress",
>>>   "cpus": 1,
>>>   "mem": 512,
>>>   "container": {
>>>     "type": "DOCKER",
>>>     "docker": {
>>>       "image": "wordpress",
>>>       "network": "HOST"
>>>     }
>>>   },
>>>   "env": {
>>>       "WORDPRESS_DB_HOST": "mysql.marathon.mesos:3306",
>>>   }
>>> }
>>>
>>> Marathon also allows to add dependencies on startup so you can request
>>> marathon to start the mysql service before starting the wordpress.service.
>>> Search for the Marathon REST API for more information.
>>>
>>> Luck!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------
>>> *From*: "Stefano Bianchi" <ja...@gmail.com>
>>> *Sent*: Wednesday, April 27, 2016 2:53 AM
>>>
>>> *To*: user@mesos.apache.org
>>> *Subject*: Re: Launch docker container from Marathon UI
>>>
>>> Yes i guess i understood, so when i star a socker container like
>>> wordpress this app could have the need to contact another container as
>>> mysql, here project calico should be an efficient way to make this.
>>> Ok i will try, just to understand, first i run the mysql, then mesos
>>> will allocate it on a certain slave, then i need to run wordpress. How can
>>> i specify where is the mysql container in marathon UI?
>>>
>>> 2016-04-26 17:48 GMT+02:00 June Taylor <ju...@umn.edu>:
>>>
>>>> Stefano,
>>>>
>>>> You would want to search for an appropriate image on Docker Hub. Here
>>>> is one I have NO experience with: https://hub.docker.com/_/mysql/
>>>>
>>>> You would then need to learn about how the image is expecting to be
>>>> configured, so you can set it up appropriately.
>>>>
>>>> This is not really a fully thought out solution. I assume you're trying
>>>> to do this for more of a proof-of-concept, though. So it may be fine for
>>>> your needs.
>>>>
>>>>
>>>> Thanks,
>>>> June Taylor
>>>> System Administrator, Minnesota Population Center
>>>> University of Minnesota
>>>>
>>>> On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <jazzista88@gmail.com
>>>> > wrote:
>>>>
>>>>> My problem is this, where can i find the mysql container? I have just
>>>>> said to marathon to rim a wordpress docker container, without specify mysql
>>>>> one.
>>>>> Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>>
>>>>>> If you run the wordpress container on a different host to the mysql
>>>>>> container and use --link on the command line, does that work?
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Aaron Carey
>>>>>> Production Engineer - Cloud Pipeline
>>>>>> Industrial Light & Magic
>>>>>> London020 3751 9150
>>>>>>
>>>>>> ------------------------------
>>>>>> *From:* Stefano Bianchi [jazzista88@gmail.com]
>>>>>> *Sent:* 26 April 2016 16:23
>>>>>> *To:* user@mesos.apache.org
>>>>>> *Subject:* RE: Launch docker container from Marathon UI
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi Aaron
>>>>>> Actually both mesos-dns and calico are running even though these
>>>>>> containers im running are not, yet, using the calico ipaddr specific in
>>>>>> json description.
>>>>>> So i guess it is a problem of bridging, i guess simply specify HOST
>>>>>> option on container field in Marathon UI
>>>>>> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>>>
>>>>>>> --link in docker should really be avoided when using marathon/mesos
>>>>>>> as it implies the containers are on the same host, but this will not always
>>>>>>> be the case when mesos schedules your containers (also I think it's being
>>>>>>> deprecated in docker anyway.. not sure though?).
>>>>>>>
>>>>>>> This problem looks like one of service discovery within the mesos
>>>>>>> cluster: how does one service contact the other when it doesn't know which
>>>>>>> host the other service may have landed on?
>>>>>>>
>>>>>>> There are several different solutions for service discovery, you can
>>>>>>> look into some like Project Calico to offer a network layer to docker or
>>>>>>> try dns based solutions like Mesos-dns or Consul (along with mesos-consul).
>>>>>>> I think marathon also has some concept of service discovery built in too if
>>>>>>> you use something like haproxy.
>>>>>>>
>>>>>>> I hope this helps!
>>>>>>>
>>>>>>> Aaron
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Aaron Carey
>>>>>>> Production Engineer - Cloud Pipeline
>>>>>>> Industrial Light & Magic
>>>>>>> London020 3751 9150
>>>>>>>
>>>>>>> ------------------------------
>>>>>>> *From:* June Taylor [june@umn.edu]
>>>>>>> *Sent:* 26 April 2016 15:22
>>>>>>> *To:* user@mesos.apache.org
>>>>>>> *Subject:* Re: Launch docker container from Marathon UI
>>>>>>>
>>>>>>>
>>>>>>> Stefano,
>>>>>>>
>>>>>>> The docker run flag --link is intended to connect the container to
>>>>>>> another running container. I do not know how this would operate in
>>>>>>> marathon. Perhaps it would be an application group which starts up the
>>>>>>> mysql docker image first, then the Wordpress docker image after it.
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> June Taylor
>>>>>>> System Administrator, Minnesota Population Center
>>>>>>> University of Minnesota
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <
>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>
>>>>>>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file
>>>>>>>> that "translate" this command in marathon:
>>>>>>>>
>>>>>>>> docker run --name some-wordpress --link some-mysql:mysql -d
>>>>>>>> wordpress
>>>>>>>>
>>>>>>>> i guess the error is relate to the fact that i'm not specifying --link
>>>>>>>> some-mysql:mysql
>>>>>>>> My problem is that i don't know how to do that, i tried to fill
>>>>>>>> environment variable fields:
>>>>>>>>
>>>>>>>> Key = link
>>>>>>>> Value = some-mysql:mysql
>>>>>>>>
>>>>>>>> But in this way the app does not work as well. How can i configure
>>>>>>>> these env variables?
>>>>>>>>
>>>>>>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>>>>>>
>>>>>>>>> It says exactly what the problem is.
>>>>>>>>>
>>>>>>>>> Start a marathon task with correct environment variables in env
>>>>>>>>> and you will be fine.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Best regards,?
>>>>>>>>> Radek Gruchalski
>>>>>>>>> ?radek@gruchalski.com? <ra...@gruchalski.com>
>>>>>>>>>
>>>>>>>>> de.linkedin.com/in/radgruchalski/
>>>>>>>>>
>>>>>>>>> *Confidentiality:*
>>>>>>>>> This communication is intended for the above-named person and may
>>>>>>>>> be confidential and/or legally privileged.
>>>>>>>>> If it has come to you in error you must take no action based on
>>>>>>>>> it, nor must you copy or show it to anyone; please delete/destroy and
>>>>>>>>> inform the sender immediately.
>>>>>>>>>
>>>>>>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>>>>>>
>>>>>>>>> jupyter is working fine.
>>>>>>>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP
>>>>>>>>> environment variables
>>>>>>>>>
>>>>>>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>>>>>>> external db
>>>>>>>>>
>>>>>>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Some one of you know this issue?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>>
>>>>>>>>> However thank you so much to all!
>>>>>>>>>
>>>>>>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>>
>>>>>>>>> i found the answer by my self sorry if i disturbed you.
>>>>>>>>>
>>>>>>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>>
>>>>>>>>> Now that it is running, how can i check the User Interface?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>>
>>>>>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>>>>>
>>>>>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>>
>>>>>>>>> i have done these 2 commands, now jupyter is in deploying in
>>>>>>>>> marathon, staging in mesos.
>>>>>>>>> Is there some additional configuration needed?
>>>>>>>>>
>>>>>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>>
>>>>>>>>> June i tried to run your json, but the task is waiting, and if
>>>>>>>>> starts it failed immediately.
>>>>>>>>>
>>>>>>>>> I guess because i did not type this commands:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>    1.
>>>>>>>>>
>>>>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>>>>
>>>>>>>>>    2.
>>>>>>>>>
>>>>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Could it be the problem?
>>>>>>>>>
>>>>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>>
>>>>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>>>>> if it is not disturbing you, i try jupyter notebook as well, just
>>>>>>>>> to make some tests on how to launch marathon.
>>>>>>>>> stay tuned :)
>>>>>>>>>
>>>>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>>
>>>>>>>>> thanks haosdent.
>>>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> {
>>>>>>>>>   "container": {
>>>>>>>>>     "type": "DOCKER",
>>>>>>>>>     "docker": {
>>>>>>>>>       "network": "HOST",
>>>>>>>>>       "image": "group/image"
>>>>>>>>>     },
>>>>>>>>>     "volumes": [
>>>>>>>>>       {
>>>>>>>>>         "containerPath": "/etc/a",
>>>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>>>         "mode": "RO"
>>>>>>>>>       },
>>>>>>>>>       {
>>>>>>>>>         "containerPath": "/etc/b",
>>>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>>>         "mode": "RW"
>>>>>>>>>       }
>>>>>>>>>     ]
>>>>>>>>>   }}
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>>>>> what is written in this json.
>>>>>>>>> What i need to understand is, what i should write in:
>>>>>>>>>
>>>>>>>>>  "image": "group/image"
>>>>>>>>>
>>>>>>>>> i mean, with what i have to replace group and image?
>>>>>>>>> For instance, if i would run wordpress container on docker hub
>>>>>>>>> what i should put replacing "group/image" ?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>>>
>>>>>>>>> This is marathon REST API document:
>>>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>>>
>>>>>>>>> For example, create tasks.json which content is
>>>>>>>>>
>>>>>>>>> ```
>>>>>>>>> {
>>>>>>>>> "id": "/test-sleep",
>>>>>>>>> "cmd": "sleep 200"
>>>>>>>>> }
>>>>>>>>> ```
>>>>>>>>>
>>>>>>>>> And
>>>>>>>>>
>>>>>>>>> ```
>>>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>>>> -d @tasks.json
>>>>>>>>> ```
>>>>>>>>>
>>>>>>>>> You could find more field definitions in their document.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>> Hi guys
>>>>>>>>>
>>>>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>>>>> i' would like to launch a wordpress container, present on docker
>>>>>>>>> hub here https://hub.docker.com/_/wordpress/ , from marathon UI
>>>>>>>>> but i don't understand the mechanism.
>>>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>>>> launch wordpress container.
>>>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>>>> documentation?
>>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best Regards,
>>>>>>>>> Haosdent Huang
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
Since i already mentioned, anyone of you tried to run hadoop as docker
container from marathon?
i tried with this simple json:

{

  "id": "hadoop",

  "cpus": 1,

  "mem": 1000,

  "container": {

    "type": "DOCKER",

    "docker": {

      "image": "sequenceiq/hadoop-docker:2.7.1",

      "network": "HOST"

    }

  }

}

the app appears as running but the bar is yellow and on mesos i see staged.
The container is more or less 800 MB probably i need to wait that pull
operation ends? Maybe the i need to give more ram and also some storage?

2016-04-27 14:07 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> Thank you Guillermo Rodriguez
> I will try your solution as soon as possible since wordpress is not the
> goal task i wanna run, it was just an example to understand how to launch a
> docker container, and of course i have chosen the easiest one :P
> However, i correctly run Jenkins, Jupyter and Owncloud, now i'm trying to
> do the same with hadoop.
> Thanks to all guys.
>
> 2016-04-27 12:54 GMT+02:00 Guillermo Rodriguez <gu...@spritekin.com>:
>
>> Sorry if it has been answered before.
>> You need mesos-dns.
>> Start your mysql service on marathon, then mesos-dns will have an entry
>> called mysql.marathon.mesos regardless of where the service is started you
>> can always use that URL to resolve the mysql service.
>>
>> Then you start wordpress and specify that your mysql server is
>> mysql.marathon.mesos. If you need to setup an env variable in the wordpress
>> definition you use the env section like:
>> {
>>   "id": "wordpress",
>>   "cpus": 1,
>>   "mem": 512,
>>   "container": {
>>     "type": "DOCKER",
>>     "docker": {
>>       "image": "wordpress",
>>       "network": "HOST"
>>     }
>>   },
>>   "env": {
>>       "WORDPRESS_DB_HOST": "mysql.marathon.mesos:3306",
>>   }
>> }
>>
>> Marathon also allows to add dependencies on startup so you can request
>> marathon to start the mysql service before starting the wordpress.service.
>> Search for the Marathon REST API for more information.
>>
>> Luck!
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------
>> *From*: "Stefano Bianchi" <ja...@gmail.com>
>> *Sent*: Wednesday, April 27, 2016 2:53 AM
>>
>> *To*: user@mesos.apache.org
>> *Subject*: Re: Launch docker container from Marathon UI
>>
>> Yes i guess i understood, so when i star a socker container like
>> wordpress this app could have the need to contact another container as
>> mysql, here project calico should be an efficient way to make this.
>> Ok i will try, just to understand, first i run the mysql, then mesos will
>> allocate it on a certain slave, then i need to run wordpress. How can i
>> specify where is the mysql container in marathon UI?
>>
>> 2016-04-26 17:48 GMT+02:00 June Taylor <ju...@umn.edu>:
>>
>>> Stefano,
>>>
>>> You would want to search for an appropriate image on Docker Hub. Here is
>>> one I have NO experience with: https://hub.docker.com/_/mysql/
>>>
>>> You would then need to learn about how the image is expecting to be
>>> configured, so you can set it up appropriately.
>>>
>>> This is not really a fully thought out solution. I assume you're trying
>>> to do this for more of a proof-of-concept, though. So it may be fine for
>>> your needs.
>>>
>>>
>>> Thanks,
>>> June Taylor
>>> System Administrator, Minnesota Population Center
>>> University of Minnesota
>>>
>>> On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <ja...@gmail.com>
>>> wrote:
>>>
>>>> My problem is this, where can i find the mysql container? I have just
>>>> said to marathon to rim a wordpress docker container, without specify mysql
>>>> one.
>>>> Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>
>>>>> If you run the wordpress container on a different host to the mysql
>>>>> container and use --link on the command line, does that work?
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Aaron Carey
>>>>> Production Engineer - Cloud Pipeline
>>>>> Industrial Light & Magic
>>>>> London020 3751 9150
>>>>>
>>>>> ------------------------------
>>>>> *From:* Stefano Bianchi [jazzista88@gmail.com]
>>>>> *Sent:* 26 April 2016 16:23
>>>>> *To:* user@mesos.apache.org
>>>>> *Subject:* RE: Launch docker container from Marathon UI
>>>>>
>>>>>
>>>>>
>>>>> Hi Aaron
>>>>> Actually both mesos-dns and calico are running even though these
>>>>> containers im running are not, yet, using the calico ipaddr specific in
>>>>> json description.
>>>>> So i guess it is a problem of bridging, i guess simply specify HOST
>>>>> option on container field in Marathon UI
>>>>> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>>
>>>>>> --link in docker should really be avoided when using marathon/mesos
>>>>>> as it implies the containers are on the same host, but this will not always
>>>>>> be the case when mesos schedules your containers (also I think it's being
>>>>>> deprecated in docker anyway.. not sure though?).
>>>>>>
>>>>>> This problem looks like one of service discovery within the mesos
>>>>>> cluster: how does one service contact the other when it doesn't know which
>>>>>> host the other service may have landed on?
>>>>>>
>>>>>> There are several different solutions for service discovery, you can
>>>>>> look into some like Project Calico to offer a network layer to docker or
>>>>>> try dns based solutions like Mesos-dns or Consul (along with mesos-consul).
>>>>>> I think marathon also has some concept of service discovery built in too if
>>>>>> you use something like haproxy.
>>>>>>
>>>>>> I hope this helps!
>>>>>>
>>>>>> Aaron
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Aaron Carey
>>>>>> Production Engineer - Cloud Pipeline
>>>>>> Industrial Light & Magic
>>>>>> London020 3751 9150
>>>>>>
>>>>>> ------------------------------
>>>>>> *From:* June Taylor [june@umn.edu]
>>>>>> *Sent:* 26 April 2016 15:22
>>>>>> *To:* user@mesos.apache.org
>>>>>> *Subject:* Re: Launch docker container from Marathon UI
>>>>>>
>>>>>>
>>>>>> Stefano,
>>>>>>
>>>>>> The docker run flag --link is intended to connect the container to
>>>>>> another running container. I do not know how this would operate in
>>>>>> marathon. Perhaps it would be an application group which starts up the
>>>>>> mysql docker image first, then the Wordpress docker image after it.
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> June Taylor
>>>>>> System Administrator, Minnesota Population Center
>>>>>> University of Minnesota
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <
>>>>>> jazzista88@gmail.com> wrote:
>>>>>>
>>>>>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file
>>>>>>> that "translate" this command in marathon:
>>>>>>>
>>>>>>> docker run --name some-wordpress --link some-mysql:mysql -d wordpress
>>>>>>>
>>>>>>> i guess the error is relate to the fact that i'm not specifying --link
>>>>>>> some-mysql:mysql
>>>>>>> My problem is that i don't know how to do that, i tried to fill
>>>>>>> environment variable fields:
>>>>>>>
>>>>>>> Key = link
>>>>>>> Value = some-mysql:mysql
>>>>>>>
>>>>>>> But in this way the app does not work as well. How can i configure
>>>>>>> these env variables?
>>>>>>>
>>>>>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>>>>>
>>>>>>>> It says exactly what the problem is.
>>>>>>>>
>>>>>>>> Start a marathon task with correct environment variables in env and
>>>>>>>> you will be fine.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Best regards,?
>>>>>>>> Radek Gruchalski
>>>>>>>> ?radek@gruchalski.com? <ra...@gruchalski.com>
>>>>>>>>
>>>>>>>> de.linkedin.com/in/radgruchalski/
>>>>>>>>
>>>>>>>> *Confidentiality:*
>>>>>>>> This communication is intended for the above-named person and may
>>>>>>>> be confidential and/or legally privileged.
>>>>>>>> If it has come to you in error you must take no action based on it,
>>>>>>>> nor must you copy or show it to anyone; please delete/destroy and inform
>>>>>>>> the sender immediately.
>>>>>>>>
>>>>>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>>>>>
>>>>>>>> jupyter is working fine.
>>>>>>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>>>>>>
>>>>>>>>
>>>>>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP
>>>>>>>> environment variables
>>>>>>>>
>>>>>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>>>>>> external db
>>>>>>>>
>>>>>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Some one of you know this issue?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>> However thank you so much to all!
>>>>>>>>
>>>>>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>> i found the answer by my self sorry if i disturbed you.
>>>>>>>>
>>>>>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>> Now that it is running, how can i check the User Interface?
>>>>>>>>
>>>>>>>>
>>>>>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>>>>
>>>>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>> i have done these 2 commands, now jupyter is in deploying in
>>>>>>>> marathon, staging in mesos.
>>>>>>>> Is there some additional configuration needed?
>>>>>>>>
>>>>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>> June i tried to run your json, but the task is waiting, and if
>>>>>>>> starts it failed immediately.
>>>>>>>>
>>>>>>>> I guess because i did not type this commands:
>>>>>>>>
>>>>>>>>
>>>>>>>>    1.
>>>>>>>>
>>>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>>>
>>>>>>>>    2.
>>>>>>>>
>>>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>>>
>>>>>>>>
>>>>>>>> Could it be the problem?
>>>>>>>>
>>>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>>>> if it is not disturbing you, i try jupyter notebook as well, just
>>>>>>>> to make some tests on how to launch marathon.
>>>>>>>> stay tuned :)
>>>>>>>>
>>>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>>
>>>>>>>> thanks haosdent.
>>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>>
>>>>>>>>
>>>>>>>> {
>>>>>>>>   "container": {
>>>>>>>>     "type": "DOCKER",
>>>>>>>>     "docker": {
>>>>>>>>       "network": "HOST",
>>>>>>>>       "image": "group/image"
>>>>>>>>     },
>>>>>>>>     "volumes": [
>>>>>>>>       {
>>>>>>>>         "containerPath": "/etc/a",
>>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>>         "mode": "RO"
>>>>>>>>       },
>>>>>>>>       {
>>>>>>>>         "containerPath": "/etc/b",
>>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>>         "mode": "RW"
>>>>>>>>       }
>>>>>>>>     ]
>>>>>>>>   }}
>>>>>>>>
>>>>>>>>
>>>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>>>> what is written in this json.
>>>>>>>> What i need to understand is, what i should write in:
>>>>>>>>
>>>>>>>>  "image": "group/image"
>>>>>>>>
>>>>>>>> i mean, with what i have to replace group and image?
>>>>>>>> For instance, if i would run wordpress container on docker hub what
>>>>>>>> i should put replacing "group/image" ?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>>
>>>>>>>> This is marathon REST API document:
>>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>>
>>>>>>>> For example, create tasks.json which content is
>>>>>>>>
>>>>>>>> ```
>>>>>>>> {
>>>>>>>> "id": "/test-sleep",
>>>>>>>> "cmd": "sleep 200"
>>>>>>>> }
>>>>>>>> ```
>>>>>>>>
>>>>>>>> And
>>>>>>>>
>>>>>>>> ```
>>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>>> -d @tasks.json
>>>>>>>> ```
>>>>>>>>
>>>>>>>> You could find more field definitions in their document.
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>
>>>>>>>> Hi guys
>>>>>>>>
>>>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>>>> i' would like to launch a wordpress container, present on docker
>>>>>>>> hub here https://hub.docker.com/_/wordpress/ , from marathon UI
>>>>>>>> but i don't understand the mechanism.
>>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>>> launch wordpress container.
>>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>>> documentation?
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Haosdent Huang
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
Thank you Guillermo Rodriguez
I will try your solution as soon as possible since wordpress is not the
goal task i wanna run, it was just an example to understand how to launch a
docker container, and of course i have chosen the easiest one :P
However, i correctly run Jenkins, Jupyter and Owncloud, now i'm trying to
do the same with hadoop.
Thanks to all guys.

2016-04-27 12:54 GMT+02:00 Guillermo Rodriguez <gu...@spritekin.com>:

> Sorry if it has been answered before.
> You need mesos-dns.
> Start your mysql service on marathon, then mesos-dns will have an entry
> called mysql.marathon.mesos regardless of where the service is started you
> can always use that URL to resolve the mysql service.
>
> Then you start wordpress and specify that your mysql server is
> mysql.marathon.mesos. If you need to setup an env variable in the wordpress
> definition you use the env section like:
> {
>   "id": "wordpress",
>   "cpus": 1,
>   "mem": 512,
>   "container": {
>     "type": "DOCKER",
>     "docker": {
>       "image": "wordpress",
>       "network": "HOST"
>     }
>   },
>   "env": {
>       "WORDPRESS_DB_HOST": "mysql.marathon.mesos:3306",
>   }
> }
>
> Marathon also allows to add dependencies on startup so you can request
> marathon to start the mysql service before starting the wordpress.service.
> Search for the Marathon REST API for more information.
>
> Luck!
>
>
>
>
>
>
>
> ------------------------------
> *From*: "Stefano Bianchi" <ja...@gmail.com>
> *Sent*: Wednesday, April 27, 2016 2:53 AM
>
> *To*: user@mesos.apache.org
> *Subject*: Re: Launch docker container from Marathon UI
>
> Yes i guess i understood, so when i star a socker container like wordpress
> this app could have the need to contact another container as mysql, here
> project calico should be an efficient way to make this.
> Ok i will try, just to understand, first i run the mysql, then mesos will
> allocate it on a certain slave, then i need to run wordpress. How can i
> specify where is the mysql container in marathon UI?
>
> 2016-04-26 17:48 GMT+02:00 June Taylor <ju...@umn.edu>:
>
>> Stefano,
>>
>> You would want to search for an appropriate image on Docker Hub. Here is
>> one I have NO experience with: https://hub.docker.com/_/mysql/
>>
>> You would then need to learn about how the image is expecting to be
>> configured, so you can set it up appropriately.
>>
>> This is not really a fully thought out solution. I assume you're trying
>> to do this for more of a proof-of-concept, though. So it may be fine for
>> your needs.
>>
>>
>> Thanks,
>> June Taylor
>> System Administrator, Minnesota Population Center
>> University of Minnesota
>>
>> On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <ja...@gmail.com>
>> wrote:
>>
>>> My problem is this, where can i find the mysql container? I have just
>>> said to marathon to rim a wordpress docker container, without specify mysql
>>> one.
>>> Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>
>>>> If you run the wordpress container on a different host to the mysql
>>>> container and use --link on the command line, does that work?
>>>>
>>>>
>>>> --
>>>>
>>>> Aaron Carey
>>>> Production Engineer - Cloud Pipeline
>>>> Industrial Light & Magic
>>>> London020 3751 9150
>>>>
>>>> ------------------------------
>>>> *From:* Stefano Bianchi [jazzista88@gmail.com]
>>>> *Sent:* 26 April 2016 16:23
>>>> *To:* user@mesos.apache.org
>>>> *Subject:* RE: Launch docker container from Marathon UI
>>>>
>>>>
>>>>
>>>> Hi Aaron
>>>> Actually both mesos-dns and calico are running even though these
>>>> containers im running are not, yet, using the calico ipaddr specific in
>>>> json description.
>>>> So i guess it is a problem of bridging, i guess simply specify HOST
>>>> option on container field in Marathon UI
>>>> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>>
>>>>> --link in docker should really be avoided when using marathon/mesos as
>>>>> it implies the containers are on the same host, but this will not always be
>>>>> the case when mesos schedules your containers (also I think it's being
>>>>> deprecated in docker anyway.. not sure though?).
>>>>>
>>>>> This problem looks like one of service discovery within the mesos
>>>>> cluster: how does one service contact the other when it doesn't know which
>>>>> host the other service may have landed on?
>>>>>
>>>>> There are several different solutions for service discovery, you can
>>>>> look into some like Project Calico to offer a network layer to docker or
>>>>> try dns based solutions like Mesos-dns or Consul (along with mesos-consul).
>>>>> I think marathon also has some concept of service discovery built in too if
>>>>> you use something like haproxy.
>>>>>
>>>>> I hope this helps!
>>>>>
>>>>> Aaron
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Aaron Carey
>>>>> Production Engineer - Cloud Pipeline
>>>>> Industrial Light & Magic
>>>>> London020 3751 9150
>>>>>
>>>>> ------------------------------
>>>>> *From:* June Taylor [june@umn.edu]
>>>>> *Sent:* 26 April 2016 15:22
>>>>> *To:* user@mesos.apache.org
>>>>> *Subject:* Re: Launch docker container from Marathon UI
>>>>>
>>>>>
>>>>> Stefano,
>>>>>
>>>>> The docker run flag --link is intended to connect the container to
>>>>> another running container. I do not know how this would operate in
>>>>> marathon. Perhaps it would be an application group which starts up the
>>>>> mysql docker image first, then the Wordpress docker image after it.
>>>>>
>>>>>
>>>>> Thanks,
>>>>> June Taylor
>>>>> System Administrator, Minnesota Population Center
>>>>> University of Minnesota
>>>>>
>>>>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <jazzista88@gmail.com
>>>>> > wrote:
>>>>>
>>>>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file
>>>>>> that "translate" this command in marathon:
>>>>>>
>>>>>> docker run --name some-wordpress --link some-mysql:mysql -d wordpress
>>>>>>
>>>>>> i guess the error is relate to the fact that i'm not specifying --link
>>>>>> some-mysql:mysql
>>>>>> My problem is that i don't know how to do that, i tried to fill
>>>>>> environment variable fields:
>>>>>>
>>>>>> Key = link
>>>>>> Value = some-mysql:mysql
>>>>>>
>>>>>> But in this way the app does not work as well. How can i configure
>>>>>> these env variables?
>>>>>>
>>>>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>>>>
>>>>>>> It says exactly what the problem is.
>>>>>>>
>>>>>>> Start a marathon task with correct environment variables in env and
>>>>>>> you will be fine.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Best regards,?
>>>>>>> Radek Gruchalski
>>>>>>> ?radek@gruchalski.com? <ra...@gruchalski.com>
>>>>>>>
>>>>>>> de.linkedin.com/in/radgruchalski/
>>>>>>>
>>>>>>> *Confidentiality:*
>>>>>>> This communication is intended for the above-named person and may be
>>>>>>> confidential and/or legally privileged.
>>>>>>> If it has come to you in error you must take no action based on it,
>>>>>>> nor must you copy or show it to anyone; please delete/destroy and inform
>>>>>>> the sender immediately.
>>>>>>>
>>>>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>>>>
>>>>>>> jupyter is working fine.
>>>>>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>>>>>
>>>>>>>
>>>>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
>>>>>>> variables
>>>>>>>
>>>>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>>>>> external db
>>>>>>>
>>>>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Some one of you know this issue?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> However thank you so much to all!
>>>>>>>
>>>>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> i found the answer by my self sorry if i disturbed you.
>>>>>>>
>>>>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> Now that it is running, how can i check the User Interface?
>>>>>>>
>>>>>>>
>>>>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>>>
>>>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> i have done these 2 commands, now jupyter is in deploying in
>>>>>>> marathon, staging in mesos.
>>>>>>> Is there some additional configuration needed?
>>>>>>>
>>>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> June i tried to run your json, but the task is waiting, and if
>>>>>>> starts it failed immediately.
>>>>>>>
>>>>>>> I guess because i did not type this commands:
>>>>>>>
>>>>>>>
>>>>>>>    1.
>>>>>>>
>>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>>
>>>>>>>    2.
>>>>>>>
>>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>>
>>>>>>>
>>>>>>> Could it be the problem?
>>>>>>>
>>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>>>>> make some tests on how to launch marathon.
>>>>>>> stay tuned :)
>>>>>>>
>>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>> thanks haosdent.
>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>
>>>>>>>
>>>>>>> {
>>>>>>>   "container": {
>>>>>>>     "type": "DOCKER",
>>>>>>>     "docker": {
>>>>>>>       "network": "HOST",
>>>>>>>       "image": "group/image"
>>>>>>>     },
>>>>>>>     "volumes": [
>>>>>>>       {
>>>>>>>         "containerPath": "/etc/a",
>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>         "mode": "RO"
>>>>>>>       },
>>>>>>>       {
>>>>>>>         "containerPath": "/etc/b",
>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>         "mode": "RW"
>>>>>>>       }
>>>>>>>     ]
>>>>>>>   }}
>>>>>>>
>>>>>>>
>>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>>> what is written in this json.
>>>>>>> What i need to understand is, what i should write in:
>>>>>>>
>>>>>>>  "image": "group/image"
>>>>>>>
>>>>>>> i mean, with what i have to replace group and image?
>>>>>>> For instance, if i would run wordpress container on docker hub what
>>>>>>> i should put replacing "group/image" ?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>
>>>>>>> This is marathon REST API document:
>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>
>>>>>>> For example, create tasks.json which content is
>>>>>>>
>>>>>>> ```
>>>>>>> {
>>>>>>> "id": "/test-sleep",
>>>>>>> "cmd": "sleep 200"
>>>>>>> }
>>>>>>> ```
>>>>>>>
>>>>>>> And
>>>>>>>
>>>>>>> ```
>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>> -d @tasks.json
>>>>>>> ```
>>>>>>>
>>>>>>> You could find more field definitions in their document.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>
>>>>>>> Hi guys
>>>>>>>
>>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>>> i' would like to launch a wordpress container, present on docker hub
>>>>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>>>>> don't understand the mechanism.
>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>> launch wordpress container.
>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>> documentation?
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Haosdent Huang
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>

Re: Launch docker container from Marathon UI

Posted by Guillermo Rodriguez <gu...@spritekin.com>.
Sorry if it has been answered before.
 You need mesos-dns. 
 Start your mysql service on marathon, then mesos-dns will have an entry called mysql.marathon.mesos regardless of where the service is started you can always use that URL to resolve the mysql service.
  
 Then you start wordpress and specify that your mysql server is mysql.marathon.mesos. If you need to setup an env variable in the wordpress definition you use the env section like:
 {
  "id": "wordpress",
  "cpus": 1,
  "mem": 512,
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "wordpress",
      "network": "HOST"
    }
  },
  "env": {
      "WORDPRESS_DB_HOST": "mysql.marathon.mesos:3306",
  }
 }
  
 Marathon also allows to add dependencies on startup so you can request marathon to start the mysql service before starting the wordpress.service. Search for the Marathon REST API for more information.
  
 Luck!
  
  
  
  
  
  
  

----------------------------------------
 From: "Stefano Bianchi" <ja...@gmail.com>
Sent: Wednesday, April 27, 2016 2:53 AM
To: user@mesos.apache.org
Subject: Re: Launch docker container from Marathon UI   
 Yes i guess i understood, so when i star a socker container like wordpress this app could have the need to contact another container as mysql, here project calico should be an efficient way to make this.
Ok i will try, just to understand, first i run the mysql, then mesos will allocate it on a certain slave, then i need to run wordpress. How can i specify where is the mysql container in marathon UI?
   2016-04-26 17:48 GMT+02:00 June Taylor <ju...@umn.edu>:   Stefano,  
 You would want to search for an appropriate image on Docker Hub. Here is one I have NO experience with: https://hub.docker.com/_/mysql/
  
 You would then need to learn about how the image is expecting to be configured, so you can set it up appropriately.
  
 This is not really a fully thought out solution. I assume you're trying to do this for more of a proof-of-concept, though. So it may be fine for your needs.

            
 Thanks,
 June Taylor

 System Administrator, Minnesota Population Center
 University of Minnesota

     On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <ja...@gmail.com> wrote:   

My problem is this, where can i find the mysql container? I have just said to marathon to rim a wordpress docker container, without specify mysql one.    Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:    If you run the wordpress container on a different host to the mysql container and use --link on the command line, does that work?    

 --  Aaron Carey Production Engineer - Cloud Pipeline Industrial Light & Magic London 020 3751 9150   

----------------------------------------
 From: Stefano Bianchi [jazzista88@gmail.com]
Sent: 26 April 2016 16:23
To: user@mesos.apache.org
Subject: RE: Launch docker container from Marathon UI 
 
  

Hi Aaron
Actually both mesos-dns and calico are running even though these containers im running are not, yet, using the calico ipaddr specific in json description.
So i guess it is a problem of bridging, i guess simply specify HOST option on container field in Marathon UI  Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:    --link in docker should really be avoided when using marathon/mesos as it implies the containers are on the same host, but this will not always be the case when mesos schedules your containers (also I think it's being deprecated in docker anyway.. not sure though?).

This problem looks like one of service discovery within the mesos cluster: how does one service contact the other when it doesn't know which host the other service may have landed on?

There are several different solutions for service discovery, you can look into some like Project Calico to offer a network layer to docker or try dns based solutions like Mesos-dns or Consul (along with mesos-consul). I think marathon also has some concept of service discovery built in too if you use something like haproxy.

I hope this helps!

Aaron    

 --  Aaron Carey Production Engineer - Cloud Pipeline Industrial Light & Magic London 020 3751 9150   

----------------------------------------
 From: June Taylor [june@umn.edu]
Sent: 26 April 2016 15:22
To: user@mesos.apache.org
Subject: Re: Launch docker container from Marathon UI 
 
  
  Stefano,  
 The docker run flag --link is intended to connect the container to another running container. I do not know how this would operate in marathon. Perhaps it would be an application group which starts up the mysql docker image first, then the Wordpress docker image after it.

            
 Thanks,
 June Taylor

 System Administrator, Minnesota Population Center
 University of Minnesota

   On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi  <ja...@gmail.com> wrote:   Thanks Rad Gruchalski, actually i'm trying to make a json file that "translate" this command in marathon:   
 docker run --name some-wordpress --link some-mysql:mysql -d wordpress
  
 i guess the error is relate to the fact that i'm not specifying --link some-mysql:mysql
 My problem is that i don't know how to do that, i tried to fill environment variable fields:

Key = link 
Value = some-mysql:mysql
  
 But in this way the app does not work as well. How can i configure these env variables?

     2016-04-26 16:01 GMT+02:00 Rad Gruchalski  <ra...@gruchalski.com>:   It says exactly what the problem is.
  
 Start a marathon task with correct environment variables in env and you will be fine.
   

   

   

   

Best regards,?
Radek Gruchalski
?   radek@gruchalski.com?  
de.linkedin.com/in/radgruchalski/   

Confidentiality:   
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.    

On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:     jupyter is working fine.
i tried to run wordpress and i get this error in stderr of mesos:    

error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment variables  

  Did you forget to --link some_mysql_container:mysql or set an external db  

  with -e WORDPRESS_DB_HOST=hostname:port?  

   

   

Some one of you know this issue? 
    
    
    
    
    
    
    
    
    

     

    

   2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:    However thank you so much to all!
     2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:    i found the answer by my self sorry if i disturbed you.
     2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:    Now that it is running, how can i check the User Interface?    

     2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:    Yes, now it's running!!! June you are awesome!!!
     2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:    i have done these 2 commands, now jupyter is in deploying in marathon, staging in mesos.   Is there some additional configuration needed?

     2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:    June i tried to run your json, but the task is waiting, and if starts it failed immediately.    
   I guess because i did not type this commands:
    

 echo 'docker,mesos' > /etc/mesos-slave/containerizers 	

 $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout 	

   Could it be the problem?

     2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:    Thank you June taylor, it is axactly what i was intending.   if it is not disturbing you, i try jupyter notebook as well, just to make some tests on how to launch marathon.
   stay tuned :)

     2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:    thanks haosdent.   actually i have run this kind of apps through rest api.
   Now i want learn how to laung docker files. I found this exaple:
 

 {   "container": {     "type": "DOCKER",     "docker": {       "network": "HOST",       "image": "group/image"     },     "volumes": [       {         "containerPath": "/etc/a",         "hostPath": "/var/data/a",         "mode": "RO"       },       {         "containerPath": "/etc/b",         "hostPath": "/var/data/b",         "mode": "RW"       }     ]   } } 
    
   I am able to link the correspondent field in the marathon UI with what is written in this json.
   What i need to understand is, what i should write in:  

  "image": "group/image"  
   i mean, with what i have to replace group and image?
   For instance, if i would run wordpress container on docker hub what i should put replacing "group/image" ?
    
    
    
    
    
    

     2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:    This is marathon REST API document: https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps . Usually we define a task json file and call the rest api.    
   For example, create tasks.json which content is 
    
   ```
    {
 "id": "/test-sleep",
 "cmd": "sleep 200"
 }

   ```
    
   And 
    
   ```
   curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps -d @tasks.json
   ```
    
   You could find more field definitions in their document.

     On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com> wrote:    Hi guys    
   i'm trying to follow the instructions on mesosphere documentation, but it is a little bit unlear for me that i am new to this world.
   i' would like to launch a wordpress container, present on docker hub here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't understand the mechanism. 
   I understood that i don't have to specify a command in "Command" field, but i don't know how to fill the dockers fields in marathon UI to launch wordpress container.
   Could you please help me or tell me where i can find a clearer documentation?
    
   Thanks.

    

--    Best Regards,   Haosdent Huang 

   



Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
Yes i guess i understood, so when i star a socker container like wordpress
this app could have the need to contact another container as mysql, here
project calico should be an efficient way to make this.
Ok i will try, just to understand, first i run the mysql, then mesos will
allocate it on a certain slave, then i need to run wordpress. How can i
specify where is the mysql container in marathon UI?

2016-04-26 17:48 GMT+02:00 June Taylor <ju...@umn.edu>:

> Stefano,
>
> You would want to search for an appropriate image on Docker Hub. Here is
> one I have NO experience with: https://hub.docker.com/_/mysql/
>
> You would then need to learn about how the image is expecting to be
> configured, so you can set it up appropriately.
>
> This is not really a fully thought out solution. I assume you're trying to
> do this for more of a proof-of-concept, though. So it may be fine for your
> needs.
>
>
> Thanks,
> June Taylor
> System Administrator, Minnesota Population Center
> University of Minnesota
>
> On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <ja...@gmail.com>
> wrote:
>
>> My problem is this, where can i find the mysql container? I have just
>> said to marathon to rim a wordpress docker container, without specify mysql
>> one.
>> Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>
>>> If you run the wordpress container on a different host to the mysql
>>> container and use --link on the command line, does that work?
>>>
>>> --
>>>
>>> Aaron Carey
>>> Production Engineer - Cloud Pipeline
>>> Industrial Light & Magic
>>> London
>>> 020 3751 9150
>>>
>>> ------------------------------
>>> *From:* Stefano Bianchi [jazzista88@gmail.com]
>>> *Sent:* 26 April 2016 16:23
>>> *To:* user@mesos.apache.org
>>> *Subject:* RE: Launch docker container from Marathon UI
>>>
>>> Hi Aaron
>>> Actually both mesos-dns and calico are running even though these
>>> containers im running are not, yet, using the calico ipaddr specific in
>>> json description.
>>> So i guess it is a problem of bridging, i guess simply specify HOST
>>> option on container field in Marathon UI
>>> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>>
>>>> --link in docker should really be avoided when using marathon/mesos as
>>>> it implies the containers are on the same host, but this will not always be
>>>> the case when mesos schedules your containers (also I think it's being
>>>> deprecated in docker anyway.. not sure though?).
>>>>
>>>> This problem looks like one of service discovery within the mesos
>>>> cluster: how does one service contact the other when it doesn't know which
>>>> host the other service may have landed on?
>>>>
>>>> There are several different solutions for service discovery, you can
>>>> look into some like Project Calico to offer a network layer to docker or
>>>> try dns based solutions like Mesos-dns or Consul (along with mesos-consul).
>>>> I think marathon also has some concept of service discovery built in too if
>>>> you use something like haproxy.
>>>>
>>>> I hope this helps!
>>>>
>>>> Aaron
>>>>
>>>> --
>>>>
>>>> Aaron Carey
>>>> Production Engineer - Cloud Pipeline
>>>> Industrial Light & Magic
>>>> London
>>>> 020 3751 9150
>>>>
>>>> ------------------------------
>>>> *From:* June Taylor [june@umn.edu]
>>>> *Sent:* 26 April 2016 15:22
>>>> *To:* user@mesos.apache.org
>>>> *Subject:* Re: Launch docker container from Marathon UI
>>>>
>>>> Stefano,
>>>>
>>>> The docker run flag --link is intended to connect the container to
>>>> another running container. I do not know how this would operate in
>>>> marathon. Perhaps it would be an application group which starts up the
>>>> mysql docker image first, then the Wordpress docker image after it.
>>>>
>>>>
>>>> Thanks,
>>>> June Taylor
>>>> System Administrator, Minnesota Population Center
>>>> University of Minnesota
>>>>
>>>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <ja...@gmail.com>
>>>> wrote:
>>>>
>>>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file that
>>>>> "translate" this command in marathon:
>>>>>
>>>>> docker run --name some-wordpress --link some-mysql:mysql -d wordpress
>>>>>
>>>>> i guess the error is relate to the fact that i'm not specifying --link
>>>>> some-mysql:mysql
>>>>> My problem is that i don't know how to do that, i tried to fill
>>>>> environment variable fields:
>>>>>
>>>>> Key = link
>>>>> Value = some-mysql:mysql
>>>>>
>>>>> But in this way the app does not work as well. How can i configure
>>>>> these env variables?
>>>>>
>>>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>>>
>>>>>> It says exactly what the problem is.
>>>>>>
>>>>>> Start a marathon task with correct environment variables in env and
>>>>>> you will be fine.
>>>>>>
>>>>>> Best regards,
>>>>>> Radek Gruchalski
>>>>>> radek@gruchalski.com <ra...@gruchalski.com>
>>>>>> de.linkedin.com/in/radgruchalski/
>>>>>>
>>>>>>
>>>>>> *Confidentiality: *This communication is intended for the
>>>>>> above-named person and may be confidential and/or legally privileged.
>>>>>> If it has come to you in error you must take no action based on it,
>>>>>> nor must you copy or show it to anyone; please delete/destroy and inform
>>>>>> the sender immediately.
>>>>>>
>>>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>>>
>>>>>> jupyter is working fine.
>>>>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>>>>
>>>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
>>>>>> variables
>>>>>>
>>>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>>>> external db
>>>>>>
>>>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Some one of you know this issue?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>> However thank you so much to all!
>>>>>>
>>>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>> i found the answer by my self sorry if i disturbed you.
>>>>>>
>>>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>> Now that it is running, how can i check the User Interface?
>>>>>>
>>>>>>
>>>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>>
>>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>> i have done these 2 commands, now jupyter is in deploying in
>>>>>> marathon, staging in mesos.
>>>>>> Is there some additional configuration needed?
>>>>>>
>>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>> June i tried to run your json, but the task is waiting, and if starts
>>>>>> it failed immediately.
>>>>>>
>>>>>> I guess because i did not type this commands:
>>>>>>
>>>>>>
>>>>>>    1.
>>>>>>
>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>
>>>>>>    2.
>>>>>>
>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>
>>>>>>
>>>>>> Could it be the problem?
>>>>>>
>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>>>> make some tests on how to launch marathon.
>>>>>> stay tuned :)
>>>>>>
>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>> thanks haosdent.
>>>>>> actually i have run this kind of apps through rest api.
>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>
>>>>>> {
>>>>>>   "container": {
>>>>>>     "type": "DOCKER",
>>>>>>     "docker": {
>>>>>>       "network": "HOST",
>>>>>>       "image": "group/image"
>>>>>>     },
>>>>>>     "volumes": [
>>>>>>       {
>>>>>>         "containerPath": "/etc/a",
>>>>>>         "hostPath": "/var/data/a",
>>>>>>         "mode": "RO"
>>>>>>       },
>>>>>>       {
>>>>>>         "containerPath": "/etc/b",
>>>>>>         "hostPath": "/var/data/b",
>>>>>>         "mode": "RW"
>>>>>>       }
>>>>>>     ]
>>>>>>   }}
>>>>>>
>>>>>>
>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>> what is written in this json.
>>>>>> What i need to understand is, what i should write in:
>>>>>>
>>>>>>  "image": "group/image"
>>>>>>
>>>>>> i mean, with what i have to replace group and image?
>>>>>> For instance, if i would run wordpress container on docker hub what i
>>>>>> should put replacing "group/image" ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>
>>>>>> This is marathon REST API document:
>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>
>>>>>> For example, create tasks.json which content is
>>>>>>
>>>>>> ```
>>>>>> {
>>>>>> "id": "/test-sleep",
>>>>>> "cmd": "sleep 200"
>>>>>> }
>>>>>> ```
>>>>>>
>>>>>> And
>>>>>>
>>>>>> ```
>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>> -d @tasks.json
>>>>>> ```
>>>>>>
>>>>>> You could find more field definitions in their document.
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>> jazzista88@gmail.com> wrote:
>>>>>>
>>>>>> Hi guys
>>>>>>
>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>> i' would like to launch a wordpress container, present on docker hub
>>>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>>>> don't understand the mechanism.
>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>> launch wordpress container.
>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>> documentation?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Haosdent Huang
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>

Re: Launch docker container from Marathon UI

Posted by June Taylor <ju...@umn.edu>.
Stefano,

You would want to search for an appropriate image on Docker Hub. Here is
one I have NO experience with: https://hub.docker.com/_/mysql/

You would then need to learn about how the image is expecting to be
configured, so you can set it up appropriately.

This is not really a fully thought out solution. I assume you're trying to
do this for more of a proof-of-concept, though. So it may be fine for your
needs.


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 10:43 AM, Stefano Bianchi <ja...@gmail.com>
wrote:

> My problem is this, where can i find the mysql container? I have just said
> to marathon to rim a wordpress docker container, without specify mysql one.
> Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:
>
>> If you run the wordpress container on a different host to the mysql
>> container and use --link on the command line, does that work?
>>
>> --
>>
>> Aaron Carey
>> Production Engineer - Cloud Pipeline
>> Industrial Light & Magic
>> London
>> 020 3751 9150
>>
>> ------------------------------
>> *From:* Stefano Bianchi [jazzista88@gmail.com]
>> *Sent:* 26 April 2016 16:23
>> *To:* user@mesos.apache.org
>> *Subject:* RE: Launch docker container from Marathon UI
>>
>> Hi Aaron
>> Actually both mesos-dns and calico are running even though these
>> containers im running are not, yet, using the calico ipaddr specific in
>> json description.
>> So i guess it is a problem of bridging, i guess simply specify HOST
>> option on container field in Marathon UI
>> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>>
>>> --link in docker should really be avoided when using marathon/mesos as
>>> it implies the containers are on the same host, but this will not always be
>>> the case when mesos schedules your containers (also I think it's being
>>> deprecated in docker anyway.. not sure though?).
>>>
>>> This problem looks like one of service discovery within the mesos
>>> cluster: how does one service contact the other when it doesn't know which
>>> host the other service may have landed on?
>>>
>>> There are several different solutions for service discovery, you can
>>> look into some like Project Calico to offer a network layer to docker or
>>> try dns based solutions like Mesos-dns or Consul (along with mesos-consul).
>>> I think marathon also has some concept of service discovery built in too if
>>> you use something like haproxy.
>>>
>>> I hope this helps!
>>>
>>> Aaron
>>>
>>> --
>>>
>>> Aaron Carey
>>> Production Engineer - Cloud Pipeline
>>> Industrial Light & Magic
>>> London
>>> 020 3751 9150
>>>
>>> ------------------------------
>>> *From:* June Taylor [june@umn.edu]
>>> *Sent:* 26 April 2016 15:22
>>> *To:* user@mesos.apache.org
>>> *Subject:* Re: Launch docker container from Marathon UI
>>>
>>> Stefano,
>>>
>>> The docker run flag --link is intended to connect the container to
>>> another running container. I do not know how this would operate in
>>> marathon. Perhaps it would be an application group which starts up the
>>> mysql docker image first, then the Wordpress docker image after it.
>>>
>>>
>>> Thanks,
>>> June Taylor
>>> System Administrator, Minnesota Population Center
>>> University of Minnesota
>>>
>>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <ja...@gmail.com>
>>> wrote:
>>>
>>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file that
>>>> "translate" this command in marathon:
>>>>
>>>> docker run --name some-wordpress --link some-mysql:mysql -d wordpress
>>>>
>>>> i guess the error is relate to the fact that i'm not specifying --link
>>>> some-mysql:mysql
>>>> My problem is that i don't know how to do that, i tried to fill
>>>> environment variable fields:
>>>>
>>>> Key = link
>>>> Value = some-mysql:mysql
>>>>
>>>> But in this way the app does not work as well. How can i configure
>>>> these env variables?
>>>>
>>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>>
>>>>> It says exactly what the problem is.
>>>>>
>>>>> Start a marathon task with correct environment variables in env and
>>>>> you will be fine.
>>>>>
>>>>> Best regards,
>>>>> Radek Gruchalski
>>>>> radek@gruchalski.com <ra...@gruchalski.com>
>>>>> de.linkedin.com/in/radgruchalski/
>>>>>
>>>>>
>>>>> *Confidentiality: *This communication is intended for the above-named
>>>>> person and may be confidential and/or legally privileged.
>>>>> If it has come to you in error you must take no action based on it,
>>>>> nor must you copy or show it to anyone; please delete/destroy and inform
>>>>> the sender immediately.
>>>>>
>>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>>
>>>>> jupyter is working fine.
>>>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>>>
>>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
>>>>> variables
>>>>>
>>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>>> external db
>>>>>
>>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>>
>>>>>
>>>>>
>>>>> Some one of you know this issue?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>> However thank you so much to all!
>>>>>
>>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>> i found the answer by my self sorry if i disturbed you.
>>>>>
>>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>> Now that it is running, how can i check the User Interface?
>>>>>
>>>>>
>>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>> Yes, now it's running!!! June you are awesome!!!
>>>>>
>>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>> i have done these 2 commands, now jupyter is in deploying in marathon,
>>>>> staging in mesos.
>>>>> Is there some additional configuration needed?
>>>>>
>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>> June i tried to run your json, but the task is waiting, and if starts
>>>>> it failed immediately.
>>>>>
>>>>> I guess because i did not type this commands:
>>>>>
>>>>>
>>>>>    1.
>>>>>
>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>
>>>>>    2.
>>>>>
>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>
>>>>>
>>>>> Could it be the problem?
>>>>>
>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>>> make some tests on how to launch marathon.
>>>>> stay tuned :)
>>>>>
>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>> thanks haosdent.
>>>>> actually i have run this kind of apps through rest api.
>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>
>>>>> {
>>>>>   "container": {
>>>>>     "type": "DOCKER",
>>>>>     "docker": {
>>>>>       "network": "HOST",
>>>>>       "image": "group/image"
>>>>>     },
>>>>>     "volumes": [
>>>>>       {
>>>>>         "containerPath": "/etc/a",
>>>>>         "hostPath": "/var/data/a",
>>>>>         "mode": "RO"
>>>>>       },
>>>>>       {
>>>>>         "containerPath": "/etc/b",
>>>>>         "hostPath": "/var/data/b",
>>>>>         "mode": "RW"
>>>>>       }
>>>>>     ]
>>>>>   }}
>>>>>
>>>>>
>>>>> I am able to link the correspondent field in the marathon UI with what
>>>>> is written in this json.
>>>>> What i need to understand is, what i should write in:
>>>>>
>>>>>  "image": "group/image"
>>>>>
>>>>> i mean, with what i have to replace group and image?
>>>>> For instance, if i would run wordpress container on docker hub what i
>>>>> should put replacing "group/image" ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>
>>>>> This is marathon REST API document:
>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>> . Usually we define a task json file and call the rest api.
>>>>>
>>>>> For example, create tasks.json which content is
>>>>>
>>>>> ```
>>>>> {
>>>>> "id": "/test-sleep",
>>>>> "cmd": "sleep 200"
>>>>> }
>>>>> ```
>>>>>
>>>>> And
>>>>>
>>>>> ```
>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>> -d @tasks.json
>>>>> ```
>>>>>
>>>>> You could find more field definitions in their document.
>>>>>
>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <jazzista88@gmail.com
>>>>> > wrote:
>>>>>
>>>>> Hi guys
>>>>>
>>>>> i'm trying to follow the instructions on mesosphere documentation, but
>>>>> it is a little bit unlear for me that i am new to this world.
>>>>> i' would like to launch a wordpress container, present on docker hub
>>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>>> don't understand the mechanism.
>>>>> I understood that i don't have to specify a command in "Command"
>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>> launch wordpress container.
>>>>> Could you please help me or tell me where i can find a clearer
>>>>> documentation?
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Haosdent Huang
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>

Re: Launch docker container from Marathon UI

Posted by Rad Gruchalski <ra...@gruchalski.com>.
Marathon does not know it has to run it. You need to tell Marathon to start mysql container and then tell your wordpress container where is your mysql.










Best regards,

Radek Gruchalski

radek@gruchalski.com (mailto:radek@gruchalski.com)
 (mailto:radek@gruchalski.com)
de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/)

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.



On Tuesday, 26 April 2016 at 17:43, Stefano Bianchi wrote:

> My problem is this, where can i find the mysql container? I have just said to marathon to rim a wordpress docker container, without specify mysql one.
> Il 26/apr/2016 17:39, "Aaron Carey" <acarey@ilm.com (mailto:acarey@ilm.com)> ha scritto:
> > If you run the wordpress container on a different host to the mysql container and use --link on the command line, does that work?
> >  
> > --
> >  
> > Aaron Carey
> > Production Engineer - Cloud Pipeline Industrial Light & Magic London
> > 020 3751 9150  
> > From: Stefano Bianchi [jazzista88@gmail.com (mailto:jazzista88@gmail.com)]
> > Sent: 26 April 2016 16:23
> > To: user@mesos.apache.org (mailto:user@mesos.apache.org)
> > Subject: RE: Launch docker container from Marathon UI
> >  
> > Hi Aaron
> > Actually both mesos-dns and calico are running even though these containers im running are not, yet, using the calico ipaddr specific in json description.
> > So i guess it is a problem of bridging, i guess simply specify HOST option on container field in Marathon UI  
> > Il 26/apr/2016 16:59, "Aaron Carey" <acarey@ilm.com (mailto:acarey@ilm.com)> ha scritto:
> > > --link in docker should really be avoided when using marathon/mesos as it implies the containers are on the same host, but this will not always be the case when mesos schedules your containers (also I think it's being deprecated in docker anyway.. not sure though?).
> > >  
> > > This problem looks like one of service discovery within the mesos cluster: how does one service contact the other when it doesn't know which host the other service may have landed on?
> > >  
> > > There are several different solutions for service discovery, you can look into some like Project Calico to offer a network layer to docker or try dns based solutions like Mesos-dns or Consul (along with mesos-consul). I think marathon also has some concept of service discovery built in too if you use something like haproxy.
> > >  
> > > I hope this helps!
> > >  
> > > Aaron
> > >  
> > > --
> > >  
> > > Aaron Carey
> > > Production Engineer - Cloud Pipeline Industrial Light & Magic London
> > > 020 3751 9150  
> > > From: June Taylor [june@umn.edu (mailto:june@umn.edu)]
> > > Sent: 26 April 2016 15:22
> > > To: user@mesos.apache.org (mailto:user@mesos.apache.org)
> > > Subject: Re: Launch docker container from Marathon UI
> > >  
> > > Stefano,  
> > >  
> > > The docker run flag --link is intended to connect the container to another running container. I do not know how this would operate in marathon. Perhaps it would be an application group which starts up the mysql docker image first, then the Wordpress docker image after it.  
> > >  
> > >  
> > > Thanks,  
> > > June Taylor
> > >  
> > > System Administrator, Minnesota Population Center
> > > University of Minnesota
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > > On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)> wrote:
> > > > Thanks Rad Gruchalski, actually i'm trying to make a json file that "translate" this command in marathon:  
> > > >  
> > > > docker run --name some-wordpress --link some-mysql:mysql -d wordpress  
> > > >  
> > > > i guess the error is relate to the fact that i'm not specifying --link some-mysql:mysql  
> > > > My problem is that i don't know how to do that, i tried to fill environment variable fields:
> > > >  
> > > > Key = link  
> > > > Value = some-mysql:mysql  
> > > >  
> > > > But in this way the app does not work as well. How can i configure these env variables?
> > > >  
> > > > 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <radek@gruchalski.com (mailto:radek@gruchalski.com)>:
> > > > > It says exactly what the problem is.  
> > > > >  
> > > > > Start a marathon task with correct environment variables in env and you will be fine.  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > >  
> > > > > Best regards,

> > > > > Radek Gruchalski
> > > > > 
radek@gruchalski.com (mailto:radek@gruchalski.com)
 (mailto:radek@gruchalski.com)
> > > > > de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/)
> > > > >  
> > > > > Confidentiality:
> > > > > This communication is intended for the above-named person and may be confidential and/or legally privileged.
> > > > > If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.
> > > > >  
> > > > >  
> > > > >  
> > > > > On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
> > > > >  
> > > > > > jupyter is working fine.
> > > > > > i tried to run wordpress and i get this error in stderr of mesos:  
> > > > > >  
> > > > > > error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment variables  
> > > > > >   Did you forget to --link some_mysql_container:mysql or set an external db
> > > > > >   with -e WORDPRESS_DB_HOST=hostname:port?
> > > > > >  
> > > > > >  
> > > > > > Some one of you know this issue?  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > >  
> > > > > > 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > However thank you so much to all!  
> > > > > > >  
> > > > > > > 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > i found the answer by my self sorry if i disturbed you.  
> > > > > > > >  
> > > > > > > > 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > > Now that it is running, how can i check the User Interface?  
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > > > 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > > > Yes, now it's running!!! June you are awesome!!!  
> > > > > > > > > >  
> > > > > > > > > > 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > > > > i have done these 2 commands, now jupyter is in deploying in marathon, staging in mesos.  
> > > > > > > > > > > Is there some additional configuration needed?
> > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > > > 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > > > > > June i tried to run your json, but the task is waiting, and if starts it failed immediately.  
> > > > > > > > > > > >  
> > > > > > > > > > > > I guess because i did not type this commands:  
> > > > > > > > > > > >  
> > > > > > > > > > > > echo 'docker,mesos' > /etc/mesos-slave/containerizers  
> > > > > > > > > > > > $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
> > > > > > > > > > > >  
> > > > > > > > > > > >  
> > > > > > > > > > > >  
> > > > > > > > > > > >  
> > > > > > > > > > > > Could it be the problem?
> > > > > > > > > > > >  
> > > > > > > > > > > >  
> > > > > > > > > > > > 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > > > > > > Thank you June taylor, it is axactly what i was intending.  
> > > > > > > > > > > > > if it is not disturbing you, i try jupyter notebook as well, just to make some tests on how to launch marathon.
> > > > > > > > > > > > > stay tuned :)
> > > > > > > > > > > > >  
> > > > > > > > > > > > >  
> > > > > > > > > > > > > 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > > > > > > > thanks haosdent.  
> > > > > > > > > > > > > > actually i have run this kind of apps through rest api.
> > > > > > > > > > > > > > Now i want learn how to laung docker files. I found this exaple:
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > > { "container": { "type": "DOCKER", "docker": { "network": "HOST", "image": "group/image" }, "volumes": [ { "containerPath": "/etc/a", "hostPath": "/var/data/a", "mode": "RO" }, { "containerPath": "/etc/b", "hostPath": "/var/data/b", "mode": "RW" } ] } }  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > > I am able to link the correspondent field in the marathon UI with what is written in this json.  
> > > > > > > > > > > > > > What i need to understand is, what i should write in:
> > > > > > > > > > > > > > "image": "group/image"  
> > > > > > > > > > > > > > i mean, with what i have to replace group and image?
> > > > > > > > > > > > > > For instance, if i would run wordpress container on docker hub what i should put replacing "group/image" ?
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > > 2016-04-26 14:30 GMT+02:00 haosdent <haosdent@gmail.com (mailto:haosdent@gmail.com)>:
> > > > > > > > > > > > > > > This is marathon REST API document: https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps . Usually we define a task json file and call the rest api.  
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > For example, create tasks.json which content is   
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > ```  
> > > > > > > > > > > > > > > {
> > > > > > > > > > > > > > > "id": "/test-sleep",
> > > > > > > > > > > > > > > "cmd": "sleep 200"
> > > > > > > > > > > > > > > }
> > > > > > > > > > > > > > > ```  
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > And   
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > ```  
> > > > > > > > > > > > > > > curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps -d @tasks.json
> > > > > > > > > > > > > > > ```  
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > You could find more field definitions in their document.  
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)> wrote:
> > > > > > > > > > > > > > > > Hi guys  
> > > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > > i'm trying to follow the instructions on mesosphere documentation, but it is a little bit unlear for me that i am new to this world.  
> > > > > > > > > > > > > > > > i' would like to launch a wordpress container, present on docker hub here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't understand the mechanism.  
> > > > > > > > > > > > > > > > I understood that i don't have to specify a command in "Command" field, but i don't know how to fill the dockers fields in marathon UI to launch wordpress container.
> > > > > > > > > > > > > > > > Could you please help me or tell me where i can find a clearer documentation?
> > > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > > Thanks.  
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > --  
> > > > > > > > > > > > > > > Best Regards,
> > > > > > > > > > > > > > > Haosdent Huang  
> > > > > > > > > > > > >  
> > > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > >  
> > > > > > > >  
> > > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > >  


RE: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
My problem is this, where can i find the mysql container? I have just said
to marathon to rim a wordpress docker container, without specify mysql one.
Il 26/apr/2016 17:39, "Aaron Carey" <ac...@ilm.com> ha scritto:

> If you run the wordpress container on a different host to the mysql
> container and use --link on the command line, does that work?
>
> --
>
> Aaron Carey
> Production Engineer - Cloud Pipeline
> Industrial Light & Magic
> London
> 020 3751 9150
>
> ------------------------------
> *From:* Stefano Bianchi [jazzista88@gmail.com]
> *Sent:* 26 April 2016 16:23
> *To:* user@mesos.apache.org
> *Subject:* RE: Launch docker container from Marathon UI
>
> Hi Aaron
> Actually both mesos-dns and calico are running even though these
> containers im running are not, yet, using the calico ipaddr specific in
> json description.
> So i guess it is a problem of bridging, i guess simply specify HOST option
> on container field in Marathon UI
> Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:
>
>> --link in docker should really be avoided when using marathon/mesos as it
>> implies the containers are on the same host, but this will not always be
>> the case when mesos schedules your containers (also I think it's being
>> deprecated in docker anyway.. not sure though?).
>>
>> This problem looks like one of service discovery within the mesos
>> cluster: how does one service contact the other when it doesn't know which
>> host the other service may have landed on?
>>
>> There are several different solutions for service discovery, you can look
>> into some like Project Calico to offer a network layer to docker or try dns
>> based solutions like Mesos-dns or Consul (along with mesos-consul). I think
>> marathon also has some concept of service discovery built in too if you use
>> something like haproxy.
>>
>> I hope this helps!
>>
>> Aaron
>>
>> --
>>
>> Aaron Carey
>> Production Engineer - Cloud Pipeline
>> Industrial Light & Magic
>> London
>> 020 3751 9150
>>
>> ------------------------------
>> *From:* June Taylor [june@umn.edu]
>> *Sent:* 26 April 2016 15:22
>> *To:* user@mesos.apache.org
>> *Subject:* Re: Launch docker container from Marathon UI
>>
>> Stefano,
>>
>> The docker run flag --link is intended to connect the container to
>> another running container. I do not know how this would operate in
>> marathon. Perhaps it would be an application group which starts up the
>> mysql docker image first, then the Wordpress docker image after it.
>>
>>
>> Thanks,
>> June Taylor
>> System Administrator, Minnesota Population Center
>> University of Minnesota
>>
>> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <ja...@gmail.com>
>> wrote:
>>
>>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file that
>>> "translate" this command in marathon:
>>>
>>> docker run --name some-wordpress --link some-mysql:mysql -d wordpress
>>>
>>> i guess the error is relate to the fact that i'm not specifying --link
>>> some-mysql:mysql
>>> My problem is that i don't know how to do that, i tried to fill
>>> environment variable fields:
>>>
>>> Key = link
>>> Value = some-mysql:mysql
>>>
>>> But in this way the app does not work as well. How can i configure these
>>> env variables?
>>>
>>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>>
>>>> It says exactly what the problem is.
>>>>
>>>> Start a marathon task with correct environment variables in env and you
>>>> will be fine.
>>>>
>>>> Best regards,
>>>> Radek Gruchalski
>>>> radek@gruchalski.com <ra...@gruchalski.com>
>>>> de.linkedin.com/in/radgruchalski/
>>>>
>>>>
>>>> *Confidentiality: *This communication is intended for the above-named
>>>> person and may be confidential and/or legally privileged.
>>>> If it has come to you in error you must take no action based on it, nor
>>>> must you copy or show it to anyone; please delete/destroy and inform the
>>>> sender immediately.
>>>>
>>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>>
>>>> jupyter is working fine.
>>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>>
>>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
>>>> variables
>>>>
>>>>   Did you forget to --link some_mysql_container:mysql or set an
>>>> external db
>>>>
>>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>>
>>>>
>>>>
>>>> Some one of you know this issue?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>> However thank you so much to all!
>>>>
>>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>> i found the answer by my self sorry if i disturbed you.
>>>>
>>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>> Now that it is running, how can i check the User Interface?
>>>>
>>>>
>>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>> Yes, now it's running!!! June you are awesome!!!
>>>>
>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>> i have done these 2 commands, now jupyter is in deploying in marathon,
>>>> staging in mesos.
>>>> Is there some additional configuration needed?
>>>>
>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>> June i tried to run your json, but the task is waiting, and if starts
>>>> it failed immediately.
>>>>
>>>> I guess because i did not type this commands:
>>>>
>>>>
>>>>    1.
>>>>
>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>
>>>>    2.
>>>>
>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>
>>>>
>>>> Could it be the problem?
>>>>
>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>> Thank you June taylor, it is axactly what i was intending.
>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>> make some tests on how to launch marathon.
>>>> stay tuned :)
>>>>
>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>> thanks haosdent.
>>>> actually i have run this kind of apps through rest api.
>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>
>>>> {
>>>>   "container": {
>>>>     "type": "DOCKER",
>>>>     "docker": {
>>>>       "network": "HOST",
>>>>       "image": "group/image"
>>>>     },
>>>>     "volumes": [
>>>>       {
>>>>         "containerPath": "/etc/a",
>>>>         "hostPath": "/var/data/a",
>>>>         "mode": "RO"
>>>>       },
>>>>       {
>>>>         "containerPath": "/etc/b",
>>>>         "hostPath": "/var/data/b",
>>>>         "mode": "RW"
>>>>       }
>>>>     ]
>>>>   }}
>>>>
>>>>
>>>> I am able to link the correspondent field in the marathon UI with what
>>>> is written in this json.
>>>> What i need to understand is, what i should write in:
>>>>
>>>>  "image": "group/image"
>>>>
>>>> i mean, with what i have to replace group and image?
>>>> For instance, if i would run wordpress container on docker hub what i
>>>> should put replacing "group/image" ?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>
>>>> This is marathon REST API document:
>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>> . Usually we define a task json file and call the rest api.
>>>>
>>>> For example, create tasks.json which content is
>>>>
>>>> ```
>>>> {
>>>> "id": "/test-sleep",
>>>> "cmd": "sleep 200"
>>>> }
>>>> ```
>>>>
>>>> And
>>>>
>>>> ```
>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>> -d @tasks.json
>>>> ```
>>>>
>>>> You could find more field definitions in their document.
>>>>
>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi guys
>>>>
>>>> i'm trying to follow the instructions on mesosphere documentation, but
>>>> it is a little bit unlear for me that i am new to this world.
>>>> i' would like to launch a wordpress container, present on docker hub
>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>> don't understand the mechanism.
>>>> I understood that i don't have to specify a command in "Command" field,
>>>> but i don't know how to fill the dockers fields in marathon UI to launch
>>>> wordpress container.
>>>> Could you please help me or tell me where i can find a clearer
>>>> documentation?
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Haosdent Huang
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>

RE: Launch docker container from Marathon UI

Posted by Aaron Carey <ac...@ilm.com>.
If you run the wordpress container on a different host to the mysql container and use --link on the command line, does that work?


--

Aaron Carey
Production Engineer - Cloud Pipeline
Industrial Light & Magic
London
020 3751 9150

________________________________
From: Stefano Bianchi [jazzista88@gmail.com]
Sent: 26 April 2016 16:23
To: user@mesos.apache.org
Subject: RE: Launch docker container from Marathon UI


Hi Aaron
Actually both mesos-dns and calico are running even though these containers im running are not, yet, using the calico ipaddr specific in json description.
So i guess it is a problem of bridging, i guess simply specify HOST option on container field in Marathon UI

Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com>> ha scritto:
--link in docker should really be avoided when using marathon/mesos as it implies the containers are on the same host, but this will not always be the case when mesos schedules your containers (also I think it's being deprecated in docker anyway.. not sure though?).

This problem looks like one of service discovery within the mesos cluster: how does one service contact the other when it doesn't know which host the other service may have landed on?

There are several different solutions for service discovery, you can look into some like Project Calico to offer a network layer to docker or try dns based solutions like Mesos-dns or Consul (along with mesos-consul). I think marathon also has some concept of service discovery built in too if you use something like haproxy.

I hope this helps!

Aaron


--

Aaron Carey
Production Engineer - Cloud Pipeline
Industrial Light & Magic
London
020 3751 9150

________________________________
From: June Taylor [june@umn.edu<ma...@umn.edu>]
Sent: 26 April 2016 15:22
To: user@mesos.apache.org<ma...@mesos.apache.org>
Subject: Re: Launch docker container from Marathon UI

Stefano,

The docker run flag --link is intended to connect the container to another running container. I do not know how this would operate in marathon. Perhaps it would be an application group which starts up the mysql docker image first, then the Wordpress docker image after it.


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <ja...@gmail.com>> wrote:
Thanks Rad Gruchalski, actually i'm trying to make a json file that "translate" this command in marathon:

docker run --name some-wordpress --link some-mysql:mysql -d wordpress

i guess the error is relate to the fact that i'm not specifying --link some-mysql:mysql
My problem is that i don't know how to do that, i tried to fill environment variable fields:

Key = link
Value = some-mysql:mysql

But in this way the app does not work as well. How can i configure these env variables?

2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>>:
It says exactly what the problem is.

Start a marathon task with correct environment variables in env and you will be fine.


Best regards,

Radek Gruchalski

radek@gruchalski.com<ma...@gruchalski.com>
<ma...@gruchalski.com>
de.linkedin.com/in/radgruchalski/<http://de.linkedin.com/in/radgruchalski/>

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.

On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:

jupyter is working fine.
i tried to run wordpress and i get this error in stderr of mesos:


error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment variables

  Did you forget to --link some_mysql_container:mysql or set an external db

  with -e WORDPRESS_DB_HOST=hostname:port?



Some one of you know this issue?












2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
However thank you so much to all!

2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
i found the answer by my self sorry if i disturbed you.

2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Now that it is running, how can i check the User Interface?


2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Yes, now it's running!!! June you are awesome!!!

2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
i have done these 2 commands, now jupyter is in deploying in marathon, staging in mesos.
Is there some additional configuration needed?

2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
June i tried to run your json, but the task is waiting, and if starts it failed immediately.

I guess because i did not type this commands:


  1.

echo 'docker,mesos' > /etc/mesos-slave/containerizers

  2.

$ echo '5mins' > /etc/mesos-slave/executor_registration_timeout

Could it be the problem?

2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Thank you June taylor, it is axactly what i was intending.
if it is not disturbing you, i try jupyter notebook as well, just to make some tests on how to launch marathon.
stay tuned :)

2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
thanks haosdent.
actually i have run this kind of apps through rest api.
Now i want learn how to laung docker files. I found this exaple:


{
  "container": {
    "type": "DOCKER",
    "docker": {
      "network": "HOST",
      "image": "group/image"
    },
    "volumes": [
      {
        "containerPath": "/etc/a",
        "hostPath": "/var/data/a",
        "mode": "RO"
      },
      {
        "containerPath": "/etc/b",
        "hostPath": "/var/data/b",
        "mode": "RW"
      }
    ]
  }
}

I am able to link the correspondent field in the marathon UI with what is written in this json.
What i need to understand is, what i should write in:

 "image": "group/image"

i mean, with what i have to replace group and image?
For instance, if i would run wordpress container on docker hub what i should put replacing "group/image" ?







2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>>:
This is marathon REST API document: https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps . Usually we define a task json file and call the rest api.

For example, create tasks.json which content is

```
{
"id": "/test-sleep",
"cmd": "sleep 200"
}
```

And

```
curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps -d @tasks.json
```

You could find more field definitions in their document.

On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>> wrote:
Hi guys

i'm trying to follow the instructions on mesosphere documentation, but it is a little bit unlear for me that i am new to this world.
i' would like to launch a wordpress container, present on docker hub here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't understand the mechanism.
I understood that i don't have to specify a command in "Command" field, but i don't know how to fill the dockers fields in marathon UI to launch wordpress container.
Could you please help me or tell me where i can find a clearer documentation?

Thanks.



--
Best Regards,
Haosdent Huang













RE: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
Hi Aaron
Actually both mesos-dns and calico are running even though these containers
im running are not, yet, using the calico ipaddr specific in json
description.
So i guess it is a problem of bridging, i guess simply specify HOST option
on container field in Marathon UI
Il 26/apr/2016 16:59, "Aaron Carey" <ac...@ilm.com> ha scritto:

> --link in docker should really be avoided when using marathon/mesos as it
> implies the containers are on the same host, but this will not always be
> the case when mesos schedules your containers (also I think it's being
> deprecated in docker anyway.. not sure though?).
>
> This problem looks like one of service discovery within the mesos cluster:
> how does one service contact the other when it doesn't know which host the
> other service may have landed on?
>
> There are several different solutions for service discovery, you can look
> into some like Project Calico to offer a network layer to docker or try dns
> based solutions like Mesos-dns or Consul (along with mesos-consul). I think
> marathon also has some concept of service discovery built in too if you use
> something like haproxy.
>
> I hope this helps!
>
> Aaron
>
> --
>
> Aaron Carey
> Production Engineer - Cloud Pipeline
> Industrial Light & Magic
> London
> 020 3751 9150
>
> ------------------------------
> *From:* June Taylor [june@umn.edu]
> *Sent:* 26 April 2016 15:22
> *To:* user@mesos.apache.org
> *Subject:* Re: Launch docker container from Marathon UI
>
> Stefano,
>
> The docker run flag --link is intended to connect the container to another
> running container. I do not know how this would operate in marathon.
> Perhaps it would be an application group which starts up the mysql docker
> image first, then the Wordpress docker image after it.
>
>
> Thanks,
> June Taylor
> System Administrator, Minnesota Population Center
> University of Minnesota
>
> On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <ja...@gmail.com>
> wrote:
>
>> Thanks *Rad* Gruchalski, actually i'm trying to make a json file that
>> "translate" this command in marathon:
>>
>> docker run --name some-wordpress --link some-mysql:mysql -d wordpress
>>
>> i guess the error is relate to the fact that i'm not specifying --link
>> some-mysql:mysql
>> My problem is that i don't know how to do that, i tried to fill
>> environment variable fields:
>>
>> Key = link
>> Value = some-mysql:mysql
>>
>> But in this way the app does not work as well. How can i configure these
>> env variables?
>>
>> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>>
>>> It says exactly what the problem is.
>>>
>>> Start a marathon task with correct environment variables in env and you
>>> will be fine.
>>>
>>> Best regards,
>>> Radek Gruchalski
>>> radek@gruchalski.com <ra...@gruchalski.com>
>>> de.linkedin.com/in/radgruchalski/
>>>
>>>
>>> *Confidentiality: *This communication is intended for the above-named
>>> person and may be confidential and/or legally privileged.
>>> If it has come to you in error you must take no action based on it, nor
>>> must you copy or show it to anyone; please delete/destroy and inform the
>>> sender immediately.
>>>
>>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>>
>>> jupyter is working fine.
>>> i tried to run wordpress and i get this error in stderr of mesos:
>>>
>>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
>>> variables
>>>
>>>   Did you forget to --link some_mysql_container:mysql or set an external
>>> db
>>>
>>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>>
>>>
>>>
>>> Some one of you know this issue?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>> However thank you so much to all!
>>>
>>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>> i found the answer by my self sorry if i disturbed you.
>>>
>>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>> Now that it is running, how can i check the User Interface?
>>>
>>>
>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>> Yes, now it's running!!! June you are awesome!!!
>>>
>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>> i have done these 2 commands, now jupyter is in deploying in marathon,
>>> staging in mesos.
>>> Is there some additional configuration needed?
>>>
>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>> June i tried to run your json, but the task is waiting, and if starts it
>>> failed immediately.
>>>
>>> I guess because i did not type this commands:
>>>
>>>
>>>    1.
>>>
>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>
>>>    2.
>>>
>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>
>>>
>>> Could it be the problem?
>>>
>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>> Thank you June taylor, it is axactly what i was intending.
>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>> make some tests on how to launch marathon.
>>> stay tuned :)
>>>
>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>> thanks haosdent.
>>> actually i have run this kind of apps through rest api.
>>> Now i want learn how to laung docker files. I found this exaple:
>>>
>>> {
>>>   "container": {
>>>     "type": "DOCKER",
>>>     "docker": {
>>>       "network": "HOST",
>>>       "image": "group/image"
>>>     },
>>>     "volumes": [
>>>       {
>>>         "containerPath": "/etc/a",
>>>         "hostPath": "/var/data/a",
>>>         "mode": "RO"
>>>       },
>>>       {
>>>         "containerPath": "/etc/b",
>>>         "hostPath": "/var/data/b",
>>>         "mode": "RW"
>>>       }
>>>     ]
>>>   }}
>>>
>>>
>>> I am able to link the correspondent field in the marathon UI with what
>>> is written in this json.
>>> What i need to understand is, what i should write in:
>>>
>>>  "image": "group/image"
>>>
>>> i mean, with what i have to replace group and image?
>>> For instance, if i would run wordpress container on docker hub what i
>>> should put replacing "group/image" ?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>
>>> This is marathon REST API document:
>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps .
>>> Usually we define a task json file and call the rest api.
>>>
>>> For example, create tasks.json which content is
>>>
>>> ```
>>> {
>>> "id": "/test-sleep",
>>> "cmd": "sleep 200"
>>> }
>>> ```
>>>
>>> And
>>>
>>> ```
>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>> -d @tasks.json
>>> ```
>>>
>>> You could find more field definitions in their document.
>>>
>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
>>> wrote:
>>>
>>> Hi guys
>>>
>>> i'm trying to follow the instructions on mesosphere documentation, but
>>> it is a little bit unlear for me that i am new to this world.
>>> i' would like to launch a wordpress container, present on docker hub
>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't
>>> understand the mechanism.
>>> I understood that i don't have to specify a command in "Command" field,
>>> but i don't know how to fill the dockers fields in marathon UI to launch
>>> wordpress container.
>>> Could you please help me or tell me where i can find a clearer
>>> documentation?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Haosdent Huang
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>

RE: Launch docker container from Marathon UI

Posted by Aaron Carey <ac...@ilm.com>.
--link in docker should really be avoided when using marathon/mesos as it implies the containers are on the same host, but this will not always be the case when mesos schedules your containers (also I think it's being deprecated in docker anyway.. not sure though?).

This problem looks like one of service discovery within the mesos cluster: how does one service contact the other when it doesn't know which host the other service may have landed on?

There are several different solutions for service discovery, you can look into some like Project Calico to offer a network layer to docker or try dns based solutions like Mesos-dns or Consul (along with mesos-consul). I think marathon also has some concept of service discovery built in too if you use something like haproxy.

I hope this helps!

Aaron


--

Aaron Carey
Production Engineer - Cloud Pipeline
Industrial Light & Magic
London
020 3751 9150

________________________________
From: June Taylor [june@umn.edu]
Sent: 26 April 2016 15:22
To: user@mesos.apache.org
Subject: Re: Launch docker container from Marathon UI

Stefano,

The docker run flag --link is intended to connect the container to another running container. I do not know how this would operate in marathon. Perhaps it would be an application group which starts up the mysql docker image first, then the Wordpress docker image after it.


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <ja...@gmail.com>> wrote:
Thanks Rad Gruchalski, actually i'm trying to make a json file that "translate" this command in marathon:

docker run --name some-wordpress --link some-mysql:mysql -d wordpress

i guess the error is relate to the fact that i'm not specifying --link some-mysql:mysql
My problem is that i don't know how to do that, i tried to fill environment variable fields:

Key = link
Value = some-mysql:mysql

But in this way the app does not work as well. How can i configure these env variables?

2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>>:
It says exactly what the problem is.

Start a marathon task with correct environment variables in env and you will be fine.


Best regards,

Radek Gruchalski

radek@gruchalski.com<ma...@gruchalski.com>
<ma...@gruchalski.com>
de.linkedin.com/in/radgruchalski/<http://de.linkedin.com/in/radgruchalski/>

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.

On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:

jupyter is working fine.
i tried to run wordpress and i get this error in stderr of mesos:


error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment variables

  Did you forget to --link some_mysql_container:mysql or set an external db

  with -e WORDPRESS_DB_HOST=hostname:port?



Some one of you know this issue?












2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
However thank you so much to all!

2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
i found the answer by my self sorry if i disturbed you.

2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Now that it is running, how can i check the User Interface?


2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Yes, now it's running!!! June you are awesome!!!

2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
i have done these 2 commands, now jupyter is in deploying in marathon, staging in mesos.
Is there some additional configuration needed?

2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
June i tried to run your json, but the task is waiting, and if starts it failed immediately.

I guess because i did not type this commands:


  1.

echo 'docker,mesos' > /etc/mesos-slave/containerizers

  2.

$ echo '5mins' > /etc/mesos-slave/executor_registration_timeout

Could it be the problem?

2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
Thank you June taylor, it is axactly what i was intending.
if it is not disturbing you, i try jupyter notebook as well, just to make some tests on how to launch marathon.
stay tuned :)

2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>>:
thanks haosdent.
actually i have run this kind of apps through rest api.
Now i want learn how to laung docker files. I found this exaple:


{
  "container": {
    "type": "DOCKER",
    "docker": {
      "network": "HOST",
      "image": "group/image"
    },
    "volumes": [
      {
        "containerPath": "/etc/a",
        "hostPath": "/var/data/a",
        "mode": "RO"
      },
      {
        "containerPath": "/etc/b",
        "hostPath": "/var/data/b",
        "mode": "RW"
      }
    ]
  }
}

I am able to link the correspondent field in the marathon UI with what is written in this json.
What i need to understand is, what i should write in:

 "image": "group/image"

i mean, with what i have to replace group and image?
For instance, if i would run wordpress container on docker hub what i should put replacing "group/image" ?







2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>>:
This is marathon REST API document: https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps . Usually we define a task json file and call the rest api.

For example, create tasks.json which content is

```
{
"id": "/test-sleep",
"cmd": "sleep 200"
}
```

And

```
curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps -d @tasks.json
```

You could find more field definitions in their document.

On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>> wrote:
Hi guys

i'm trying to follow the instructions on mesosphere documentation, but it is a little bit unlear for me that i am new to this world.
i' would like to launch a wordpress container, present on docker hub here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't understand the mechanism.
I understood that i don't have to specify a command in "Command" field, but i don't know how to fill the dockers fields in marathon UI to launch wordpress container.
Could you please help me or tell me where i can find a clearer documentation?

Thanks.



--
Best Regards,
Haosdent Huang













Re: Launch docker container from Marathon UI

Posted by June Taylor <ju...@umn.edu>.
Stefano,

The docker run flag --link is intended to connect the container to another
running container. I do not know how this would operate in marathon.
Perhaps it would be an application group which starts up the mysql docker
image first, then the Wordpress docker image after it.


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 9:20 AM, Stefano Bianchi <ja...@gmail.com>
wrote:

> Thanks *Rad* Gruchalski, actually i'm trying to make a json file that
> "translate" this command in marathon:
>
> docker run --name some-wordpress --link some-mysql:mysql -d wordpress
>
> i guess the error is relate to the fact that i'm not specifying --link
> some-mysql:mysql
> My problem is that i don't know how to do that, i tried to fill
> environment variable fields:
>
> Key = link
> Value = some-mysql:mysql
>
> But in this way the app does not work as well. How can i configure these
> env variables?
>
> 2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:
>
>> It says exactly what the problem is.
>>
>> Start a marathon task with correct environment variables in env and you
>> will be fine.
>>
>> Best regards,
>> Radek Gruchalski
>> radek@gruchalski.com <ra...@gruchalski.com>
>> de.linkedin.com/in/radgruchalski/
>>
>>
>> *Confidentiality:*This communication is intended for the above-named
>> person and may be confidential and/or legally privileged.
>> If it has come to you in error you must take no action based on it, nor
>> must you copy or show it to anyone; please delete/destroy and inform the
>> sender immediately.
>>
>> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>>
>> jupyter is working fine.
>> i tried to run wordpress and i get this error in stderr of mesos:
>>
>> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
>> variables
>>
>>   Did you forget to --link some_mysql_container:mysql or set an external
>> db
>>
>>   with -e WORDPRESS_DB_HOST=hostname:port?
>>
>>
>>
>> Some one of you know this issue?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>> However thank you so much to all!
>>
>> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>> i found the answer by my self sorry if i disturbed you.
>>
>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>> Now that it is running, how can i check the User Interface?
>>
>>
>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>> Yes, now it's running!!! June you are awesome!!!
>>
>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>> i have done these 2 commands, now jupyter is in deploying in marathon,
>> staging in mesos.
>> Is there some additional configuration needed?
>>
>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>> June i tried to run your json, but the task is waiting, and if starts it
>> failed immediately.
>>
>> I guess because i did not type this commands:
>>
>>
>>    1.
>>
>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>
>>    2.
>>
>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>
>>
>> Could it be the problem?
>>
>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>> Thank you June taylor, it is axactly what i was intending.
>> if it is not disturbing you, i try jupyter notebook as well, just to make
>> some tests on how to launch marathon.
>> stay tuned :)
>>
>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>> thanks haosdent.
>> actually i have run this kind of apps through rest api.
>> Now i want learn how to laung docker files. I found this exaple:
>>
>> {
>>   "container": {
>>     "type": "DOCKER",
>>     "docker": {
>>       "network": "HOST",
>>       "image": "group/image"
>>     },
>>     "volumes": [
>>       {
>>         "containerPath": "/etc/a",
>>         "hostPath": "/var/data/a",
>>         "mode": "RO"
>>       },
>>       {
>>         "containerPath": "/etc/b",
>>         "hostPath": "/var/data/b",
>>         "mode": "RW"
>>       }
>>     ]
>>   }}
>>
>>
>> I am able to link the correspondent field in the marathon UI with what is
>> written in this json.
>> What i need to understand is, what i should write in:
>>
>>  "image": "group/image"
>>
>> i mean, with what i have to replace group and image?
>> For instance, if i would run wordpress container on docker hub what i
>> should put replacing "group/image" ?
>>
>>
>>
>>
>>
>>
>>
>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>
>> This is marathon REST API document:
>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps .
>> Usually we define a task json file and call the rest api.
>>
>> For example, create tasks.json which content is
>>
>> ```
>> {
>> "id": "/test-sleep",
>> "cmd": "sleep 200"
>> }
>> ```
>>
>> And
>>
>> ```
>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>> -d @tasks.json
>> ```
>>
>> You could find more field definitions in their document.
>>
>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
>> wrote:
>>
>> Hi guys
>>
>> i'm trying to follow the instructions on mesosphere documentation, but it
>> is a little bit unlear for me that i am new to this world.
>> i' would like to launch a wordpress container, present on docker hub here
>> https://hub.docker.com/_/wordpress/ , from marathon UI but i don't
>> understand the mechanism.
>> I understood that i don't have to specify a command in "Command" field,
>> but i don't know how to fill the dockers fields in marathon UI to launch
>> wordpress container.
>> Could you please help me or tell me where i can find a clearer
>> documentation?
>>
>> Thanks.
>>
>>
>>
>>
>> --
>> Best Regards,
>> Haosdent Huang
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
Thanks *Rad* Gruchalski, actually i'm trying to make a json file that
"translate" this command in marathon:

docker run --name some-wordpress --link some-mysql:mysql -d wordpress

i guess the error is relate to the fact that i'm not specifying --link
some-mysql:mysql
My problem is that i don't know how to do that, i tried to fill environment
variable fields:

Key = link
Value = some-mysql:mysql

But in this way the app does not work as well. How can i configure these
env variables?

2016-04-26 16:01 GMT+02:00 Rad Gruchalski <ra...@gruchalski.com>:

> It says exactly what the problem is.
>
> Start a marathon task with correct environment variables in env and you
> will be fine.
>
> Best regards,
> Radek Gruchalski
> radek@gruchalski.com <ra...@gruchalski.com>
> de.linkedin.com/in/radgruchalski/
>
>
> *Confidentiality:*This communication is intended for the above-named
> person and may be confidential and/or legally privileged.
> If it has come to you in error you must take no action based on it, nor
> must you copy or show it to anyone; please delete/destroy and inform the
> sender immediately.
>
> On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:
>
> jupyter is working fine.
> i tried to run wordpress and i get this error in stderr of mesos:
>
> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
> variables
>
>   Did you forget to --link some_mysql_container:mysql or set an external db
>
>   with -e WORDPRESS_DB_HOST=hostname:port?
>
>
>
> Some one of you know this issue?
>
>
>
>
>
>
>
>
>
>
>
>
> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
> However thank you so much to all!
>
> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
> i found the answer by my self sorry if i disturbed you.
>
> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
> Now that it is running, how can i check the User Interface?
>
>
> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
> Yes, now it's running!!! June you are awesome!!!
>
> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
> i have done these 2 commands, now jupyter is in deploying in marathon,
> staging in mesos.
> Is there some additional configuration needed?
>
> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
> June i tried to run your json, but the task is waiting, and if starts it
> failed immediately.
>
> I guess because i did not type this commands:
>
>
>    1.
>
>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>
>    2.
>
>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>
>
> Could it be the problem?
>
> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
> Thank you June taylor, it is axactly what i was intending.
> if it is not disturbing you, i try jupyter notebook as well, just to make
> some tests on how to launch marathon.
> stay tuned :)
>
> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
> thanks haosdent.
> actually i have run this kind of apps through rest api.
> Now i want learn how to laung docker files. I found this exaple:
>
> {
>   "container": {
>     "type": "DOCKER",
>     "docker": {
>       "network": "HOST",
>       "image": "group/image"
>     },
>     "volumes": [
>       {
>         "containerPath": "/etc/a",
>         "hostPath": "/var/data/a",
>         "mode": "RO"
>       },
>       {
>         "containerPath": "/etc/b",
>         "hostPath": "/var/data/b",
>         "mode": "RW"
>       }
>     ]
>   }}
>
>
> I am able to link the correspondent field in the marathon UI with what is
> written in this json.
> What i need to understand is, what i should write in:
>
>  "image": "group/image"
>
> i mean, with what i have to replace group and image?
> For instance, if i would run wordpress container on docker hub what i
> should put replacing "group/image" ?
>
>
>
>
>
>
>
> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>
> This is marathon REST API document:
> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps .
> Usually we define a task json file and call the rest api.
>
> For example, create tasks.json which content is
>
> ```
> {
> "id": "/test-sleep",
> "cmd": "sleep 200"
> }
> ```
>
> And
>
> ```
> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
> -d @tasks.json
> ```
>
> You could find more field definitions in their document.
>
> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
> wrote:
>
> Hi guys
>
> i'm trying to follow the instructions on mesosphere documentation, but it
> is a little bit unlear for me that i am new to this world.
> i' would like to launch a wordpress container, present on docker hub here
> https://hub.docker.com/_/wordpress/ , from marathon UI but i don't
> understand the mechanism.
> I understood that i don't have to specify a command in "Command" field,
> but i don't know how to fill the dockers fields in marathon UI to launch
> wordpress container.
> Could you please help me or tell me where i can find a clearer
> documentation?
>
> Thanks.
>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>
>
>
>
>
>
>
>
>
>
>
>

Re: Launch docker container from Marathon UI

Posted by Rad Gruchalski <ra...@gruchalski.com>.
It says exactly what the problem is.  

Start a marathon task with correct environment variables in env and you will be fine.  











Best regards,

Radek Gruchalski

radek@gruchalski.com (mailto:radek@gruchalski.com)
 (mailto:radek@gruchalski.com)
de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/)

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.



On Tuesday, 26 April 2016 at 15:56, Stefano Bianchi wrote:

> jupyter is working fine.
> i tried to run wordpress and i get this error in stderr of mesos:
>  
> error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment variables  
>   Did you forget to --link some_mysql_container:mysql or set an external db
>   with -e WORDPRESS_DB_HOST=hostname:port?
>  
>  
> Some one of you know this issue?
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 2016-04-26 15:51 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > However thank you so much to all!
> >  
> > 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > i found the answer by my self sorry if i disturbed you.
> > >  
> > > 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > Now that it is running, how can i check the User Interface?
> > > >  
> > > >  
> > > > 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > Yes, now it's running!!! June you are awesome!!!
> > > > >  
> > > > > 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > i have done these 2 commands, now jupyter is in deploying in marathon, staging in mesos.
> > > > > > Is there some additional configuration needed?
> > > > > >  
> > > > > >  
> > > > > > 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > June i tried to run your json, but the task is waiting, and if starts it failed immediately.
> > > > > > >  
> > > > > > > I guess because i did not type this commands:
> > > > > > >  
> > > > > > > echo 'docker,mesos' > /etc/mesos-slave/containerizers
> > > > > > > $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
> > > > > > >  
> > > > > > >  
> > > > > > >  
> > > > > > >  
> > > > > > > Could it be the problem?
> > > > > > >  
> > > > > > >  
> > > > > > > 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > Thank you June taylor, it is axactly what i was intending.
> > > > > > > > if it is not disturbing you, i try jupyter notebook as well, just to make some tests on how to launch marathon.
> > > > > > > > stay tuned :)
> > > > > > > >  
> > > > > > > >  
> > > > > > > > 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)>:
> > > > > > > > > thanks haosdent.
> > > > > > > > > actually i have run this kind of apps through rest api.
> > > > > > > > > Now i want learn how to laung docker files. I found this exaple:
> > > > > > > > >  
> > > > > > > > > { "container": { "type": "DOCKER", "docker": { "network": "HOST", "image": "group/image" }, "volumes": [ { "containerPath": "/etc/a", "hostPath": "/var/data/a", "mode": "RO" }, { "containerPath": "/etc/b", "hostPath": "/var/data/b", "mode": "RW" } ] } }
> > > > > > > > >  
> > > > > > > > > I am able to link the correspondent field in the marathon UI with what is written in this json.
> > > > > > > > > What i need to understand is, what i should write in:
> > > > > > > > > "image": "group/image"
> > > > > > > > > i mean, with what i have to replace group and image?
> > > > > > > > > For instance, if i would run wordpress container on docker hub what i should put replacing "group/image" ?
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > > > 2016-04-26 14:30 GMT+02:00 haosdent <haosdent@gmail.com (mailto:haosdent@gmail.com)>:
> > > > > > > > > > This is marathon REST API document: https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps . Usually we define a task json file and call the rest api.
> > > > > > > > > >  
> > > > > > > > > > For example, create tasks.json which content is  
> > > > > > > > > >  
> > > > > > > > > > ```
> > > > > > > > > > {
> > > > > > > > > > "id": "/test-sleep",
> > > > > > > > > > "cmd": "sleep 200"
> > > > > > > > > > }
> > > > > > > > > > ```
> > > > > > > > > >  
> > > > > > > > > > And  
> > > > > > > > > >  
> > > > > > > > > > ```
> > > > > > > > > > curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps -d @tasks.json
> > > > > > > > > > ```
> > > > > > > > > >  
> > > > > > > > > > You could find more field definitions in their document.
> > > > > > > > > >  
> > > > > > > > > > On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)> wrote:
> > > > > > > > > > > Hi guys
> > > > > > > > > > >  
> > > > > > > > > > > i'm trying to follow the instructions on mesosphere documentation, but it is a little bit unlear for me that i am new to this world.
> > > > > > > > > > > i' would like to launch a wordpress container, present on docker hub here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't understand the mechanism.  
> > > > > > > > > > > I understood that i don't have to specify a command in "Command" field, but i don't know how to fill the dockers fields in marathon UI to launch wordpress container.
> > > > > > > > > > > Could you please help me or tell me where i can find a clearer documentation?
> > > > > > > > > > >  
> > > > > > > > > > > Thanks.  
> > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > > > --  
> > > > > > > > > > Best Regards,
> > > > > > > > > > Haosdent Huang  
> > > > > > > >  
> > > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > >  
> >  
>  


Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
jupyter is working fine.
i tried to run wordpress and i get this error in stderr of mesos:

error: missing WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP environment
variables

  Did you forget to --link some_mysql_container:mysql or set an external db

  with -e WORDPRESS_DB_HOST=hostname:port?



Some one of you know this issue?












2016-04-26 15:51 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> However thank you so much to all!
>
> 2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> i found the answer by my self sorry if i disturbed you.
>>
>> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> Now that it is running, how can i check the User Interface?
>>>
>>>
>>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>>> Yes, now it's running!!! June you are awesome!!!
>>>>
>>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>>> i have done these 2 commands, now jupyter is in deploying in marathon,
>>>>> staging in mesos.
>>>>> Is there some additional configuration needed?
>>>>>
>>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>>> June i tried to run your json, but the task is waiting, and if starts
>>>>>> it failed immediately.
>>>>>>
>>>>>> I guess because i did not type this commands:
>>>>>>
>>>>>>
>>>>>>    1.
>>>>>>
>>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>>
>>>>>>    2.
>>>>>>
>>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>>
>>>>>>
>>>>>> Could it be the problem?
>>>>>>
>>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>>>>> make some tests on how to launch marathon.
>>>>>>> stay tuned :)
>>>>>>>
>>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>>
>>>>>>>> thanks haosdent.
>>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>>
>>>>>>>> {
>>>>>>>>   "container": {
>>>>>>>>     "type": "DOCKER",
>>>>>>>>     "docker": {
>>>>>>>>       "network": "HOST",
>>>>>>>>       "image": "group/image"
>>>>>>>>     },
>>>>>>>>     "volumes": [
>>>>>>>>       {
>>>>>>>>         "containerPath": "/etc/a",
>>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>>         "mode": "RO"
>>>>>>>>       },
>>>>>>>>       {
>>>>>>>>         "containerPath": "/etc/b",
>>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>>         "mode": "RW"
>>>>>>>>       }
>>>>>>>>     ]
>>>>>>>>   }}
>>>>>>>>
>>>>>>>>
>>>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>>>> what is written in this json.
>>>>>>>> What i need to understand is, what i should write in:
>>>>>>>>
>>>>>>>>  "image": "group/image"
>>>>>>>>
>>>>>>>> i mean, with what i have to replace group and image?
>>>>>>>> For instance, if i would run wordpress container on docker hub what
>>>>>>>> i should put replacing "group/image" ?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>>
>>>>>>>>> This is marathon REST API document:
>>>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>>>
>>>>>>>>> For example, create tasks.json which content is
>>>>>>>>>
>>>>>>>>> ```
>>>>>>>>> {
>>>>>>>>> "id": "/test-sleep",
>>>>>>>>> "cmd": "sleep 200"
>>>>>>>>> }
>>>>>>>>> ```
>>>>>>>>>
>>>>>>>>> And
>>>>>>>>>
>>>>>>>>> ```
>>>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>>>> -d @tasks.json
>>>>>>>>> ```
>>>>>>>>>
>>>>>>>>> You could find more field definitions in their document.
>>>>>>>>>
>>>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi guys
>>>>>>>>>>
>>>>>>>>>> i'm trying to follow the instructions on mesosphere
>>>>>>>>>> documentation, but it is a little bit unlear for me that i am new to this
>>>>>>>>>> world.
>>>>>>>>>> i' would like to launch a wordpress container, present on docker
>>>>>>>>>> hub here https://hub.docker.com/_/wordpress/ , from marathon UI
>>>>>>>>>> but i don't understand the mechanism.
>>>>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>>>>> launch wordpress container.
>>>>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>>>>> documentation?
>>>>>>>>>>
>>>>>>>>>> Thanks.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best Regards,
>>>>>>>>> Haosdent Huang
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
However thank you so much to all!

2016-04-26 15:22 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> i found the answer by my self sorry if i disturbed you.
>
> 2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> Now that it is running, how can i check the User Interface?
>>
>>
>> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> Yes, now it's running!!! June you are awesome!!!
>>>
>>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>>> i have done these 2 commands, now jupyter is in deploying in marathon,
>>>> staging in mesos.
>>>> Is there some additional configuration needed?
>>>>
>>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>>> June i tried to run your json, but the task is waiting, and if starts
>>>>> it failed immediately.
>>>>>
>>>>> I guess because i did not type this commands:
>>>>>
>>>>>
>>>>>    1.
>>>>>
>>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>>
>>>>>    2.
>>>>>
>>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>>
>>>>>
>>>>> Could it be the problem?
>>>>>
>>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>>>> make some tests on how to launch marathon.
>>>>>> stay tuned :)
>>>>>>
>>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>>
>>>>>>> thanks haosdent.
>>>>>>> actually i have run this kind of apps through rest api.
>>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>>
>>>>>>> {
>>>>>>>   "container": {
>>>>>>>     "type": "DOCKER",
>>>>>>>     "docker": {
>>>>>>>       "network": "HOST",
>>>>>>>       "image": "group/image"
>>>>>>>     },
>>>>>>>     "volumes": [
>>>>>>>       {
>>>>>>>         "containerPath": "/etc/a",
>>>>>>>         "hostPath": "/var/data/a",
>>>>>>>         "mode": "RO"
>>>>>>>       },
>>>>>>>       {
>>>>>>>         "containerPath": "/etc/b",
>>>>>>>         "hostPath": "/var/data/b",
>>>>>>>         "mode": "RW"
>>>>>>>       }
>>>>>>>     ]
>>>>>>>   }}
>>>>>>>
>>>>>>>
>>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>>> what is written in this json.
>>>>>>> What i need to understand is, what i should write in:
>>>>>>>
>>>>>>>  "image": "group/image"
>>>>>>>
>>>>>>> i mean, with what i have to replace group and image?
>>>>>>> For instance, if i would run wordpress container on docker hub what
>>>>>>> i should put replacing "group/image" ?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>>
>>>>>>>> This is marathon REST API document:
>>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>>
>>>>>>>> For example, create tasks.json which content is
>>>>>>>>
>>>>>>>> ```
>>>>>>>> {
>>>>>>>> "id": "/test-sleep",
>>>>>>>> "cmd": "sleep 200"
>>>>>>>> }
>>>>>>>> ```
>>>>>>>>
>>>>>>>> And
>>>>>>>>
>>>>>>>> ```
>>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>>> -d @tasks.json
>>>>>>>> ```
>>>>>>>>
>>>>>>>> You could find more field definitions in their document.
>>>>>>>>
>>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi guys
>>>>>>>>>
>>>>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>>>>> i' would like to launch a wordpress container, present on docker
>>>>>>>>> hub here https://hub.docker.com/_/wordpress/ , from marathon UI
>>>>>>>>> but i don't understand the mechanism.
>>>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>>>> launch wordpress container.
>>>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>>>> documentation?
>>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Haosdent Huang
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
i found the answer by my self sorry if i disturbed you.

2016-04-26 15:19 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> Now that it is running, how can i check the User Interface?
>
>
> 2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> Yes, now it's running!!! June you are awesome!!!
>>
>> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> i have done these 2 commands, now jupyter is in deploying in marathon,
>>> staging in mesos.
>>> Is there some additional configuration needed?
>>>
>>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>>> June i tried to run your json, but the task is waiting, and if starts
>>>> it failed immediately.
>>>>
>>>> I guess because i did not type this commands:
>>>>
>>>>
>>>>    1.
>>>>
>>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>>
>>>>    2.
>>>>
>>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>>
>>>>
>>>> Could it be the problem?
>>>>
>>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>>> Thank you June taylor, it is axactly what i was intending.
>>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>>> make some tests on how to launch marathon.
>>>>> stay tuned :)
>>>>>
>>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>>
>>>>>> thanks haosdent.
>>>>>> actually i have run this kind of apps through rest api.
>>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>>
>>>>>> {
>>>>>>   "container": {
>>>>>>     "type": "DOCKER",
>>>>>>     "docker": {
>>>>>>       "network": "HOST",
>>>>>>       "image": "group/image"
>>>>>>     },
>>>>>>     "volumes": [
>>>>>>       {
>>>>>>         "containerPath": "/etc/a",
>>>>>>         "hostPath": "/var/data/a",
>>>>>>         "mode": "RO"
>>>>>>       },
>>>>>>       {
>>>>>>         "containerPath": "/etc/b",
>>>>>>         "hostPath": "/var/data/b",
>>>>>>         "mode": "RW"
>>>>>>       }
>>>>>>     ]
>>>>>>   }}
>>>>>>
>>>>>>
>>>>>> I am able to link the correspondent field in the marathon UI with
>>>>>> what is written in this json.
>>>>>> What i need to understand is, what i should write in:
>>>>>>
>>>>>>  "image": "group/image"
>>>>>>
>>>>>> i mean, with what i have to replace group and image?
>>>>>> For instance, if i would run wordpress container on docker hub what i
>>>>>> should put replacing "group/image" ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>>
>>>>>>> This is marathon REST API document:
>>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>>
>>>>>>> For example, create tasks.json which content is
>>>>>>>
>>>>>>> ```
>>>>>>> {
>>>>>>> "id": "/test-sleep",
>>>>>>> "cmd": "sleep 200"
>>>>>>> }
>>>>>>> ```
>>>>>>>
>>>>>>> And
>>>>>>>
>>>>>>> ```
>>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>>> -d @tasks.json
>>>>>>> ```
>>>>>>>
>>>>>>> You could find more field definitions in their document.
>>>>>>>
>>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>>> jazzista88@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi guys
>>>>>>>>
>>>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>>>> i' would like to launch a wordpress container, present on docker
>>>>>>>> hub here https://hub.docker.com/_/wordpress/ , from marathon UI
>>>>>>>> but i don't understand the mechanism.
>>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>>> launch wordpress container.
>>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>>> documentation?
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Haosdent Huang
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
Now that it is running, how can i check the User Interface?


2016-04-26 15:18 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> Yes, now it's running!!! June you are awesome!!!
>
> 2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> i have done these 2 commands, now jupyter is in deploying in marathon,
>> staging in mesos.
>> Is there some additional configuration needed?
>>
>> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> June i tried to run your json, but the task is waiting, and if starts it
>>> failed immediately.
>>>
>>> I guess because i did not type this commands:
>>>
>>>
>>>    1.
>>>
>>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>>
>>>    2.
>>>
>>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>>
>>>
>>> Could it be the problem?
>>>
>>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>>> Thank you June taylor, it is axactly what i was intending.
>>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>>> make some tests on how to launch marathon.
>>>> stay tuned :)
>>>>
>>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>>
>>>>> thanks haosdent.
>>>>> actually i have run this kind of apps through rest api.
>>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>>
>>>>> {
>>>>>   "container": {
>>>>>     "type": "DOCKER",
>>>>>     "docker": {
>>>>>       "network": "HOST",
>>>>>       "image": "group/image"
>>>>>     },
>>>>>     "volumes": [
>>>>>       {
>>>>>         "containerPath": "/etc/a",
>>>>>         "hostPath": "/var/data/a",
>>>>>         "mode": "RO"
>>>>>       },
>>>>>       {
>>>>>         "containerPath": "/etc/b",
>>>>>         "hostPath": "/var/data/b",
>>>>>         "mode": "RW"
>>>>>       }
>>>>>     ]
>>>>>   }}
>>>>>
>>>>>
>>>>> I am able to link the correspondent field in the marathon UI with what
>>>>> is written in this json.
>>>>> What i need to understand is, what i should write in:
>>>>>
>>>>>  "image": "group/image"
>>>>>
>>>>> i mean, with what i have to replace group and image?
>>>>> For instance, if i would run wordpress container on docker hub what i
>>>>> should put replacing "group/image" ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>>
>>>>>> This is marathon REST API document:
>>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>>> . Usually we define a task json file and call the rest api.
>>>>>>
>>>>>> For example, create tasks.json which content is
>>>>>>
>>>>>> ```
>>>>>> {
>>>>>> "id": "/test-sleep",
>>>>>> "cmd": "sleep 200"
>>>>>> }
>>>>>> ```
>>>>>>
>>>>>> And
>>>>>>
>>>>>> ```
>>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>>> -d @tasks.json
>>>>>> ```
>>>>>>
>>>>>> You could find more field definitions in their document.
>>>>>>
>>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <
>>>>>> jazzista88@gmail.com> wrote:
>>>>>>
>>>>>>> Hi guys
>>>>>>>
>>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>>> i' would like to launch a wordpress container, present on docker hub
>>>>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>>>>> don't understand the mechanism.
>>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>>> launch wordpress container.
>>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>>> documentation?
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Haosdent Huang
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
Yes, now it's running!!! June you are awesome!!!

2016-04-26 15:16 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> i have done these 2 commands, now jupyter is in deploying in marathon,
> staging in mesos.
> Is there some additional configuration needed?
>
> 2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> June i tried to run your json, but the task is waiting, and if starts it
>> failed immediately.
>>
>> I guess because i did not type this commands:
>>
>>
>>    1.
>>
>>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>>
>>    2.
>>
>>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>>
>>
>> Could it be the problem?
>>
>> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> Thank you June taylor, it is axactly what i was intending.
>>> if it is not disturbing you, i try jupyter notebook as well, just to
>>> make some tests on how to launch marathon.
>>> stay tuned :)
>>>
>>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>>
>>>> thanks haosdent.
>>>> actually i have run this kind of apps through rest api.
>>>> Now i want learn how to laung docker files. I found this exaple:
>>>>
>>>> {
>>>>   "container": {
>>>>     "type": "DOCKER",
>>>>     "docker": {
>>>>       "network": "HOST",
>>>>       "image": "group/image"
>>>>     },
>>>>     "volumes": [
>>>>       {
>>>>         "containerPath": "/etc/a",
>>>>         "hostPath": "/var/data/a",
>>>>         "mode": "RO"
>>>>       },
>>>>       {
>>>>         "containerPath": "/etc/b",
>>>>         "hostPath": "/var/data/b",
>>>>         "mode": "RW"
>>>>       }
>>>>     ]
>>>>   }}
>>>>
>>>>
>>>> I am able to link the correspondent field in the marathon UI with what
>>>> is written in this json.
>>>> What i need to understand is, what i should write in:
>>>>
>>>>  "image": "group/image"
>>>>
>>>> i mean, with what i have to replace group and image?
>>>> For instance, if i would run wordpress container on docker hub what i
>>>> should put replacing "group/image" ?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>>
>>>>> This is marathon REST API document:
>>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>>> . Usually we define a task json file and call the rest api.
>>>>>
>>>>> For example, create tasks.json which content is
>>>>>
>>>>> ```
>>>>> {
>>>>> "id": "/test-sleep",
>>>>> "cmd": "sleep 200"
>>>>> }
>>>>> ```
>>>>>
>>>>> And
>>>>>
>>>>> ```
>>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>>> -d @tasks.json
>>>>> ```
>>>>>
>>>>> You could find more field definitions in their document.
>>>>>
>>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <jazzista88@gmail.com
>>>>> > wrote:
>>>>>
>>>>>> Hi guys
>>>>>>
>>>>>> i'm trying to follow the instructions on mesosphere documentation,
>>>>>> but it is a little bit unlear for me that i am new to this world.
>>>>>> i' would like to launch a wordpress container, present on docker hub
>>>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>>>> don't understand the mechanism.
>>>>>> I understood that i don't have to specify a command in "Command"
>>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>>> launch wordpress container.
>>>>>> Could you please help me or tell me where i can find a clearer
>>>>>> documentation?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Haosdent Huang
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
i have done these 2 commands, now jupyter is in deploying in marathon,
staging in mesos.
Is there some additional configuration needed?

2016-04-26 15:13 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> June i tried to run your json, but the task is waiting, and if starts it
> failed immediately.
>
> I guess because i did not type this commands:
>
>
>    1.
>
>    echo 'docker,mesos' > /etc/mesos-slave/containerizers
>
>    2.
>
>    $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout
>
>
> Could it be the problem?
>
> 2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> Thank you June taylor, it is axactly what i was intending.
>> if it is not disturbing you, i try jupyter notebook as well, just to make
>> some tests on how to launch marathon.
>> stay tuned :)
>>
>> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>>
>>> thanks haosdent.
>>> actually i have run this kind of apps through rest api.
>>> Now i want learn how to laung docker files. I found this exaple:
>>>
>>> {
>>>   "container": {
>>>     "type": "DOCKER",
>>>     "docker": {
>>>       "network": "HOST",
>>>       "image": "group/image"
>>>     },
>>>     "volumes": [
>>>       {
>>>         "containerPath": "/etc/a",
>>>         "hostPath": "/var/data/a",
>>>         "mode": "RO"
>>>       },
>>>       {
>>>         "containerPath": "/etc/b",
>>>         "hostPath": "/var/data/b",
>>>         "mode": "RW"
>>>       }
>>>     ]
>>>   }}
>>>
>>>
>>> I am able to link the correspondent field in the marathon UI with what
>>> is written in this json.
>>> What i need to understand is, what i should write in:
>>>
>>>  "image": "group/image"
>>>
>>> i mean, with what i have to replace group and image?
>>> For instance, if i would run wordpress container on docker hub what i
>>> should put replacing "group/image" ?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>>
>>>> This is marathon REST API document:
>>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps
>>>> . Usually we define a task json file and call the rest api.
>>>>
>>>> For example, create tasks.json which content is
>>>>
>>>> ```
>>>> {
>>>> "id": "/test-sleep",
>>>> "cmd": "sleep 200"
>>>> }
>>>> ```
>>>>
>>>> And
>>>>
>>>> ```
>>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>>> -d @tasks.json
>>>> ```
>>>>
>>>> You could find more field definitions in their document.
>>>>
>>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi guys
>>>>>
>>>>> i'm trying to follow the instructions on mesosphere documentation, but
>>>>> it is a little bit unlear for me that i am new to this world.
>>>>> i' would like to launch a wordpress container, present on docker hub
>>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>>> don't understand the mechanism.
>>>>> I understood that i don't have to specify a command in "Command"
>>>>> field, but i don't know how to fill the dockers fields in marathon UI to
>>>>> launch wordpress container.
>>>>> Could you please help me or tell me where i can find a clearer
>>>>> documentation?
>>>>>
>>>>> Thanks.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Haosdent Huang
>>>>
>>>
>>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
June i tried to run your json, but the task is waiting, and if starts it
failed immediately.

I guess because i did not type this commands:


   1.

   echo 'docker,mesos' > /etc/mesos-slave/containerizers

   2.

   $ echo '5mins' > /etc/mesos-slave/executor_registration_timeout


Could it be the problem?

2016-04-26 15:02 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> Thank you June taylor, it is axactly what i was intending.
> if it is not disturbing you, i try jupyter notebook as well, just to make
> some tests on how to launch marathon.
> stay tuned :)
>
> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> thanks haosdent.
>> actually i have run this kind of apps through rest api.
>> Now i want learn how to laung docker files. I found this exaple:
>>
>> {
>>   "container": {
>>     "type": "DOCKER",
>>     "docker": {
>>       "network": "HOST",
>>       "image": "group/image"
>>     },
>>     "volumes": [
>>       {
>>         "containerPath": "/etc/a",
>>         "hostPath": "/var/data/a",
>>         "mode": "RO"
>>       },
>>       {
>>         "containerPath": "/etc/b",
>>         "hostPath": "/var/data/b",
>>         "mode": "RW"
>>       }
>>     ]
>>   }}
>>
>>
>> I am able to link the correspondent field in the marathon UI with what is
>> written in this json.
>> What i need to understand is, what i should write in:
>>
>>  "image": "group/image"
>>
>> i mean, with what i have to replace group and image?
>> For instance, if i would run wordpress container on docker hub what i
>> should put replacing "group/image" ?
>>
>>
>>
>>
>>
>>
>>
>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>
>>> This is marathon REST API document:
>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps .
>>> Usually we define a task json file and call the rest api.
>>>
>>> For example, create tasks.json which content is
>>>
>>> ```
>>> {
>>> "id": "/test-sleep",
>>> "cmd": "sleep 200"
>>> }
>>> ```
>>>
>>> And
>>>
>>> ```
>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>> -d @tasks.json
>>> ```
>>>
>>> You could find more field definitions in their document.
>>>
>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
>>> wrote:
>>>
>>>> Hi guys
>>>>
>>>> i'm trying to follow the instructions on mesosphere documentation, but
>>>> it is a little bit unlear for me that i am new to this world.
>>>> i' would like to launch a wordpress container, present on docker hub
>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>> don't understand the mechanism.
>>>> I understood that i don't have to specify a command in "Command" field,
>>>> but i don't know how to fill the dockers fields in marathon UI to launch
>>>> wordpress container.
>>>> Could you please help me or tell me where i can find a clearer
>>>> documentation?
>>>>
>>>> Thanks.
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Haosdent Huang
>>>
>>
>>
>

Re: Launch docker container from Marathon UI

Posted by June Taylor <ju...@umn.edu>.
Stefano,

Per your earlier question, "group/image" refers to the path you will see in
the Docker Hub website on the right side, after the "docker pull" command.
In the Jupyter Notebook example I gave you, jupyter is the group, and
notebook is the image, with the / literal separating them.


Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 8:02 AM, Stefano Bianchi <ja...@gmail.com>
wrote:

> Thank you June taylor, it is axactly what i was intending.
> if it is not disturbing you, i try jupyter notebook as well, just to make
> some tests on how to launch marathon.
> stay tuned :)
>
> 2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:
>
>> thanks haosdent.
>> actually i have run this kind of apps through rest api.
>> Now i want learn how to laung docker files. I found this exaple:
>>
>> {
>>   "container": {
>>     "type": "DOCKER",
>>     "docker": {
>>       "network": "HOST",
>>       "image": "group/image"
>>     },
>>     "volumes": [
>>       {
>>         "containerPath": "/etc/a",
>>         "hostPath": "/var/data/a",
>>         "mode": "RO"
>>       },
>>       {
>>         "containerPath": "/etc/b",
>>         "hostPath": "/var/data/b",
>>         "mode": "RW"
>>       }
>>     ]
>>   }}
>>
>>
>> I am able to link the correspondent field in the marathon UI with what is
>> written in this json.
>> What i need to understand is, what i should write in:
>>
>>  "image": "group/image"
>>
>> i mean, with what i have to replace group and image?
>> For instance, if i would run wordpress container on docker hub what i
>> should put replacing "group/image" ?
>>
>>
>>
>>
>>
>>
>>
>> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>>
>>> This is marathon REST API document:
>>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps .
>>> Usually we define a task json file and call the rest api.
>>>
>>> For example, create tasks.json which content is
>>>
>>> ```
>>> {
>>> "id": "/test-sleep",
>>> "cmd": "sleep 200"
>>> }
>>> ```
>>>
>>> And
>>>
>>> ```
>>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>>> -d @tasks.json
>>> ```
>>>
>>> You could find more field definitions in their document.
>>>
>>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
>>> wrote:
>>>
>>>> Hi guys
>>>>
>>>> i'm trying to follow the instructions on mesosphere documentation, but
>>>> it is a little bit unlear for me that i am new to this world.
>>>> i' would like to launch a wordpress container, present on docker hub
>>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i
>>>> don't understand the mechanism.
>>>> I understood that i don't have to specify a command in "Command" field,
>>>> but i don't know how to fill the dockers fields in marathon UI to launch
>>>> wordpress container.
>>>> Could you please help me or tell me where i can find a clearer
>>>> documentation?
>>>>
>>>> Thanks.
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Haosdent Huang
>>>
>>
>>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
Thank you June taylor, it is axactly what i was intending.
if it is not disturbing you, i try jupyter notebook as well, just to make
some tests on how to launch marathon.
stay tuned :)

2016-04-26 14:58 GMT+02:00 Stefano Bianchi <ja...@gmail.com>:

> thanks haosdent.
> actually i have run this kind of apps through rest api.
> Now i want learn how to laung docker files. I found this exaple:
>
> {
>   "container": {
>     "type": "DOCKER",
>     "docker": {
>       "network": "HOST",
>       "image": "group/image"
>     },
>     "volumes": [
>       {
>         "containerPath": "/etc/a",
>         "hostPath": "/var/data/a",
>         "mode": "RO"
>       },
>       {
>         "containerPath": "/etc/b",
>         "hostPath": "/var/data/b",
>         "mode": "RW"
>       }
>     ]
>   }}
>
>
> I am able to link the correspondent field in the marathon UI with what is
> written in this json.
> What i need to understand is, what i should write in:
>
>  "image": "group/image"
>
> i mean, with what i have to replace group and image?
> For instance, if i would run wordpress container on docker hub what i
> should put replacing "group/image" ?
>
>
>
>
>
>
>
> 2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:
>
>> This is marathon REST API document:
>> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps .
>> Usually we define a task json file and call the rest api.
>>
>> For example, create tasks.json which content is
>>
>> ```
>> {
>> "id": "/test-sleep",
>> "cmd": "sleep 200"
>> }
>> ```
>>
>> And
>>
>> ```
>> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
>> -d @tasks.json
>> ```
>>
>> You could find more field definitions in their document.
>>
>> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
>> wrote:
>>
>>> Hi guys
>>>
>>> i'm trying to follow the instructions on mesosphere documentation, but
>>> it is a little bit unlear for me that i am new to this world.
>>> i' would like to launch a wordpress container, present on docker hub
>>> here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't
>>> understand the mechanism.
>>> I understood that i don't have to specify a command in "Command" field,
>>> but i don't know how to fill the dockers fields in marathon UI to launch
>>> wordpress container.
>>> Could you please help me or tell me where i can find a clearer
>>> documentation?
>>>
>>> Thanks.
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Haosdent Huang
>>
>
>

Re: Launch docker container from Marathon UI

Posted by Stefano Bianchi <ja...@gmail.com>.
thanks haosdent.
actually i have run this kind of apps through rest api.
Now i want learn how to laung docker files. I found this exaple:

{
  "container": {
    "type": "DOCKER",
    "docker": {
      "network": "HOST",
      "image": "group/image"
    },
    "volumes": [
      {
        "containerPath": "/etc/a",
        "hostPath": "/var/data/a",
        "mode": "RO"
      },
      {
        "containerPath": "/etc/b",
        "hostPath": "/var/data/b",
        "mode": "RW"
      }
    ]
  }}


I am able to link the correspondent field in the marathon UI with what is
written in this json.
What i need to understand is, what i should write in:

 "image": "group/image"

i mean, with what i have to replace group and image?
For instance, if i would run wordpress container on docker hub what i
should put replacing "group/image" ?







2016-04-26 14:30 GMT+02:00 haosdent <ha...@gmail.com>:

> This is marathon REST API document:
> https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps .
> Usually we define a task json file and call the rest api.
>
> For example, create tasks.json which content is
>
> ```
> {
> "id": "/test-sleep",
> "cmd": "sleep 200"
> }
> ```
>
> And
>
> ```
> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps
> -d @tasks.json
> ```
>
> You could find more field definitions in their document.
>
> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
> wrote:
>
>> Hi guys
>>
>> i'm trying to follow the instructions on mesosphere documentation, but it
>> is a little bit unlear for me that i am new to this world.
>> i' would like to launch a wordpress container, present on docker hub here
>> https://hub.docker.com/_/wordpress/ , from marathon UI but i don't
>> understand the mechanism.
>> I understood that i don't have to specify a command in "Command" field,
>> but i don't know how to fill the dockers fields in marathon UI to launch
>> wordpress container.
>> Could you please help me or tell me where i can find a clearer
>> documentation?
>>
>> Thanks.
>>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>

Re: Launch docker container from Marathon UI

Posted by Rad Gruchalski <ra...@gruchalski.com>.
Here’s the up to date URL:  
https://mesosphere.github.io/marathon/docs/generated/api.html#v2_apps_post










Best regards,

Radek Gruchalski

radek@gruchalski.com (mailto:radek@gruchalski.com)
 (mailto:radek@gruchalski.com)
de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/)

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.



On Tuesday, 26 April 2016 at 14:30, haosdent wrote:

> This is marathon REST API document: https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps . Usually we define a task json file and call the rest api.
>  
> For example, create tasks.json which content is  
>  
> ```
> {
> "id": "/test-sleep",
> "cmd": "sleep 200"
> }
> ```
>  
> And  
>  
> ```
> curl -X POST -H "Content-type: application/json" http://${YOUR_MARATHON_ADDR}:8080/v2/apps -d @tasks.json
> ```
>  
> You could find more field definitions in their document.
>  
> On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <jazzista88@gmail.com (mailto:jazzista88@gmail.com)> wrote:
> > Hi guys
> >  
> > i'm trying to follow the instructions on mesosphere documentation, but it is a little bit unlear for me that i am new to this world.
> > i' would like to launch a wordpress container, present on docker hub here https://hub.docker.com/_/wordpress/ , from marathon UI but i don't understand the mechanism.  
> > I understood that i don't have to specify a command in "Command" field, but i don't know how to fill the dockers fields in marathon UI to launch wordpress container.
> > Could you please help me or tell me where i can find a clearer documentation?
> >  
> > Thanks.  
>  
>  
> --  
> Best Regards,
> Haosdent Huang  


Re: Launch docker container from Marathon UI

Posted by haosdent <ha...@gmail.com>.
This is marathon REST API document:
https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps .
Usually we define a task json file and call the rest api.

For example, create tasks.json which content is

```
{
"id": "/test-sleep",
"cmd": "sleep 200"
}
```

And

```
curl -X POST -H "Content-type: application/json"
http://${YOUR_MARATHON_ADDR}:8080/v2/apps
-d @tasks.json
```

You could find more field definitions in their document.

On Tue, Apr 26, 2016 at 8:24 PM, Stefano Bianchi <ja...@gmail.com>
wrote:

> Hi guys
>
> i'm trying to follow the instructions on mesosphere documentation, but it
> is a little bit unlear for me that i am new to this world.
> i' would like to launch a wordpress container, present on docker hub here
> https://hub.docker.com/_/wordpress/ , from marathon UI but i don't
> understand the mechanism.
> I understood that i don't have to specify a command in "Command" field,
> but i don't know how to fill the dockers fields in marathon UI to launch
> wordpress container.
> Could you please help me or tell me where i can find a clearer
> documentation?
>
> Thanks.
>



-- 
Best Regards,
Haosdent Huang

Re: Launch docker container from Marathon UI

Posted by June Taylor <ju...@umn.edu>.
Stefano,

I hope this information is helpful:

You should specify the docker hub path, which is the what you can see after
the Docker Pull command on the Hub page. In your case, simply the word:
"wordpress" without quotes, is what you would use as the Image.

You will also need to specify port bindings (which I am still learning
about so welcome corrections).

For example, here is how you would use the Jupyter Notebook from Docker
Hub. The container is publishing the Notebook interface on port 8888, and
by specifying host port 0, a random port is chosen by Marathon, which you
will see in the Marathon interface under the Running Instances as a
clickable link to load the HTTP interface.

{
  "id": "notebook",
  "cpus": 1,
  "mem": 512,
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "jupyter/notebook",
      "network": "BRIDGE",
      "portMappings": [
        { "containerPort": 8888, "hostPort": 0 }
      ]
    }
  }
}



Thanks,
June Taylor
System Administrator, Minnesota Population Center
University of Minnesota

On Tue, Apr 26, 2016 at 7:24 AM, Stefano Bianchi <ja...@gmail.com>
wrote:

> Hi guys
>
> i'm trying to follow the instructions on mesosphere documentation, but it
> is a little bit unlear for me that i am new to this world.
> i' would like to launch a wordpress container, present on docker hub here
> https://hub.docker.com/_/wordpress/ , from marathon UI but i don't
> understand the mechanism.
> I understood that i don't have to specify a command in "Command" field,
> but i don't know how to fill the dockers fields in marathon UI to launch
> wordpress container.
> Could you please help me or tell me where i can find a clearer
> documentation?
>
> Thanks.
>