dcaputo-harmoni / open-balena-ui

Administration interface for open-balena
MIT License
5 stars 7 forks source link

open-balena-helm | error converting YAML to JSON #17

Open pankalog opened 5 months ago

pankalog commented 5 months ago

Hey, thank you so much for your work!

I'm trying to use open-balena-helm, but I cannot create an issue there. If you allow issues there I can transfer it to there.

For the issue, I follow the README to install the project, and there is an issue that occurs when running scripts/install-openbalena.sh generate-config balena.example.com pankalog@email.com secret secret

Here's the output of the script:

error: no context exists with the name: "docker-desktop"
Error from server (AlreadyExists): namespaces "openbalena" already exists
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/balena/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/balena/.kube/config
"haproxy-ingress" already exists with the same configuration, skipping
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/balena/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/balena/.kube/config
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "haproxy-ingress" chart repository
Update Complete. ⎈Happy Helming!⎈
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/balena/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/balena/.kube/config
"grafana" already exists with the same configuration, skipping
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/balena/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/balena/.kube/config
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "grafana" chart repository
Update Complete. ⎈Happy Helming!⎈
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/balena/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/balena/.kube/config
"stakater" already exists with the same configuration, skipping
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/balena/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/balena/.kube/config
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "stakater" chart repository
Update Complete. ⎈Happy Helming!⎈
Generating openbalena config...
==> Creating new configuration at: /home/balena/open-balena-helm/open-balena/config
==> Bootstrapping easy-rsa...
  - Downloading easy-rsa...
==> Generating root CA cert...
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
Enter pass phrase for /home/balena/open-balena-helm/open-balena/config/certs/root/private/ca.key:
Enter pass phrase for /home/balena/open-balena-helm/open-balena/config/certs/root/private/ca.key:
==> Generating root cert chain for haproxy...
Enter pass phrase for /home/balena/open-balena-helm/open-balena/config/certs/root/private/ca.key:
Enter pass phrase for /home/balena/open-balena-helm/open-balena/config/certs/root/private/ca.key:
Enter pass phrase for /home/balena/open-balena-helm/open-balena/config/certs/root/private/ca.key:
==> Generating token auth cert...
==> Generating VPN CA, cert and dhparam (this may take a while)...
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
Enter pass phrase for /home/balena/open-balena-helm/open-balena/config/certs/vpn/private/ca.key:
Enter pass phrase for /home/balena/open-balena-helm/open-balena/config/certs/vpn/private/ca.key:
Enter pass phrase for /home/balena/open-balena-helm/open-balena/config/certs/vpn/private/ca.key:
==> Setting up environment...
==> Adding default compose file...
==> Success!
  - Start the instance with: ./scripts/compose up -d
  - Stop the instance with: ./scripts/compose stop
  - To create a single, flat, docker-compose.yml file, run:

      ./scripts/compose config > docker-compose.yml

  - Use the following certificate with Balena CLI: /home/balena/open-balena-helm/open-balena/config/certs/root/ca.crt
    IMPORTANT: You will need to restart your Docker daemon after trusting this certificate to allow your workstation to push images to the registry.

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/balena/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/balena/.kube/config
Error: INSTALLATION FAILED: YAML parse error on openbalena/templates/issuers/acme.yaml: error converting YAML to JSON: yaml: line 20: did not find expected key

I'm not exactly sure how to provide more information for this issue, but I am running this on Ubuntu 22.04 and cgroup1 on an x86 processor.

I am also not exactly sure if in the command i should specify openbalena.example.com or .example.com?

If you want me to run and commands let me know, I don't have any data in this instance that need to be preserved.

Thank you so much!

shaunco commented 5 months ago

This is not related to open-balena-ui or the balena-admin helm charts. You need a real domain where you control the DNS to use the ACME certificate issuer (see https://github.com/balena-io/open-balena/issues/108 ), and "example.com" is not your domain. Your options are to either get a real domain and setup DNS via Cloudflare or some similar service or create your own self-signed root CAs using open-balena quickstart script.

For more info, see https://open-balena-docs.balena.io/getting-started/ or https://forums.balena.io/t/openbalena-quickstart/367598/8