nebari-dev / nebari

🪴 Nebari - your open source data science platform
https://nebari.dev
BSD 3-Clause "New" or "Revised" License
283 stars 93 forks source link

[ENH] - Suggest starting `docker-mac-net-connect` when unable to connect load balancer #2863

Open aktech opened 4 days ago

aktech commented 4 days ago

Feature description

While deploying Nebari on Mac OSX at times it may happen that the deployment cli is unable to connect to the load balancer IP, there could potentially happen for several reasons for this, but the most common reason is the Docker container (load balancer IP) is not directly accessible from the host machine. This is an expected behaviour for docker on mac, this is why we recommend using: https://github.com/chipmk/docker-mac-net-connect

Now if a developer didn't start the above or it was stopped for some reason, they may see something like the following:

[terraform]: Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
[terraform]:
[terraform]: Outputs:
[terraform]:
[terraform]: load_balancer_address = {
[terraform]:   "hostname" = ""
[terraform]:   "ip" = "172.18.1.100"
[terraform]: }
Attempt 1 failed to connect to tcp tcp://172.18.1.100:80
Attempt 2 failed to connect to tcp tcp://172.18.1.100:80
Attempt 3 failed to connect to tcp tcp://172.18.1.100:80
Attempt 4 failed to connect to tcp tcp://172.18.1.100:80
Attempt 5 failed to connect to tcp tcp://172.18.1.100:80
Attempt 6 failed to connect to tcp tcp://172.18.1.100:80
Attempt 7 failed to connect to tcp tcp://172.18.1.100:80
Attempt 8 failed to connect to tcp tcp://172.18.1.100:80
Attempt 9 failed to connect to tcp tcp://172.18.1.100:80
Attempt 10 failed to connect to tcp tcp://172.18.1.100:80
ERROR: After stage=04-kubernetes-ingress unable to connect to ingress host=172.18.1.100 port=80

It could to hard to figure out why this is happening, a suggestion to print/log suggestion to check if docker-mac-net-connect is running or not (if the user is on Mac).

Value and/or benefit

This would make the reason of the failure very obvious for the user and will improve the developer experience, given most of the Nebari devs are using Mac.

Anything else?

Note that this is already documented in the official docs, this issue is only for suggesting the user (in the command line) potential solution while deploying Nebari, when they see the above-mentioned error.

No response