Commit Graph

496 Commits

Author SHA1 Message Date
resin-io-versionbot[bot]
9415d04bc3 v7.16.6 2018-08-13 12:00:10 +00:00
resin-io-versionbot[bot]
840ec03b3e v7.16.5 2018-08-13 09:33:26 +00:00
resin-io-versionbot[bot]
51f008a44f v7.16.4 2018-08-07 12:54:52 +00:00
resin-io-versionbot[bot]
be73be53e1 v7.16.3 2018-08-01 19:41:31 +00:00
resin-io-versionbot[bot]
8cad3a664c v7.16.2 2018-07-25 14:57:58 +00:00
resin-io-versionbot[bot]
fa79c4872f v7.16.1 2018-07-25 10:34:13 +00:00
resin-io-versionbot[bot]
0578840f09 v7.16.0 2018-07-23 18:56:09 +00:00
Petros Angelatos
bba1da370b
logger: Remove pubnub leftovers
Change-type: minor
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2018-07-18 12:31:10 -07:00
resin-io-versionbot[bot]
d9eee69fcd v7.15.0 2018-07-17 20:40:33 +00:00
resin-io-versionbot[bot]
f8ead44b2b v7.14.1 2018-07-16 15:52:46 +00:00
resin-io-versionbot[bot]
b1c3faabb0 v7.14.0 2018-07-12 13:46:47 +00:00
resin-io-versionbot[bot]
4e3070f343 v7.13.3 2018-07-12 11:53:34 +00:00
resin-io-versionbot[bot]
36f95c88bf v7.13.2 2018-07-09 10:31:19 +00:00
resin-io-versionbot[bot]
98486717aa v7.13.1 2018-06-28 14:18:21 +00:00
resin-io-versionbot[bot]
71a2c3c456 v7.13.0 2018-06-27 11:52:58 +00:00
resin-io-versionbot[bot]
9f03d2885d v7.12.0 2018-06-26 08:01:14 +00:00
Cameron Diver
6ca2701b85
Move v2 endpoints to separate module
Change-type: patch
Connects-to: #640
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-06-25 17:32:47 +01:00
resin-io-versionbot[bot]
d1b7a4c2e4 v7.11.3 2018-06-25 09:54:05 +00:00
resin-io-versionbot[bot]
90ab089ca1 v7.11.2 2018-06-18 12:46:50 +00:00
Cameron Diver
809bc87b88
Convert config module to typescript
Extract config.json handling code out to separate modules too.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-06-18 13:41:18 +01:00
Cameron Diver
1b0fd82f51
Convert db module to typescript
Also had to change config module to bind `.this` value, due to
differences in setup.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-06-18 13:39:08 +01:00
resin-io-versionbot[bot]
f5e2f56da0 v7.11.1 2018-06-14 09:08:22 +00:00
Cameron Diver
31c6db2ccd
Upgrade TypedError and move docker-utils error to error module
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-06-13 16:55:34 +01:00
resin-io-versionbot[bot]
a170d63a6a v7.11.0 2018-06-13 10:52:23 +00:00
resin-io-versionbot[bot]
9c9e5e9e36 v7.10.2 2018-06-11 12:53:33 +00:00
resin-io-versionbot[bot]
bf58808dff v7.10.1 2018-06-11 10:06:15 +00:00
Cameron Diver
ea18462244
Move dependencies out to devDependencies 2018-06-11 10:20:17 +01:00
resin-io-versionbot[bot]
2f97955e6e v7.10.0 2018-06-06 13:57:47 +00:00
Cameron Diver
dc59c83409
Move boot config related code to config-utils module
This commit abstracts all of the boot config code out of the
device-config module, ready to extend with different config backends.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-06-05 17:00:45 +01:00
resin-io-versionbot[bot]
0cd0ba2b36 v7.9.1 2018-05-29 17:22:51 +00:00
resin-io-versionbot[bot]
410d1cf294 v7.9.0 2018-05-23 18:24:23 +00:00
Akis Kesoglou
8479801674 Add support for Balena deltas
Resin’s delta server supports Balena deltas as version 3 deltas. This commit adds support for triggering delta generation for Balena deltas, and applying them locally to the device via a simple pull.

The delta version to use when updating has been abstracted away as an env var that is user-defined. The default value is still instructing use of rsync deltas (v2).

