2020-10-20 21:11:17 +00:00
|
|
|
# balena CLI Installation Instructions for macOS
|
2020-09-16 13:53:46 +00:00
|
|
|
|
|
|
|
These instructions are for the recommended installation option. Advanced users may also be
|
|
|
|
interested in [advanced installation options](./INSTALL-ADVANCED.md).
|
|
|
|
|
|
|
|
Selected operating system: **macOS**
|
|
|
|
|
|
|
|
1. Download the installer from the [latest release
|
|
|
|
page](https://github.com/balena-io/balena-cli/releases/latest).
|
|
|
|
Look for a file name that ends with "-installer.pkg":
|
|
|
|
`balena-cli-vX.Y.Z-macOS-x64-installer.pkg`
|
|
|
|
|
2021-08-27 21:30:59 +00:00
|
|
|
2. Double click on the downloaded file to run the installer and follow the installer's
|
|
|
|
instructions.
|
|
|
|
|
|
|
|
3. Check that the installation was successful:
|
|
|
|
- [Open the Terminal
|
|
|
|
app](https://support.apple.com/en-gb/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac).
|
|
|
|
- On the terminal prompt, type `balena version` and hit Enter. It should display
|
|
|
|
the version of the balena CLI that you have installed.
|
2020-09-16 13:53:46 +00:00
|
|
|
|
2024-09-26 15:26:19 +00:00
|
|
|
No further steps are required to run most CLI commands. The `balena device ssh`, `build`, `deploy`
|
2021-03-22 16:03:44 +00:00
|
|
|
and `preload` commands may require additional software to be installed, as described
|
|
|
|
in the next section.
|
|
|
|
|
|
|
|
To update the balena CLI, repeat the steps above for the new version.
|
|
|
|
To uninstall it, run the following command on a terminal prompt:
|
|
|
|
|
|
|
|
```text
|
2024-08-22 16:03:37 +00:00
|
|
|
sudo /usr/local/src/balena-cli/bin/uninstall
|
2021-03-22 16:03:44 +00:00
|
|
|
```
|
2020-09-16 13:53:46 +00:00
|
|
|
|
|
|
|
## Additional Dependencies
|
|
|
|
|
|
|
|
### build and deploy
|
|
|
|
|
|
|
|
These commands require [Docker](https://docs.docker.com/install/overview/) or
|
2021-04-04 21:47:27 +00:00
|
|
|
[balenaEngine](https://www.balena.io/engine/) to be available on a local or remote
|
|
|
|
machine. Most users will follow [Docker's installation
|
2021-03-06 21:48:19 +00:00
|
|
|
instructions](https://docs.docker.com/install/overview/) to install Docker on the same
|
2021-04-04 21:47:27 +00:00
|
|
|
workstation as the balena CLI. The [advanced installation
|
|
|
|
options](./INSTALL-ADVANCED.md#additional-dependencies) document describes other possibilities.
|
2020-09-16 13:53:46 +00:00
|
|
|
|
2024-09-26 15:26:19 +00:00
|
|
|
### balena device ssh
|
2020-09-16 13:53:46 +00:00
|
|
|
|
2024-09-26 15:26:19 +00:00
|
|
|
The `balena device ssh` command requires the `ssh` command-line tool to be available. To check whether
|
2020-09-16 13:53:46 +00:00
|
|
|
it is already installed, run `ssh` on a Terminal window. If it is not yet installed, the options
|
|
|
|
include:
|
|
|
|
|
|
|
|
* Download the Xcode Command Line Tools from https://developer.apple.com/downloads
|
|
|
|
* Or, if you have Xcode installed, open Xcode, choose Preferences → General → Downloads →
|
|
|
|
Components → Command Line Tools → Install.
|
|
|
|
* Or, install [Homebrew](https://brew.sh/), then `brew install openssh`
|
|
|
|
|
2024-09-26 15:26:19 +00:00
|
|
|
The `balena device ssh` command also requires an SSH key to be added to your balena account: see [SSH
|
2020-09-16 13:53:46 +00:00
|
|
|
Access documentation](https://www.balena.io/docs/learn/manage/ssh-access/). The `balena key*`
|
|
|
|
command set can also be used to list and manage SSH keys: see `balena help -v`.
|
|
|
|
|
|
|
|
### balena preload
|
|
|
|
|
2021-04-04 21:47:27 +00:00
|
|
|
Like the `build` and `deploy` commands, the `preload` command requires Docker.
|
|
|
|
Preloading balenaOS images for some older device types (like the Raspberry
|
2021-03-25 16:07:09 +00:00
|
|
|
Pi 3, but not the Raspberry 4) requires Docker to support the [AUFS storage
|
2020-09-16 13:53:46 +00:00
|
|
|
driver](https://docs.docker.com/storage/storagedriver/aufs-driver/). Unfortunately, Docker Desktop
|
2021-04-04 21:47:27 +00:00
|
|
|
for Windows and macOS dropped support for the AUFS filesystem in Docker CE versions greater than
|
2021-03-25 16:07:09 +00:00
|
|
|
18.06.1. The present workarounds are to either:
|
2020-09-16 13:53:46 +00:00
|
|
|
|
2021-03-25 16:07:09 +00:00
|
|
|
* Install the balena CLI on Linux (e.g. Ubuntu) with a virtual machine like VirtualBox.
|
|
|
|
This works because Docker for Linux still supports AUFS. Hint: if using a virtual machine,
|
|
|
|
copy the image file over, rather than accessing it through "file sharing", to avoid errors.
|
2020-09-16 13:53:46 +00:00
|
|
|
* Downgrade Docker Desktop to version 18.06.1. Link: [Docker CE for
|
|
|
|
Mac](https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-18061-ce-mac73-2018-08-29)
|
|
|
|
|
2021-03-25 16:07:09 +00:00
|
|
|
We are working on replacing AUFS with overlay2 in balenaOS images of the affected device types.
|