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 fails, improve docs #2026

Closed
nkaretnikov opened this issue Sep 22, 2023 · 7 comments
Closed

[BUG] - local deploy fails, improve docs #2026

nkaretnikov opened this issue Sep 22, 2023 · 7 comments
Labels
needs: follow-up 📫 Someone needs to get back to this issue or PR type: bug 🐛 Something isn't working

Comments

@nkaretnikov
Copy link

nkaretnikov commented Sep 22, 2023

Describe the bug

Local deploy can fail for a bunch of reasons.
I saw different errors depending on whether I have bridged networking or NAT in the VM, might be unrelated.

Some examples:

[terraform]: \u2502 Error: Get "https://127.0.0.1:38963/api/v1/namespaces/metallb-system": read tcp 127.0.0.1:49316->127.0.0.1:38963: read: connection reset by peer - error from a previous attempt: read tcp 127.0.0.1:49304->127.0.0.1:38963: read: connection reset by peer
[terraform]: \u2502 
[terraform]: \u2502   with kubernetes_namespace.metallb,
[terraform]: \u2502   on main.tf line 56, in resource "kubernetes_namespace" "metallb":
[terraform]: \u2502   56: resource "kubernetes_namespace" "metallb" {

OR

It failing to setup/reach Keycloak and exiting after timeout.

Command examples:

nebari init -p test local
nebari deploy -c nebari-config.yaml 

OR

nebari init local --project-name test --domain-name localhost --namespace dev --auth-provider password 
--ci-provider none --terraform-state remote

Problems:

  • This is confusing and not clearly explained in the docs
  • Passing localhost doesn't seem to work. Is it known to work? What requirements are there?
  • Without the domain, the IP that's used - how is this one selected? Is there a way to specify 0.0.0.0 or 127.0.0.1 or a network interface?

Expected behavior

An example command in the docs: shows how to deploy on a Ubuntu VM on localhost.
If there are constraints, these should be explained after this example command.

OS and architecture in which you are running Nebari

Linux

How to Reproduce the problem?

6d01b04

Command output

No response

Versions and dependencies used.

No response

Compute environment

None

Integrations

No response

Anything else?

No response

@nkaretnikov nkaretnikov added needs: triage 🚦 Someone needs to have a look at this issue and triage type: bug 🐛 Something isn't working labels Sep 22, 2023
@iameskild
Copy link
Member

iameskild commented Sep 25, 2023

Hi @nkaretnikov, sorry to hear you're running into issues. What was the domain you specified in nebari-config.yaml? And did you update your /etc/domain (docs)?

And which sections of the docs are you referring to when you say it's unclear?

@pavithraes pavithraes added needs: follow-up 📫 Someone needs to get back to this issue or PR and removed needs: triage 🚦 Someone needs to have a look at this issue and triage labels Sep 25, 2023
@nkaretnikov
Copy link
Author

@iameskild I either specified localhost or provided nothing. I didn't update any system files.
Docs I used: https://www.nebari.dev/docs/how-tos/nebari-local

UX-wise, and that's the main issue, it's still not clear to me why so much user-interaction is required. When I start something like an HTTP server, it just starts automatically on some address and pre-defined port. I can specify the address and port, too, if I need. What is preventing nebari just starting on localhost (127.0.0.1 or 0.0.0.0), with some predefined ports, like 5000, and so on?

@iameskild
Copy link
Member

@costrouc at one point we needed users to deploy to github-actions.nebari.dev, is this still the case? The docs don't seem to make indicate that as a requirement.

@nkaretnikov
Copy link
Author

This still fails for me in a VM:

provider: local
namespace: dev
nebari_version: 2023.7.2.dev61+g6d01b048
project_name: test
domain: github-actions.nebari.dev
...

Generated via nebari init --guided-init.

Error:

[terraform]: kubernetes_namespace.metallb: Creating...
[terraform]: \u2577
[terraform]: \u2502 Error: Post "https://127.0.0.1:32777/api/v1/namespaces": read tcp 127.0.0.1:34616->127.0.0.1:32777: read: connection reset by peer
[terraform]: \u2502 
[terraform]: \u2502   with kubernetes_namespace.metallb,
[terraform]: \u2502   on main.tf line 56, in resource "kubernetes_namespace" "metallb":
[terraform]: \u2502   56: resource "kubernetes_namespace" "metallb" {
[terraform]: \u2502 
[terraform]: \u2575

@nkaretnikov
Copy link
Author

nkaretnikov commented Nov 9, 2023

Made another attempt to deploy locally.

Discovered there is a CI file with a local deploy config: https://github.com/nebari-dev/nebari/blob/748bb6a51dd094c5a9a97006754a32a0dff83caa/.github/workflows/test_local_integration.yaml

The most important commands there:

sudo usermod -aG docker $USER && newgrp docker
...
nebari init local --project=thisisatest --domain github-actions.nebari.dev --auth-provider=password
nebari deploy --config nebari-config.yaml --disable-prompt
  • I didn't make it past setting up Keycloak when testing on ARM64 Linux. The domain resolved, but it failed with a 503 trying to reach the service.
  • But I made if further on an x86_64 Linux system. However, I'm still not done because things fail further down the line. That said, I suspect it might be because my test machine is not powerful enough.
  • I did check the logs for this CI job on one of the recent PRs and there it succeeds, which is why I suspect my hardware not being good enough.

@marcelovilla
Copy link
Member

I didn't make it past setting up Keycloak when testing on ARM64 Linux. The domain resolved, but it failed with a 503 trying to reach the service.

I think this might be related to #2162

@nkaretnikov
Copy link
Author

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)

Closing as a dup.

@github-project-automation github-project-automation bot moved this from New 🚦 to Done 💪🏾 in 🪴 Nebari Project Management May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: follow-up 📫 Someone needs to get back to this issue or PR type: bug 🐛 Something isn't working
Projects
Development

No branches or pull requests

4 participants