Change-Type: minor
2018-05-23 20:59:56 +03:00
resin-io-versionbot[bot]
511549b259 v7.8.0 2018-05-23 12:49:44 +00:00
resin-io-versionbot[bot]
e84a5d8d30 v7.7.2 2018-05-22 10:52:19 +00:00
resin-io-versionbot[bot]
e797046f12 v7.7.1 2018-05-21 14:06:19 +00:00
resin-io-versionbot[bot]
2a05a21a5b v7.7.0 2018-05-18 17:28:38 +00:00
resin-io-versionbot[bot]
25cbe2075e v7.6.0 2018-05-16 15:19:34 +00:00
resin-io-versionbot[bot]
8ca6b239bb v7.5.6 2018-05-14 09:47:25 +00:00
resin-io-versionbot[bot]
7e9cc78ce5 v7.5.5 2018-05-11 15:44:38 +00:00
resin-io-versionbot[bot]
3b2c466327 v7.5.4 2018-05-11 12:47:17 +00:00
resin-io-versionbot[bot]
79c38538a9 v7.5.3 2018-05-02 12:03:57 +00:00
Cameron Diver
022eeaa2b3
Add typescript linting to supervisor tests
This also required updating node-resin-lint to v1.5.7

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-05-02 09:36:21 +01:00
resin-io-versionbot[bot]
8a390e159a v7.5.2 2018-05-01 15:44:42 +00:00
Pablo Carranza Velez
652b596c80 Add some more unit tests to the multicontainer supervisor
We add a bunch of additional unit tests, and also a coverage report using istanbul.

The tests are not meant to cover everything, but they're a first attempt at having *some* unit testing
on the supervisor. There's much to improve but hopefully it helps catch obvious errors.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-04-30 19:39:01 -07:00
resin-io-versionbot[bot]
a70cf858b2 v7.5.1 2018-04-29 10:01:27 +00:00
resin-io-versionbot[bot]
26b7c054cc v7.5.0 2018-04-27 16:16:07 +00:00
Cameron Diver
cfddbf65e4
Start initial typescript conversion, and add validation debugging
Add webpack config and dependencies to have typescript built, and also
convert src/lib/validation.coffee to typescript.

In this conversion I also added a lot of debugging which should help the
upcoming local mode development.

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-04-27 16:09:50 +01:00
resin-io-versionbot[bot]
12998203f5 v7.4.4 2018-04-23 16:59:51 +00:00
resin-io-versionbot[bot]
4216785253 v7.4.3 2018-04-19 22:15:10 +00:00
resin-io-versionbot[bot]
074eabe72d v7.4.2 2018-04-18 16:08:16 +00:00
resin-io-versionbot[bot]
74ff9cf269 v7.4.1 2018-04-11 23:02:42 +00:00
Pablo Carranza Velez
1ce9560427 Add additional tests to compose Service, and add linting to tests
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-04-11 15:15:30 -07:00
resin-io-versionbot[bot]
4685612a3b v7.4.0 2018-04-11 16:13:53 +00:00
resin-io-versionbot[bot]
608205c612 v7.3.0 2018-04-10 09:31:11 +00:00
Heds Simons
4eb796b9f4 Move to Node 6.13.1.
Connects-to: #623
Change-type: minor
2018-04-09 11:54:55 +01:00
resin-io-versionbot[bot]
0f6f8e5fad v7.2.0 2018-04-04 14:07:30 +00:00
Cameron Diver
f625a1bcb0
Run test suite on CI
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-04-04 14:47:04 +01:00
Lucian Buzzo
9bca2557ea Add mocha to enable unit testing
Implements a simple test for `parseMemoryNumber`

