07e644d0b6
Refactor extra_uEnv backend to match with more devices
...
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-09-15 14:19:59 -04:00
96c68166a1
application-manager: Convert to a singleton
...
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-09-14 11:23:36 +01:00
e3864915bc
device-state: Convert to a singleton
...
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-09-14 09:31:12 +01:00
d50f7791e1
api-binder: Convert to a singleton
...
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-09-14 09:31:12 +01:00
662826d349
added support for configuring ODMDATA
...
Closes: 1206
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-08-29 09:05:27 -04:00
7ea49bf4fb
Preventing removing all configurations if device has no backends
...
Closes : #1437
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-08-24 13:41:17 -04:00
de4c1b2538
Don't enforce the vc4-fkms-v3d dtoverlay on rpi4
...
Change-type: patch
Closes : #1404
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-08-20 10:21:02 +01:00
379730a9e1
Update typed-error to 3.x
...
Update typed-error from 2.0.0 to 3.2.1
Change-type: patch
2020-08-19 10:07:54 +01:00
1d62209505
Refactor device-config to support configuring multiple backends
...
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-08-12 15:05:03 -04:00
ff404456b3
Refactor configurable backend class names
...
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-08-12 14:29:58 -04:00
5aecd94e24
bug: Firewall not blocking supervisor access from outside the device
...
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
2020-08-12 13:43:33 +01:00
e9b536a889
bug: Allow DNS through firewall for local containers
...
We provide a local DNS server for containers to use and this
was not allowed through the firewall when enabled.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
2020-08-11 15:17:06 +01:00
511cbbe74e
Update pinejs-client-request and make use of a named key
...
Update pinejs-client-request from 7.0.0 to 7.1.0
Change-type: patch
2020-08-03 09:27:11 +00:00
11cac2dd69
Fixes #1299 v1 start/stop endpoint issue with service access.
...
Change-Type: patch
Signed-off-by: Nitish Agarwal <1592163+nitishagar@users.noreply.github.com >
2020-07-31 23:08:50 +05:30
0999f57fa8
fix duplicate test file index
...
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-07-30 14:07:00 -04:00
9b37ce96f9
fix matching extra_uEnv backend with unsupported devices
...
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-07-30 14:04:37 -04:00
15c57a86b4
fix up "atleast" -> "at least"
...
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io >
2020-07-29 11:55:22 -04:00
cac2e3612c
Support setting device/fleet configuration in extra_uEnv.txt
...
Closes : #1385
Change-Type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-07-28 16:36:16 -04:00
eeda7e3ab1
Extract current state reporting to its own module
...
Change-type: minor
2020-07-24 17:35:17 +01:00
41987d8e76
log detection of changes to VPN status
...
Change-type: patch
Signed-off-by: dt-rush <nickp@balena.io >
2020-07-23 19:20:59 -04:00
6ef3bd2362
docker-utils: Test network gateway determination logic
...
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
2020-07-22 13:17:16 +01:00
898c7e71da
bug: Fix unhandled promise rejection
...
When invoking iptables-restore it can fail. This wasn't handled
and this makes sure that it fails gracefully.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
2020-07-13 13:05:12 +01:00
5337c0102c
Convert deviceConfig module to a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-07-08 12:05:09 +01:00
03ca0ee9ad
avahi: Control with HOST_DISCOVERABILITY
...
The host config variable HOST_DISCOVERABILITY can be set to
true or false, controlling the state of the avahi service. This
determines if the device advertises it's presence over mDNS.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
Signed-off-by: Rich Bayliss <rich@balena.io >
2020-07-06 13:02:29 +01:00
28c5a44e71
firewall: Add Host Firewall functionality
...
Controlled by BALENA_HOST_FIREWALL_MODE, the firewall can
either be 'on' or 'off'.
- In the 'off' state, all traffic is allowed.
- In the 'on' state, only traffic for the core services provided
by Balena is allowed.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
2020-07-01 18:43:08 +01:00
59fc589eb2
Added support for configuring FDT directive in extlinux.conf
...
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-06-23 15:56:10 -04:00
3098abeca5
Refactor backends into seperate files and added tests for extlinux
...
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-06-23 15:56:10 -04:00
7a27b6c671
Refactor device-config tests styling
...
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-06-23 15:56:10 -04:00
1b91ef3405
state: Report device MAC address to the API
...
When reporting device information, send the MAC address of any
interfaces on the system. Also expose in the Supervisor API at
the route GET /v1/device.
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
2020-06-22 10:41:06 +01:00
0e8d92e08a
Make service-manager module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-17 14:56:57 +00:00
adaad786af
Make volume-manager module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-17 14:56:57 +00:00
8fc97b9de8
Make network-manager module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-17 14:56:57 +00:00
1dccbaecd8
Use API v6
...
See: https://github.com/balena-io/open-balena/issues/80
Change-type: minor
2020-06-15 13:57:32 +03:00
ae646a07ec
Add label to expose gpu to container
...
In the absence of an upstream implementation of the DeviceRequest API introduced
as part of Docker API v1.40 we roll our own using a feature label.
As per my comment in the code, we fall back to the default behavior of
docker cli's `--gpu` and request single device with the `gpu` capabilty.
The only implementation at the moment is the NVIDIA driver; here:
https://github.com/balena-os/balena-engine/blob/master/daemon/nvidia_linux.go
Background on the composefile implementation:
https://github.com/compose-spec/compose-spec/issues/74
https://github.com/docker/compose/issues/6691
Change-type: patch
Connects-to: https://github.com/balena-os/balena-jetson/pull/75
Signed-off-by: Robert Günzler <robertg@balena.io >
2020-06-11 14:06:16 +02:00
b31d5007fb
Move database app processing out to its own module
...
This is part of the work to make the application-manager module much
less monolithic, in preperation for system apps and more generally
multi-app.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-11 11:55:11 +01:00
2b3dc2fbce
Make images module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-10 11:29:28 +01:00
ffe814e447
Refactored @ts-ignore to @ts-expect-error in test file
...
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-06-08 13:24:19 -04:00
651e48b1bd
Make logger module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-08 17:19:20 +01:00
389e14ec6b
Make the event-tracker module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-08 10:13:33 +01:00
9fc2e86322
Convert all test files to TS and add .spec to all filenames
...
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-06-05 18:34:24 -04:00
17a5d8dd49
Isolate target state fetching to its own module which emits on update
...
Change-type: minor
2020-06-03 17:37:38 -04:00
aad20e2c2f
Make docker module a singleton
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-02 17:57:18 +01:00
ff4a31a0e6
Make the config module a singleton
...
Change-type: patch
Co-authored-by: Pagan Gazzard <page@balena.io >
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-06-02 14:29:05 +01:00
5550a3a330
Refactor device-state healthchecks to log reason for failure
...
Closes : #1292
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-29 16:24:01 -04:00
ef83acdaeb
Refactor api-binder healthchecks to log reason for failure
...
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-29 16:14:58 -04:00
f494178b2b
Added test coverage for GET /v1/healthy
...
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-29 16:14:15 -04:00
1d7381327e
Make the db module a singleton
...
We were treating the database class as a singleton, but still having to pass
around the db instance. Now we can simply require the db module and have
access to the database handle.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-05-29 15:02:38 +01:00
eaaa9c257e
check for 409 status code, rather than string matching uuid conflicts
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-05-21 14:57:26 -04:00
db7c27037c
Improved handling of invalid appId in V2 state endpoint
...
Closes : #1294
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-19 10:53:19 -04:00
466c7999db
Remove CoffeeScript tests and all CoffeeScript tools
...
Closes : #1318
Change-Type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-15 13:01:51 -04:00