Install Balena CLI

Install Balena CLI from balena

🚧

The latest supported balena CLI 18.2.34

Please make sure to download your balena-cli-....-x64-standalone.zip from here: https://github.com/balena-io/balena-cli/releases/tag/v18.2.34

  1. Follow https://github.com/balena-io/balena-cli/blob/master/INSTALL-LINUX.md
    1. On a normal x86 machine us the balena-cli-....-x64-standalone.zip
  2. Install the cert in your shell:
     echo 'export NODE_EXTRA_CA_CERTS=/opt/aivero/ds/self-signed-certs/root/ca.crt'  >> ~/.bashrc && source ~/.bashrc
    

  1. Set the target open balena instance for the balena CLI

    echo "balenaUrl: 'openbalena.aivero.lan'" > ~/.balenarc.yml
    
  2. Repeat the same thing for the super user

    echo "balenaUrl: 'openbalena.aivero.lan'" | sudo tee /root/.balenarc.yml
    
  3. Ensure sudo can run balena. Run the following

     sudo visudo -f /etc/sudoers.d/openbalena
    
    

    Add the following, making sure to replace /home/rapha/Tools/balena-cli with the balena-cli location.

    Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/rapha/Tools/balena-cli"
    
    Defaults:%sudo env_keep += "http_proxy https_proxy ftp_proxy all_proxy no_proxy CURL_CA_BUNDLE NODE_EXTRA_CA_CERTS"
    
    

Checklist

👍

Check these:

  1. Test it with the below.
    sudo balena login --credentials  --email [email protected] --password $SUPERUSER_PASSWORD
    
  2. It should report Logging in to openbalena.aivero.lan Successfully logged in as: admin