Issues with deploying to the device

raspberrypi3
balena-cli

#1

Following the ‘get started’ guide I’ve set up the openBalena instance, configured DNS, balena CLI and certs. My local machine is running Windows 10, openBalena instance is running on an Ubuntu Linux server.

I’ve also created the app and setup the device. The device is running online.

$ balena device b9257cb
== SPRING DARKNESS
ID: 2
DEVICE TYPE: raspberrypi3
STATUS: idle
IS ONLINE: true
IP ADDRESS: —.---.—.---
APPLICATION NAME: testApp2
UUID: b9257cb…2
SUPERVISOR VERSION: 9.0.1
OS VERSION: balenaOS 2.29.2+rev2

I have an issue however with deploying the example project to the device. Running balena deploy testApp2 --logs --source . --emulated -- build results in the following message:

$ balena deploy testApp2 --logs --source . --emulated --build
Docker seems to be unavailable. Is it installed and running?

Docker is installed and running on my local machine, though perhaps I should configure it correctly.

Also, looking at the CLI docs, should I specify the IP of my device when I’m deploying or something along those lines using the --dockerHost and --dockerPort switches to point to my RPI3 device? I might have this confused but the project is built on my local machine, and then ‘deployed’ to my device, correct? Assuming this, there would most likely be an issue with my local configuration and not with the device.


#4

Hello, it seems Docker on your local machine is unreachable, or configured in a non-standard way. What happens if you run $ docker ps?


#6

Running docker ps gives me:

$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

The config on docker should be the default one, as I’ve not fiddled with it yet. After installing docker I ran the suggested docker run hello-world to test the installation, and it seemed to have worked correctly, so I left it as it was.


#8

Can you try running the command with --docker=//./pipe/docker_engine?


#9

Sure, no problem.

$ balena deploy testApp2 --logs --source . --emulated --build --docker=//./pipe/docker_engine
[Info] Creating default composition with source: C:\Users\fruloops\Downloads\OpenBalena\Git\sense-snake
[Info] Building for armv7hf/raspberrypi3
[Build] Building services…
[Build] main Preparing…
[Build] Built 1 service in 0:15
[Error] Deploy failed
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

So it would seem that at least the build started now

EDIT: looking at the https://registry-1.docker.io/v2/ I get the following:
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}, so perhaps this is an authentication issue with docker or the network restriction of the network I’m on.


#11

Update: The latest issue seemed to be with the docker registry and the network I’m on. I’ve set up a private registry and used that in the Dockerfile and deployed to my device and it worked like a charm.

@dfunckt Thanks for your help.