Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Local deploy on Arm based Mac fails #2300

Closed
pt247 opened this issue Mar 7, 2024 · 4 comments
Closed

[BUG] - Local deploy on Arm based Mac fails #2300

pt247 opened this issue Mar 7, 2024 · 4 comments

Comments

@pt247
Copy link
Contributor

pt247 commented Mar 7, 2024

Describe the bug

I am deploying Nebari locally on the Mac ARM (M3). Deployment is failing with the error:
ERROR: After stage=04-kubernetes-ingress unable to connect to ingress host=172.18.1.100 port=80

Expected behavior

Local deployment should finish.

OS and architecture in which you are running Nebari

macOS Sonoma Version 14.3.1 Apple M3

How to Reproduce the problem?

mkdir nebari-local && cd nebari-local
[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-darwin-arm64
chmod +x ./kind
nebari init local --project=thisisatest --domain github-actions.nebari.dev --auth-provider=password
sudo echo "172.18.1.100  github-actions.nebari.dev" | sudo tee -a /etc/hosts
nebari deploy -c nebari-config.yaml --disable-prompt
$ cat nebari-config.yaml

provider: local
namespace: dev
nebari_version: 0.1.dev1287+g6ae41e8
project_name: thisisatest
domain: github-actions.nebari.dev
ci_cd:
  type: none
terraform_state:
  type: remote
security:
  keycloak:
    initial_root_password: 93q1pmpf0rxhoqaxfwp5wn1jl5fh9kgq
  authentication:
    type: password
theme:
  jupyterhub:
    hub_title: Nebari - thisisatest
    welcome: Welcome! Learn about Nebari's features and configurations in <a href="https://www.nebari.dev/docs/welcome">the
      documentation</a>. If you have any questions or feedback, reach the team on
      <a href="https://www.nebari.dev/docs/community#getting-support">Nebari's support
      forums</a>.
    hub_subtitle: Your open source data science platform, hosted

Command output

$ nebari deploy -c nebari-config.yaml --disable-prompt
...
...
[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 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

That IP is an internal docker network IP and the port is also not exposed:

$ docker ps                  
CONTAINER ID   IMAGE                   COMMAND                  CREATED          STATUS          PORTS                       NAMES
de87fe05cef6   kindest/node:v1.23.13   "/usr/local/bin/entr…"   11 minutes ago   Up 11 minutes   127.0.0.1:52278->6443/tcp   test-cluster-control-plane


### Versions and dependencies used.

$ conda --version
conda 24.1.2

$ nebari --version
0.1.dev1287+g6ae41e8

$ kubectl version
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.23.13
WARNING: version difference between client (1.29) and server (1.23) exceeds the supported minor version skew of +/-1


### Compute environment

kind

### Integrations

_No response_

### Anything else?

_No response_
@pt247 pt247 added type: bug 🐛 Something isn't working needs: triage 🚦 Someone needs to have a look at this issue and triage labels Mar 7, 2024
@pt247
Copy link
Contributor Author

pt247 commented Mar 9, 2024

I can see that IP Assigned to the load balancer pod on my machine is not 172.18.1.100.

@dcmcand dcmcand added this to the Nebari Core Team - DevEx milestone Apr 18, 2024
@marcelovilla marcelovilla added area: k8s ⎈ area:developer-experience 👩🏻‍💻 and removed needs: triage 🚦 Someone needs to have a look at this issue and triage labels May 2, 2024
@nkaretnikov
Copy link

@pt247 This is solved in #1405 (comment), see the docs linked in the post. You need to update the hosts file and also install/enable docker-mac-net-connect.

However, note that I couldn't really use Nebari after deploy because it crashed almost immediately due to high resource usage (on a laptop): #1405 (comment)

@nkaretnikov
Copy link

For reference, the successful connection log looks like this (yes, the hostname was empty despite setting the domain in the nebari config file):

[terraform]: load_balancer_address = {
[terraform]:   "hostname" = ""
[terraform]:   "ip" = "172.18.1.100"
[terraform]: }
Attempt 1 succeeded to connect to tcp://172.18.1.100:80
Attempt 1 succeeded to connect to tcp://172.18.1.100:8786
Attempt 1 succeeded to connect to tcp://172.18.1.100:8022
Attempt 1 succeeded to connect to tcp://172.18.1.100:8023
Attempt 1 succeeded to connect to tcp://172.18.1.100:9080
Attempt 1 succeeded to connect to tcp://172.18.1.100:443
After stage=04-kubernetes-ingress kubernetes ingress available on tcp ports={80, 8786, 8022, 8023, 9080, 443}
DNS configured domain=nebari.example.com matches ingress ips=172.18.1.100

My hosts file:

172.18.1.100 nebari.example.com

Domain in the Nebari config:

domain: nebari.example.com

docker-mac-net-connect (from new docs linked above):

brew install chipmk/tap/docker-mac-net-connect
sudo brew services start chipmk/tap/docker-mac-net-connect

@marcelovilla
Copy link
Member

I'm closing this issue as this has been solved in #1405 (comment)

@github-project-automation github-project-automation bot moved this from New 🚦 to Done 💪🏾 in 🪴 Nebari Project Management Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants