konstructio / kubefirst

The Kubefirst Open Source Platform
https://docs.kubefirst.io
MIT License
1.78k stars 139 forks source link

Getting error when installing kubefirst on WSL-2 #2173

Closed mwoodpatrick closed 4 months ago

mwoodpatrick commented 5 months ago

Which version of kubefirst are you using?

v2.4.6

Which cloud provider?

k3d (local)

Which DNS?

None specific

Which installation type?

CLI

Which distributed Git provider?

GitHub

Did you use a fork of gitops-template?

No

Which Operating System?

Linux

What is the issue?

When running:

kubefirst k3d create

I'm getting an error at the end of the installation (after Configuring Vault completed ok) I get:

Error: exit status 1

Any suggestions as to what the error is or how to debug, the log shows:

{"level":"info","time":"2024-05-05T15:11:55-07:00","message":" export AWS_ACCESS_KEY_ID = *****"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m╷\u001b[0m\u001b[0m"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[1m\u001b[31mError: \u001b[0m\u001b[0m\u001b[1mUnsupported attribute\u001b[0m"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\u001b[0m on oidc-clients.tf line 43, in module \"gitlab\":"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m 43: secret_mount_path = vault_mount.secret\u001b[4m.pat\u001b[0m\u001b[0m"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m│\u001b[0m \u001b[0mThis object has no argument, nested block, or exported attribute named"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m│\u001b[0m \u001b[0m\"pat\". Did you mean \"path\"?"} {"level":"warn","time":"2024-05-05T15:11:57-07:00","message":"ERR: \u001b[31m╵\u001b[0m\u001b[0m"} {"level":"error","error":"exit status 1","time":"2024-05-05T15:11:57-07:00","message":"command \"/home/mwoodpatrick/.k1/kubefirst/tools/terraform\" failed"} {"level":"debug","time":"2024-05-05T15:11:57-07:00","message":"error: terraform apply -auto-approve for /home/mwoodpatrick/.k1/kubefirst/gitops/terraform/vault failed exit status 1"}

Code of Conduct

fharper commented 5 months ago

@mwoodpatrick: thanks for reporting, I'll try to replicate the issue and keep you in the loop.

fharper commented 5 months ago

@mwoodpatrick: sorry for the delay, testing it now. Just to be sure, the report mentions GitHub, but the error has GitLab written in it. I will test both, but I want to be sure of what you tried when you get this error.

fharper commented 5 months ago

@mwoodpatrick: so I wasn't able to replicate the issue with GitHub, but I will try GitLab now.

mwoodpatrick commented 5 months ago

I am using GitHub, any suggestions on the best way for me to debug this further so I can get some insight on where the error is happening?

fharper commented 5 months ago

Does this error happen again if you retry the same command?

If so, can you show me the output of kubectl get pods -A please.

fharper commented 5 months ago

Also, I don't think we change anything in k3d, but you can also try with the latest version 2.4.8 which is the one I used. I'm trying it one last time on another Linux system just to be sure.

mwoodpatrick commented 5 months ago

So I did a clean install with 2.4.8 and this time I got the error:

Error: unable to reach vault over https - this is likely due to the mkcert certificate store missing. please install it via /home/mwoodpatrick/.k1/kubefirst/tools/mkcert -install

Is this expected?

Also using this using this version I'm still seeing the other issue I reported a day or so ago:

Running kubefirst changes my stty settings #2176

fharper commented 5 months ago

Is this expected?

Yes, you need to install this. You can find more information about this needed installation step at https://docs.kubefirst.io/k3d/quick-start/install#install-the-ca-certificate-authority-of-mkcert-in-your-trusted-store

lso using this using this version I'm still seeing the other issue I reported a day or so ago

It make sense as we didn't tackle this bug yet, but the team has been notified and I was able to reproduce.

mwoodpatrick commented 5 months ago

I'm running on "Debian GNU/Linux 12 (bookworm)" so I don't have brew but installed mkcert using:

sudo apt install mkcert libnss3-tools
mkcert -install

Including the additional steps for Windows with WSL

This was completed without issue and I was able to get further running:

kubefirst k3d create

This did install the k3d clusters and argo but did hit some issues see log

Log shows:

Hit error Unsupported attribute

Running:

/home/mwoodpatrick/.k1/kubefirst/tools/terraform validate

reports:

Success! The configuration is valid.

mwoodpatrick commented 5 months ago

I found my problem (I forgot to export my GITHUB_TOKEN), it would be good if the command checked to see if it was set.

fharper commented 4 months ago

It is supposed to detect it, and still working on macOS. Let me try on WSL2 with Debian.

fharper commented 4 months ago

I tried on Debian, and it is showing the following screen when I didn't have the environment variable set.

image

So since you were able to crate a cluster properly, and I cannot reproduce the token one, I'll close this issue.

If you encounter the same issue about the token in the future, create a new issue so it will be easier to follow as this one was about multiple things.