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
758f3caa48
Update to @balena/lint 5.x
...
Change-type: patch
2020-05-15 12:08:42 +01:00
838c1ebba4
Correctly check if value is a valid Integer
...
Closes : #1180
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-12 12:42:14 -04:00
8295858b32
Added endpoint to check if VPN is connected
...
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-11 21:21:44 -04:00
f6aa4dd015
Fixed stubs for test suite
...
Closes : #1280
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-11 18:16:22 -04:00
913418bb37
Remove unnecessary config.json keys
...
Change-type: patch
2020-05-08 12:56:42 +01:00
60c07fc2fc
Move SupervisorAPI state change logs to appropriate functions
...
Closes : #1277
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-07 13:48:12 -04:00
31957566e5
Remove legacy fallback to DROP rule in iptables
...
This has not been necessary for a long time, and wwe can now remove it.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-05-05 12:15:19 +01:00
7b1f03ced5
Add an ESTABLISHED flag to API iptables rules
...
This allows a response to an input with dport=`supevisor api port` and
is required when the host OS is doing stateful firewalling.
This should not affect things when stateful firewalling is not in
effect, as the standard OUTPUT chain policy is ACCEPT, so we're just
being explicit about it.
Change-type: patch
Backport-to: next, current, sunset
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-05-05 12:15:12 +01:00
2007a98940
Added Bearer Authorization spec
...
Closes : #1249
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-04 13:22:58 -04:00
698435a5c8
Added spec for current auth implementation
...
Signed-off-by: Miguel Casqueira <miguel@balena.io >
2020-05-04 10:49:09 -04:00
a43d71d1ac
📄 Upgrade knex to avoid CVE-2019-10757
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-04-15 13:37:50 +01:00
37feb7e325
Move from dbus-native to dbus
...
Closes : #1049
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-04-13 10:07:14 +01:00
c9c0e650cb
Support matching on device type within contracts
...
Closes : #1191
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-04-09 10:45:07 +01:00
a59af6abe8
Workaround a circular dependency
...
Change-type: patch
2020-04-08 17:40:39 +01:00
a2ec35456b
Convert application-manager.coffee to javascript
...
Change-type: patch
2020-04-08 12:15:06 +01:00
0950b66c52
Allow spaces in volume definitions
...
Closes : #1247
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-04-07 10:35:34 +01:00
81927d7861
Update to balena-register-device 6.0.1
...
Change-type: patch
2020-04-06 17:45:03 +01:00
d3221ca235
Convert test/18-startup.coffee to typescript
...
Change-type: patch
2020-04-02 14:25:26 +01:00
70b0705551
Convert test/19-compose-utils.coffee to javascript
...
Change-type: patch
2020-04-02 14:25:25 +01:00
98e956831a
Convert test/18-compose-network.coffee to javascript
...
Change-type: patch
2020-04-02 14:25:24 +01:00
d3cf650ac4
Convert test/17-config-utils.spec.coffee to javascript
...
Change-type: patch
2020-04-02 14:25:23 +01:00
dcb01cb863
Convert test/16-ports.spec.coffee to typescript
...
Change-type: patch
2020-04-02 14:25:21 +01:00
515fb059f4
Convert test/15-conversions.spec.coffee to javascript
...
Change-type: patch
2020-03-31 16:38:07 +01:00
fd4cec31e7
Convert test/12-logger.spec.coffee to javascript
...
Change-type: patch
2020-03-31 16:25:57 +01:00
3af89cd13f
Add BALENA_DEVICE_ARCH environment variable for containers
...
Closes : #1232
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-03-30 16:40:02 +01:00
7e6d32516d
Tests: Add missing await
...
Change-type: patch
2020-03-23 19:02:17 +00:00
5c50f656c3
Allow semver comparison on l4t versions in contracts
...
We add an implicit .0 to the end of l4t versions which do not fulfill
semver, which allows us to always match using comparison operators, such
as < and <=.
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-03-06 15:54:04 +00:00
e0d2bdfaa9
config: Support loading SSDT via ConfigFS
...
Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io >
2020-03-05 13:30:06 +00:00
c21da8f3db
Convert device-state module to typescript
...
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io >
2020-02-25 14:50:21 +07:00