change-type: minor
2018-04-04 13:22:17 +01:00
resin-io-versionbot[bot]
7f4e40b280 v7.1.24 2018-03-29 12:28:53 +00:00
resin-io-versionbot[bot]
b94a19f791 v7.1.23 2018-03-29 11:40:46 +00:00
resin-io-versionbot[bot]
d6d81b7cec v7.1.22 2018-03-29 09:36:03 +00:00
resin-io-versionbot[bot]
fd4ae18468 v7.1.21 2018-03-27 09:30:24 +00:00
resin-io-versionbot[bot]
d1519099f6 v7.1.20 2018-03-22 16:20:29 +00:00
Pablo Carranza Velez
348ff66cee
Replace the gosuper component with a node module that handles communication with systemd, and stop using an init system in the supervisor container
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-22 15:55:15 +00:00
resin-io-versionbot[bot]
822ea1e185 v7.1.19 2018-03-22 14:36:50 +00:00
resin-io-versionbot[bot]
c89174418e v7.1.18 2018-03-19 20:54:55 +00:00
resin-io-versionbot[bot]
11aa504add v7.1.17 2018-03-19 19:55:32 +00:00
resin-io-versionbot[bot]
a5421bd6b4 v7.1.16 2018-03-16 19:02:56 +00:00
resin-io-versionbot[bot]
84e5dbc27d v7.1.15 2018-03-15 17:37:40 +00:00
resin-io-versionbot[bot]
dd15ab5fcc v7.1.14 2018-03-15 02:05:48 +00:00
resin-io-versionbot[bot]
2daadd9544 v7.1.13 2018-03-15 01:24:04 +00:00
resin-io-versionbot[bot]
a6f1d939a8 v7.1.12 2018-03-15 00:25:40 +00:00
resin-io-versionbot[bot]
32880653c1 v7.1.11 2018-03-14 11:54:22 +00:00
resin-io-versionbot[bot]
c01accd208 v7.1.10 2018-03-14 07:28:29 +00:00
resin-io-versionbot[bot]
310cff05a5 v7.1.9 2018-03-13 21:20:41 +00:00
resin-io-versionbot[bot]
a2579a1c9a v7.1.8 2018-03-13 13:59:53 +00:00
resin-io-versionbot[bot]
0f7c9f66dc v7.1.7 2018-03-09 17:41:40 +00:00
resin-io-versionbot[bot]
affdcb1bc8 v7.1.6 2018-03-09 15:19:23 +00:00
resin-io-versionbot[bot]
bda308306d v7.1.5 2018-03-09 14:33:32 +00:00
resin-io-versionbot[bot]
ae2a1acb14 v7.1.4 2018-03-09 08:13:11 +00:00
resin-io-versionbot[bot]
feec2c0267 v7.1.3 2018-03-08 23:05:38 +00:00
resin-io-versionbot[bot]
3c20663979 v7.1.2 2018-03-08 22:23:38 +00:00
resin-io-versionbot[bot]
f12882b3fd v7.1.1 2018-03-08 16:04:16 +00:00
resin-io-versionbot[bot]
1520f7f702 v7.1.0 2018-03-07 15:54:35 +00:00
resin-io-versionbot[bot]
80f06adb0f v7.0.0 2018-03-07 13:23:36 +00:00
Pablo Carranza Velez
8548222a00 Several bugfixes:
* Ensure commit is only reported when update has finished

* Change default delay between actions to 100ms

* Fix envArrayToObject for cases where the env var has an equal sign

* Use shell-quote to properly parse string command and entrypoint

* Fix preloading with a legacy apps.json

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 10:32:28 -08:00
Pablo Carranza Velez
25695aade5 Add support for init, mem_reservation, shm_size, read_only and sysctls.
Also several bugfixes:

* Fix VPN control, logging in deviceConfig, and action executors in proxyvisor

* Fix bug in calculation of dependencies due to fields still using snake_case

* Fix snake_case in a migration, and remove unused lib/migration.coffee

* In healthcheck, count deviceState as healthy when a fetch is in progress (as in the non-multicontainer supervisor)

* Set always as default restart policy

* Fix healthcheck, stop_grace_period and mem_limit

* Lint and reduce some cyclomatic complexities

* Namespace volumes and networks by appId, switch default network name to 'default', fix dependencies in networks and volumes, fix duplicated kill steps, fix fat arrow on provisioning

* Check that supervisor network is okay every time we're applying target state

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 10:32:28 -08:00
Pablo Carranza Velez
b003f48d7b Switch to using knex migrations to set up the database, and change the database format to use integers for ids instead of strings.
Also includes various improvements and bugfixes to services and the migration from legacy /data to volumes.

The switch ti migrations involves a dirty hack for webpack to properly resolve the paths to the migrations js files - it uses an expression
that webpack can't resolve, so we hardcode it to a value and use the ContextReplacementPlugin to make that value resolve to the migrations folder.

