Azure / service-fabric-mesh-preview

Service Fabric Mesh is the Service Fabric's serverless offering to enable developers to deploy containerized applications without managing infrastructure. Service Fabric Mesh , aka project “SeaBreeze” is currently available in private preview. This repository will be used for tracking bugs/feature requests as GitHub issues and for maintaining the latest documentation.
MIT License
82 stars 12 forks source link

How to access from external network (Local Dev Cluster)? #373

Open clintsinger opened 5 years ago

clintsinger commented 5 years ago

I have a mesh application with a couple services, two HTTP, one UDP exposing two ports and one service without exposed network access.

I am able to access the containers that are exposing their ports on the local machine that is hosting docker but would now like to expose them outside of the machine. This is where I am now stuck. I see that the Parameters.yaml appears to expose the "ingress ports" as 8080, 8081, etc. so I thought that is what I would use to access the containers externally. It seems if I try those ports (8080, 8081) on the local machine or externally I am unable to access the service.

I have tried the following scenarios (some of them I didn't expect to work but tried anyways)

On the local hosting machine: 1) Resolve containers by DNS name - Works 2) Access the HTTP services by container IP and local port (10.128.0.:80) - Works 3) Send and receive to/from the UDP service (on port 90 and 91 which are both exposed by the service) by container IP (10.128.0.) - Works 4) http://localhost:8080 - Doesn't work 5) http://[machine-name]:8080 - Doesn't work 6) http://[container-dns-name]:8080 - Doesn't work

From a remote machine on the same network (with and without the hosting machines firewall enabled) 1) Resolve containers by DNS name - Doesn't work (didn't expect it to) 2) Access the container by container IP - Doesn't work (didn't expect it to since it is non-routable) 3) http://[host-machine-ip-address]:8080 - Doesn't work 4) http://[host-machine-name]:8080 - Doesn't work

I did do a netstat -aon on the host machine to see who was listening on the various ports and I would have expected the 8080, 8081 ports to show up there but they are not available so I am not surprised that I can't access them.

I thought that the purpose of the Gateway was to expose the containers to the outside world by acting as a reverse proxy? Is there something else I need to configure to get this to work as it is pretty difficult to do development and testing if I can't get real world testing done. Specifically, the UDP data is from IoT equipment from outside my LAN that I have directed to the host machine via NAT routing rules. I just need to know where to direct it.

I should point out that I have read the Service Fabric Mesh documentation repeatedly looking for what I may have missed but it is either not in there or not clear as to what I should do.

Cheers, Clint

suhuruli commented 5 years ago

Hey Clint! What is the Docker networking mode you running on?

boppbo commented 5 years ago

related #350

clintsinger commented 5 years ago

I have moved away from testing this due to it being a blocking issue for the time being.

I believe I am just using the default bridge mode if that is the question that is being asked.