Hi kamil

I tried to replace that hostname with the one related to one random slave.
And it does not work.
I tried also to change the private IP od the marathon instance with the
public, but i still have problem.
I'm also running Mesos-DNS this should be a problem?


2016-05-02 21:52 GMT+02:00 Kamil Wokitajtis <wokitaj...@gmail.com>:

> Did you try to run docker command from shell? Does it work for you?
> Do you have also slave running on 131.154.96.27?
> In my case entry was "constraints": [["hostname", "CLUSTER",
> "master-1"]], because on host master-1 I have both master and slave running.
> If you don't have slave running on 131.154.96.27, update this entry to
> point to one of your slave hosts.
>
>
> 2016-05-02 19:03 GMT+02:00 Stefano Bianchi <jazzist...@gmail.com>:
>
>> Here it is:
>>
>> {
>>
>>   "id": "marathon-lb",
>>
>>   "volumes": [],
>>
>>   "cpus": 1,
>>
>>   "mem": 512,
>>
>>   "instances": 1,
>>
>>   "container": {
>>
>>     "type": "DOCKER",
>>
>>     "docker": {
>>
>>     "image": "mesosphere/marathon-lb",
>>
>>     "network": "HOST",
>>
>>     "parameters": [
>>
>>                 { "key": "env", "value": "PORTS=9090" }
>>
>>     ],
>>
>>     "portMappings": [
>>
>>       {
>>
>>        "containerPort": 80,
>>
>>         "hostPort": 80,
>>
>>         "servicePort": 10004,
>>
>>         "protocol": "tcp"
>>
>>       },
>>
>>       {
>>
>>        "containerPort": 9090,
>>
>>         "hostPort": 9090,
>>
>>         "servicePort": 10005,
>>
>>         "protocol": "tcp"
>>
>>       }
>>
>>     ]},
>>
>>     "privileged": false
>>
>>   },
>>
>>   "args": [
>>
>>       "sse",
>>
>>       "--marathon", "http://192.168.100.54:8080";,
>>
>>       "--group", "external"
>>
>>   ],
>>
>>   "forcePullImage": true,
>>
>>   "constraints": [["hostname", "CLUSTER", "131.154.96.27"]]
>>
>> }
>>
>>
>> where:
>> 192.168.100.54 is the private IP there marathon is running.
>>
>> 131.154.96.27: is the hostname i set in /etc/mesos-master/hostname and
>> /etc/mesos-master/ip files.
>>
>>
>>
>> 2016-05-02 17:20 GMT+02:00 Kamil Wokitajtis <wokitaj...@gmail.com>:
>>
>>> Please paste your modified marathon-lb.json file.
>>> Can you see any error messages in the marathon and mesos logs ?
>>> We are mapping ports 80, 9090,10004,10005, those need to be open.
>>>
>>> Docker command is as follows:
>>>
>>> docker run --privileged -e PORTS=9090 --net=host -p 80:80 -p 9090:9090
>>> mesosphere/marathon-lb sse --marathon http://192.168.33.20:8080 --group
>>> "external"
>>>
>>> 2016-05-02 17:07 GMT+02:00 Stefano Bianchi <jazzist...@gmail.com>:
>>>
>>>> Can you please tell me which is the correspondent marathon-lb.json
>>>> docker command?
>>>>
>>>> 2016-05-02 16:55 GMT+02:00 Stefano Bianchi <jazzist...@gmail.com>:
>>>>
>>>>> All those ports must be open? Because i am on openstack environment
>>>>> and i need to know if there is something to open
>>>>>
>>>>> 2016-05-02 15:52 GMT+02:00 Stefano Bianchi <jazzist...@gmail.com>:
>>>>>
>>>>>> i changed all but i see waiting app.
>>>>>>
>>>>>> 2016-05-02 15:26 GMT+02:00 Kamil Wokitajtis <wokitaj...@gmail.com>:
>>>>>>
>>>>>>> I am using private docker registry (
>>>>>>> https://docs.docker.com/registry/).
>>>>>>> In my case I can pull image from local repository installed on node
>>>>>>> master-1 (master-1:5000/marathon-lb):
>>>>>>>  "image": "master-1:5000/marathon-lb"
>>>>>>>
>>>>>>> If you don't have private registry, you have to pull image from the
>>>>>>> docker hub (mesosphere/marathon-lb):
>>>>>>>  "image": "mesosphere/marathon-lb"
>>>>>>>
>>>>>>> Basically, for many reasons I want all my images to be hosted
>>>>>>> locally.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2016-05-02 15:10 GMT+02:00 Stefano Bianchi <jazzist...@gmail.com>:
>>>>>>>
>>>>>>>> Thanks your your answer.
>>>>>>>> I understood what you are telling me, just a thing, what you mean
>>>>>>>> with docker registry?
>>>>>>>>
>>>>>>>> 2016-05-02 13:31 GMT+02:00 Kamil Wokitajtis <wokitaj...@gmail.com>:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Fastest way is to run marathon-lb docker image.
>>>>>>>>> You have to update marathon-lb.json code below with yours (or
>>>>>>>>> public) docker registry, IPs and hostnames.
>>>>>>>>> When you add application to marathon and you want it to be load
>>>>>>>>> balanced via marathon-lb,
>>>>>>>>> you have to add labels section eg.:
>>>>>>>>>
>>>>>>>>>  "labels": {
>>>>>>>>>     "HAPROXY_GROUP":"external",
>>>>>>>>>     "HAPROXY_0_VHOST":"service.mesosphere.com"
>>>>>>>>>   }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Reading documentation on github was enough for me, specially
>>>>>>>>> "issues" tab ;)
>>>>>>>>> https://github.com/mesosphere/marathon-lb
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Below code works for me, but I think you can change "network" mode
>>>>>>>>> from BRIDGE to HOST and remove line : { "key": "net", "value": "host" 
>>>>>>>>> }.
>>>>>>>>>
>>>>>>>>> marathon-lb.json:
>>>>>>>>>
>>>>>>>>> {
>>>>>>>>>   "id": "marathon-lb",
>>>>>>>>>   "volumes": [],
>>>>>>>>>   "cpus": 0.5,
>>>>>>>>>   "mem": 256.0,
>>>>>>>>>   "instances": 1,
>>>>>>>>>   "container": {
>>>>>>>>>     "type": "DOCKER",
>>>>>>>>>     "docker": {
>>>>>>>>>     "image": "master-1:5000/marathon-lb",
>>>>>>>>>     "network": "BRIDGE",
>>>>>>>>>     "parameters": [
>>>>>>>>>                 { "key": "env", "value": "PORTS=9090" },
>>>>>>>>>                 { "key": "net", "value": "host" }
>>>>>>>>>     ],
>>>>>>>>>     "portMappings": [
>>>>>>>>>       {
>>>>>>>>>         "containerPort": 80,
>>>>>>>>>         "hostPort": 80,
>>>>>>>>>         "servicePort": 10004,
>>>>>>>>>         "protocol": "tcp"
>>>>>>>>>       },
>>>>>>>>>       {
>>>>>>>>>         "containerPort": 9090,
>>>>>>>>>         "hostPort": 9090,
>>>>>>>>>         "servicePort": 10005,
>>>>>>>>>         "protocol": "tcp"
>>>>>>>>>       }
>>>>>>>>>     ]},
>>>>>>>>>     "privileged": false
>>>>>>>>>   },
>>>>>>>>>   "args": [
>>>>>>>>>       "sse",
>>>>>>>>>       "--marathon", "http://192.168.33.20:8080";,
>>>>>>>>>       "--group", "external"
>>>>>>>>>   ],
>>>>>>>>>   "forcePullImage": true,
>>>>>>>>>   "constraints": [["hostname", "CLUSTER", "master-1"]]
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> 2016-05-02 11:08 GMT+02:00 Stefano Bianchi <jazzist...@gmail.com>:
>>>>>>>>>
>>>>>>>>>> Hello all
>>>>>>>>>>
>>>>>>>>>> I'm not using DC/OS, and i would like to know how to install
>>>>>>>>>> marathon-lb on my mesos cluster. Is there any tutorial that does not
>>>>>>>>>> involve dcos instructions?
>>>>>>>>>>
>>>>>>>>>> Thanks for replies.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to