The downsides to this approach are:
- a change in knex code would break this
- the migration code is added twice to the supervisor image: once in the migrations folder (because knex needs to loop through the directory to find the files),
and once inside app.js (because I can't make webpack treat them as external)

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 10:32:28 -08:00
Pablo Carranza Velez
5f651c71f7 app.coffee: Switch to the multicontainer supervisor, add missing dependencies, and remove all files that are not used anymore
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 10:32:28 -08:00
resin-io-versionbot[bot]
b0f2335b41 v6.6.9 2018-03-05 19:16:34 +00:00
resin-io-versionbot[bot]
b6fc45b671 v6.6.8 2018-02-27 18:27:22 +00:00
resin-io-versionbot[bot]
590c67333e v6.6.7 2018-02-27 17:11:11 +00:00
resin-io-versionbot[bot]
7b9a87c347 v6.6.6 2018-02-27 01:11:47 +00:00
Akis Kesoglou
76ac7da1d6 Update docker-delta to 2.0.4
This brings in a fix for an edge case where rsync would exit before we had a chance to register event listeners.

Change-Type: patch
2018-02-23 11:26:32 +02:00
resin-io-versionbot[bot]
9bbeea8a72 v6.6.5 2018-02-21 20:54:46 +00:00
resin-io-versionbot[bot]
2361137a98 v6.6.4 2018-02-20 02:20:57 +00:00
resin-io-versionbot[bot]
50e2110ba8 v6.6.3 2018-02-06 00:12:34 +00:00
Akis Kesoglou
dc69917b5a Update resumable-request to v2.0
Turned out that disk I/O can be the bottleneck when applying deltas on some devices. When the disk can’t keep up and consume the downloaded delta, there’s memory bloat due to buffering.

The updated version provides far better reliability when the device is under load and pretty much constant memory consumption with any number of concurrent deltas.

Change-Type: patch
2018-02-05 10:59:56 +02:00
resin-io-versionbot[bot]
bb422b1464 v6.6.2 2018-01-24 19:30:24 +00:00
resin-io-versionbot[bot]
191bc733f9 v6.6.1 2018-01-19 14:47:16 +00:00
resin-io-versionbot[bot]
4b28c11a67 v6.6.0 2018-01-18 22:13:23 +00:00
Pablo Carranza Velez
cff789ebfa Implement an API for proxy and hostname configuration, and centralize management of config.json
Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-01-17 14:05:40 -03:00
resin-io-versionbot[bot]
c11cae4777 v6.5.9 2018-01-12 15:43:08 +00:00
resin-io-versionbot[bot]
2a02938fa4 v6.5.8 2018-01-10 17:51:59 +00:00
Pablo Carranza Velez
a81cf94660 Update docker-toolbelt to v3.2.1 to fix a bug in deltas
The problem was caused by the build picking up 3.2.0 which had a bug, causing an `TypeError: l is not a function`.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-01-10 13:59:50 -03:00
resin-io-versionbot[bot]
2fb86421ab v6.5.7 2018-01-05 15:39:11 +00:00
resin-io-versionbot[bot]
eaaed9a770 v6.5.6 2017-12-15 19:43:58 +00:00
resin-io-versionbot[bot]
688ff1d280 v6.5.5 2017-12-14 21:07:53 +00:00
Pablo Carranza Velez
b2346c61fc Update resin-sync to allow syncing to devices that use balena
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-12-14 05:18:23 -08:00
resin-io-versionbot[bot]
e80c9af3c7 v6.5.4 2017-12-14 11:18:40 +00:00
resin-io-versionbot[bot]
6d74408470 v6.5.3 2017-12-12 10:13:04 +00:00
resin-io-versionbot[bot]
3016ed569e v6.5.2 2017-12-12 08:05:31 +00:00
resin-io-versionbot[bot]
1685eec390 v6.5.1 2017-12-11 20:00:12 +00:00
resin-io-versionbot[bot]
d01fb0514b v6.5.0 2017-12-11 09:07:17 +00:00
resin-io-versionbot[bot]
3d3fdb1792 v6.4.9 2017-12-11 06:17:44 +00:00
resin-io-versionbot[bot]
eef8ee0c33 v6.4.8 2017-12-01 20:35:58 +00:00
resin-io-versionbot[bot]
83b56ab49a v6.4.7 2017-11-20 15:52:03 +00:00
resin-io-versionbot[bot]
2db6437c3a v6.4.6 2017-11-10 17:16:16 +00:00
resin-io-versionbot[bot]
2882b97bcd v6.4.5 2017-11-09 04:13:42 +00:00
Pablo Carranza Velez
88291f08a8 Use uglifyjs-webpack-plugin ^1.0.1 to optimize the supervisor code
We've been using UglifyJS 0.4.6 (the webpack default) so far, but this doesn't support ES6 and some dependency
updates are starting to cause builds to break (e.g. https://github.com/request/request/issues/2772, which also happens to break
my builds in the multicontainer branch).

Here we switch to the latest uglifyjs-webpack-plugin which is designed for ES2015 support.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-11-08 19:03:19 -08:00
resin-io-versionbot[bot]
701a2b7d13 v6.4.4 2017-11-08 17:58:59 +00:00
resin-io-versionbot[bot]
8a2852eda6 v6.4.3 2017-11-03 20:57:09 +00:00
resin-io-versionbot[bot]
a3b5b0370b v6.4.2 2017-11-03 02:31:04 +00:00
resin-io-versionbot[bot]
219dc2874b v6.4.1 2017-11-02 21:44:14 +00:00
resin-io-versionbot[bot]
81fac24c99 v6.4.0 2017-11-01 21:08:51 +00:00
resin-io-versionbot[bot]
087e335467 v6.3.11 2017-11-01 09:33:20 +00:00
Pablo Carranza Velez
20d95ff024 Add whitelist-based filtering to mixpanel events
When sending events to mixpanel, we now use an explicit whitelist for the properties sent with the event, to avoid accidental leakage of any sensitive information.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-10-31 23:22:38 -07:00
resin-io-versionbot[bot]
75034ab1b5 v6.3.10 2017-10-31 21:23:03 +00:00
resin-io-versionbot[bot]
eb6c4fb7c4 v6.3.9 2017-10-30 23:23:50 +00:00
resin-io-versionbot[bot]
be6d44a09b v6.3.8 2017-10-30 21:43:55 +00:00
resin-io-versionbot[bot]
dd485b06f7 v6.3.7 2017-10-25 03:11:32 +00:00
resin-io-versionbot[bot]
a5ee786cde v6.3.6 2017-10-24 05:07:25 +00:00
resin-io-versionbot[bot]
964d0ae737 v6.3.5 2017-10-19 12:03:34 +00:00
Akis Kesoglou
95bd3f1276 Update docker-toolbelt to fix applying deltas on overlay2 with huge images
See https://github.com/resin-io-modules/docker-toolbelt/pull/21 for issue details

Change-Type: patch
2017-10-19 09:11:32 +03:00
resin-io-versionbot[bot]
a8261d12bd v6.3.4 2017-10-17 09:10:49 +00:00
Akis Kesoglou
78f74d757d Delta improvements
- Updates resumable-request to 1.0.1
- Updates docker-progress to 2.0.3
- Removes `DEFAULT_DELTA_APPLY_TIMEOUT`; it’s not needed anymore, docker-delta reliably tracks rsync.
- Properly end the update when applying the delta results in an error.

Change-Type: patch
2017-10-17 10:43:12 +03:00
resin-io-versionbot[bot]
fc3bbce03b v6.3.3 2017-10-17 07:05:14 +00:00
Akis Kesoglou
4b5a1443fe Update docker-progress to improve identification of Balena
Change-Type: patch
2017-10-16 17:46:34 +03:00
resin-io-versionbot[bot]
06b2d09529 v6.3.2 2017-10-11 18:02:42 +00:00
resin-io-versionbot[bot]
ed0a06f974 v6.3.1 2017-10-04 19:25:31 +00:00
Akis Kesoglou
7846a17616 Update docker-progress
The updated version adds more accurate progress reporting when the underlying engine is resin-os/docker (AKA Balaena)

Change-Type: patch
2017-10-04 18:53:44 +03:00
resin-io-versionbot[bot]
79cccb1fe1 v6.3.0 2017-10-03 11:29:17 +00:00
Akis Kesoglou
4744a8957c Update docker-progress
The updated version adds compatibility with resin-os/docker for reporting progress when pulling images.

Change-Type: minor
2017-10-03 12:27:39 +03:00
resin-io-versionbot[bot]
62140b1a38 v6.2.9 2017-09-15 19:50:10 +00:00
resin-io-versionbot[bot]
a2bdfdbed3 v6.2.8 2017-09-12 01:34:50 +00:00
resin-io-versionbot[bot]
2924a05be3 v6.2.7 2017-09-01 23:57:38 +00:00
resin-io-versionbot[bot]
507506920a v6.2.6 2017-08-29 19:56:51 +00:00
Pablo Carranza Velez
9cc2e47e70 Add a sync.js script to allow syncing a running supervisor container on a local device
This handy tool uses the resin-sync module to rsync javascript changes into the running container
on a device in the local network. It allows rapid iterations when testing the supervisor on a real device.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-29 08:24:46 -07:00
resin-io-versionbot[bot]
3ed7687bf2 v6.2.5 2017-08-28 22:02:50 +00:00
resin-io-versionbot[bot]
3211d170ca v6.2.4 2017-08-28 20:04:36 +00:00