{"action":"created","issue":{"url":"https://api.github.com/repos/HubSpot/Singularity/issues/590","labels_url":"https://api.github.com/repos/HubSpot/Singularity/issues/590/labels{/name}","comments_url":"https://api.github.com/repos/HubSpot/Singularity/issues/590/comments","events_url":"https://api.github.com/repos/HubSpot/Singularity/issues/590/events","html_url":"https://github.com/HubSpot/Singularity/issues/590","id":93336344,"number":590,"title":"Confused by network behaviour","user":{"login":"ashic","id":565991,"avatar_url":"https://avatars.githubusercontent.com/u/565991?v=3","gravatar_id":"","url":"https://api.github.com/users/ashic","html_url":"https://github.com/ashic","followers_url":"https://api.github.com/users/ashic/followers","following_url":"https://api.github.com/users/ashic/following{/other_user}","gists_url":"https://api.github.com/users/ashic/gists{/gist_id}","starred_url":"https://api.github.com/users/ashic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashic/subscriptions","organizations_url":"https://api.github.com/users/ashic/orgs","repos_url":"https://api.github.com/users/ashic/repos","events_url":"https://api.github.com/users/ashic/events{/privacy}","received_events_url":"https://api.github.com/users/ashic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-06T17:50:05Z","updated_at":"2015-07-07T02:13:02Z","closed_at":null,"body":"Hi,\r\nI'm trying out singularity, and so far it looks good. I'm trying to sort out networking, but it's baffling me:\r\n\r\n* I've created a single instance service that's not load balanced. In deploy, I specify docker: tutum/hello-world , bridge network with the following:\r\n\r\n```\r\nContainer port type: Literal, 80\r\nHost port type: Literal, 31010\r\n```\r\n\r\nWhen I do this, I get a response back from hostname:80, but not from hostname:31010. I should add that --resources=ports:[8000-8050,31000-32000] is specified when launching the slave.\r\n\r\n* I'd really like to be able to hit a service endpoint instead of slave machines. I see that if I select \"load balanced\" when creating the request, I get a service base path (e.g. /singularity/api/v2) option when deploying. However, I've not been able to get this to work. Do I need something else set up for this to work? I don't have mesos-dns setup. Will that help? Will https://github.com/CiscoCloud/mesos-consul be useful for this as well?\r\n\r\n* When selecting Bridge Network and adding a Docker Port Mapping, I see that using \r\n```\r\nContainer Port Type: Literal, 80\r\nHost Port Type: From Offer\r\nContainer Port: 0\r\nProtocol: tcp\r\n```\r\ngives me the following error:\r\n```\r\nThere was a problem: Index of port resource for hostPort must be between 0 and -1 (inclusive)\r\n```\r\n\r\nIs this expected? Is there some documentation as to how docker networking relates to Singularity?\r\n\r\nThanks,\r\nAshic."},"comment":{"url":"https://api.github.com/repos/HubSpot/Singularity/issues/comments/119048971","html_url":"https://github.com/HubSpot/Singularity/issues/590#issuecomment-119048971","issue_url":"https://api.github.com/repos/HubSpot/Singularity/issues/590","id":119048971,"user":{"login":"ssalinas","id":6034439,"avatar_url":"https://avatars.githubusercontent.com/u/6034439?v=3","gravatar_id":"","url":"https://api.github.com/users/ssalinas","html_url":"https://github.com/ssalinas","followers_url":"https://api.github.com/users/ssalinas/followers","following_url":"https://api.github.com/users/ssalinas/following{/other_user}","gists_url":"https://api.github.com/users/ssalinas/gists{/gist_id}","starred_url":"https://api.github.com/users/ssalinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssalinas/subscriptions","organizations_url":"https://api.github.com/users/ssalinas/orgs","repos_url":"https://api.github.com/users/ssalinas/repos","events_url":"https://api.github.com/users/ssalinas/events{/privacy}","received_events_url":"https://api.github.com/users/ssalinas/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T02:13:02Z","updated_at":"2015-07-07T02:13:02Z","body":"To speak to your first point, there are a number of options for load balancing services run in mesos. We use Singularity with [Baragon](https://github.com/HubSpot/Baragon) and nginx, which allows each load balanced service running in mesos to be available at a certain path and Baragon keeps the host:port of the running services in sync with Singularity. Docs for that can be found [here](https://github.com/HubSpot/Baragon/blob/master/docs/managing_baragon.md#singularity) and [here](https://github.com/HubSpot/Singularity/blob/cc84580434f85d6dff63d3f771ff3d42a08b2188/Docs/development/lbs.md)\r\n\r\nI am still investigating your second question. It seems that you have it correct and I will let you know if I find anything"}}