You can consider influxdb.marathon.agentip.dcos.thisdcos.directory as the
static IP. This will allow you to do exactly what you are saying.

If for any reason a DNS name is not enough and you want an IP for the
service like 10.158.79.241, I'm pretty sure that there is no way of doing
so.


2017-12-11 11:39 GMT+01:00 Marc Roos <[email protected]>:

>
>
> Is it possible to configure just a static ip for now, just for the
> purpose of my education? I want to see if I can access the task on this
> ip when I am starting it on different hosts.
>
>
>
>
> -----Original Message-----
> From: Alvaro Brandon [mailto:[email protected]]
> Sent: maandag 11 december 2017 11:20
> To: [email protected]
> Subject: Re: How to add static ip to application
>
> I think its DNS what you need. The DNS name for your task can be used as
> an static reference to the influxdb instance, independently of the host.
>
>
> https://docs.mesosphere.com/1.10/networking/dns-overview/
>
>
> Take a look at the link, but I think you can use
> influxdb.marathon.agentip.dcos.thisdcos.directory as the task's address
>
> 2017-12-11 11:11 GMT+01:00 Marc Roos <[email protected]>:
>
>
>
>         For now I would like to have the ip bound to the
>         application/task/container, no matter on what host the application
> will
>         be started. And in this case I would like to be able to access the
>         influxdb server as if I would have been created a dedicated vm for
> it.
>
>         Is there some page explaining the syntax of ipAddress? This are not
>         working, I tried also with removing the portDefinitions section.
>
>
>                 {
>                   "id": "/influxdb",
>                   "cmd": null,
>                   "cpus": 0.5,
>                   "mem": 128,
>                   "disk": 0,
>                   "instances": 1,
>                   "acceptedResourceRoles": [],
>                   "container": {
>                     "type": "MESOS",
>                     "volumes": [],
>                     "docker": {
>                       "image": "influxdb",
>                       "credential": null,
>                       "forcePullImage": false
>                     }
>                   },
>                 "ipAddress": {},
>                   "portDefinitions": [
>                     {
>                       "port": 10001,
>                       "protocol": "tcp",
>                       "labels": {}
>                     }
>                   ]
>                 }
>
>
>         -----Original Message-----
>         From: Tomek Janiszewski [mailto:[email protected]]
>         Sent: maandag 11 december 2017 10:41
>         To: [email protected]
>         Subject: Re: How to add static ip to application
>
>         What do you mean by "bind to a static IP"?
>
>         1.      IP Per Container?
>         https://mesosphere.github.io/marathon/docs/ip-per-task.html
> <https://mesosphere.github.io/marathon/docs/ip-per-task.html>
>         2.      IP of one dedicated host?
>         https://mesosphere.github.io/marathon/docs/constraints.html
> <https://mesosphere.github.io/marathon/docs/constraints.html>
>         3.      Layer 3/4 loadbalancer that will create Virtual IP (VIP)?
>
>
>
>         niedz., 10 gru 2017 o 23:33 użytkownik Marc Roos
>         <[email protected]> napisał:
>
>
>
>
>                 I downloaded the influxdb docker image and am running it
> from
>         Marathon,
>                 I would like to bind it to a static ip. What would be the
> 'best'
>         way to
>                 do this? Sorry for if this is a very basic question. Link
> to an
>                 appropriate howto is also welcome.
>
>
>
>                 {
>                   "id": "/influxdb",
>                   "cmd": null,
>                   "cpus": 0.5,
>                   "mem": 128,
>                   "disk": 0,
>                   "instances": 1,
>                   "acceptedResourceRoles": [],
>                   "container": {
>                     "type": "MESOS",
>                     "volumes": [],
>                     "docker": {
>                       "image": "influxdb",
>                       "credential": null,
>                       "forcePullImage": false
>                     }
>                   },
>                   "portDefinitions": [
>                     {
>                       "port": 10001,
>                       "protocol": "tcp",
>                       "labels": {}
>                     }
>                   ]
>                 }
>
>
>
>                 I have a default setup on centos7:
>                 marathon-1.4.8-1.0.660.el7.x86_64
>
> mesosphere-zookeeper-3.4.6-0.1.20141204175332.centos7.x86_64
>                 chronos-2.5.0-0.1.20170816233446.el7.x86_64
>                 mesos-1.4.0-2.0.1.x86_64
>
>                 Running mesos-dns in Marathon
>
>
>
>
>
>                 ​
>
>
>
>
>
>
>
>
>
>
>
>

Reply via email to