Commit Graph

1275 Commits

Author SHA1 Message Date
Pablo Carranza Velez
0078c299b4 dind: Set DELTA_ENDPOINT, insert variant into os-release, and fix vpn apikeys
Setting DELTA_ENDPOINT as meta-resin does allows the dev dind supervisor to use the correct
delta server.

Inserting a VARIANT_ID into /etc/os-release allows treating this device as a dev build of Resin OS
(and avoids an unhandled exception).

Changing the precedence for device/provisioning apikeys in the vpn-init script allows the device
to connect to the VPN when a key exchange is still pending (as meta-resin does - though this is getting
replaced by watching config.json for changes).

This at least makes the development supervisor functional for now, but I'll work on improving the dind setup soon.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 22:59:02 -07:00
resin-io-versionbot[bot]
a6409f0e12 Auto-merge for PR #463 via VersionBot
Allow registering the deviceApiKey in a non-compatible OS by making the apiKey equal the deviceApiKey, and add an fsync to all config.json writes
2017-07-01 03:27:15 +00:00
resin-io-versionbot[bot]
28f1d29d64 v5.0.1 2017-07-01 03:01:26 +00:00
Pablo Carranza Velez
928df5b140 Allow registering the deviceApiKey in a non-compatible OS by making the apiKey equal the deviceApiKey, and add an fsync to all config.json writes
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 18:00:01 -07:00
resin-io-versionbot[bot]
c5315dafaf Auto-merge for PR #448 via VersionBot
Remove the undocumented and unused sideload and compose APIs
2017-06-26 22:56:54 +00:00
resin-io-versionbot[bot]
2097c5cc85 v5.0.0 2017-06-26 22:26:16 +00:00
Pablo Carranza Velez
597a2c6b65 Remove the undocumented and unused sideload and compose APIs
This allows us to also remove a few npm dependencies and the docker compose binary.

Change-Type: major
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-26 13:08:52 -07:00
resin-io-versionbot[bot]
4c30d0791f Auto-merge for PR #455 via VersionBot
Update docker-delta to 1.0.3 to support docker 17
2017-06-26 18:56:18 +00:00
resin-io-versionbot[bot]
e487ca4d51 v4.5.0 2017-06-26 17:20:31 +00:00
Pablo Carranza Velez
536ef458c9 Update docker-delta to 1.0.3 to support docker 17
Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-26 07:54:43 -07:00
resin-io-versionbot[bot]
a9e777727c Auto-merge for PR #458 via VersionBot
Fix provisioning key exchange by passing apikey in the request
2017-06-26 14:32:58 +00:00
resin-io-versionbot[bot]
0829260c17 v4.4.2 2017-06-26 14:05:37 +00:00
Pablo Carranza Velez
18ca98a2ae Fix provisioning key exchange by passing apikey in the request
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-26 07:04:43 -07:00
resin-io-versionbot[bot]
8f6c53a175 Auto-merge for PR #456 via VersionBot
Make cleanup in jenkins build less aggressive, but remove all created tags
2017-06-24 01:58:55 +00:00
resin-io-versionbot[bot]
bd997b4ea6 v4.4.1 2017-06-24 01:24:14 +00:00
Pablo Carranza Velez
829284e83a Make cleanup in jenkins build less aggressive, but remove all created tags
We've been deleting images by id and forcing removal, which might not play
nicely with other processes using images with shared parents. Now we don't force removal
and remove by tag and not by id, which should play more nicely with others. We also ensure
all the tags we use/create are removed so that images are actually deleted if not used.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-21 17:22:28 -07:00
resin-io-versionbot[bot]
f16c5d5e92 Auto-merge for PR #453 via VersionBot
When apiEndpoint is not defined, work in offline mode (plus fix mixpanel init)
2017-06-15 05:32:59 +00:00
resin-io-versionbot[bot]
a5d6df6284 v4.4.0 2017-06-15 05:05:06 +00:00
Pablo Carranza Velez
00b53bd03e When apiEndpoint is not defined, work in offline mode
The supervisor uses an `API_ENDPOINT` environment variable to define what API to register to. Up to now this has been defaulted to `https://api.resin.io`.
(In Resin OS devices this environment variable ultimately comes from config.json).
This commit changes the behavior so that an empty value of that environment variable causes the supervisor to work in "offline mode", i.e. not connected to a remote server.
Basically only preloaded apps and the supervisor API work in this mode.

The config.json `supervisorOfflineMode` field still works for backwards compatibility, but we'll treat it as deprecated and it should be removed eventually.

Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-14 12:57:47 -07:00
Pablo Carranza Velez
1e7bdad7a9 Fix mixpanel initialization when not in offline mode
The logic to disable mixpanel initialization in offline mode was inverted :S causing mixpanel
to *only* be initialized when in offline mode.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-14 12:48:29 -07:00
resin-io-versionbot[bot]
169c28fc03 Auto-merge for PR #445 via VersionBot
Update dependent device DB
2017-06-14 09:42:14 +00:00
resin-io-versionbot[bot]
d6d51678a3 v4.3.2 2017-06-14 09:09:14 +00:00
Joe Roberts
d4e3e45e52
Dependent device DB migrations 2017-06-14 09:27:47 +01:00
Joe Roberts
786874dbb6
Update dependent device DB
Change-type: patch
2017-06-14 09:27:47 +01:00
resin-io-versionbot[bot]
8da7bbb783 Auto-merge for PR #452 via VersionBot
Enable SSL when connecting to pubnub
2017-06-13 17:30:14 +00:00
resin-io-versionbot[bot]
efa9c41917 v4.3.1 2017-06-13 16:26:13 +00:00
Petros Angelatos
171460041f
enable SSL when connecting to pubnub
Fixes #451

Connected-to: pubnub/javascript#89
Change-Type: patch
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2017-06-13 19:13:09 +03:00
resin-io-versionbot[bot]
2b699851d4 Auto-merge for PR #447 via VersionBot
Switch to generating the BASE_IMAGE_VERSION in the makefile, so that the makefile targets can use an accurate version by default
2017-06-06 17:52:41 +00:00
resin-io-versionbot[bot]
085793b4d3 v4.3.0 2017-06-05 23:48:38 +00:00
Pagan Gazzard
a3649fa6ec Switch to generating the BASE_IMAGE_VERSION in the makefile, so that the makefile targets can use an accurate version by default
Fixes #422

Change-type: minor
2017-06-05 16:03:50 -07:00
resin-io-versionbot[bot]
17e51f9153 Auto-merge for PR #434 via VersionBot
Fix typo in how hostOSVersionPath was camel-cased
2017-05-12 22:58:10 +00:00
resin-io-versionbot[bot]
e26bf361d3 v4.2.4 2017-05-12 22:26:44 +00:00
Pablo Carranza Velez
08c5413413 Fix typo in how hostOSVersionPath was camel-cased
This was properly done in the recently added changes in bootstrap.coffee,
but all other references where using "Os" instead of "OS.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-05-11 13:06:38 -07:00
resin-io-versionbot[bot]
f04ace4ae1 Auto-merge for PR 433 via VersionBot
Properly handle errors when requesting deltas
2017-05-11 19:40:15 +00:00
resin-io-versionbot[bot]
cefd18c4b8 v4.2.3 2017-05-11 19:18:00 +00:00
Pablo Carranza Velez
cb0152c5ea Properly handle errors when requesting deltas
When requesting a delta, a `Promise.join` promise chain was producing unhandled
errors since it consisted in a separate promise chain from the parent function which,
was created with `new Promise`. This commit fixes this by creating the new Promise only
when it's needed, avoiding the creation of a separate promise chain.

Closes #432
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-05-08 15:05:42 -07:00
Page-
82dce6186d Merge pull request #428 from resin-io/dind-aufs-tools
Add aufs-tools to the dind supervisor for use when running on aufs
2017-04-28 00:35:59 -07:00
Pagan Gazzard
67b022e434 Add aufs-tools to the dind supervisor for use when running on aufs
Change-Type: patch
2017-04-27 23:43:46 -07:00
Pablo Carranza Velez
0799fc1173 4.2.2
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-04-27 21:19:36 -07:00
Pablo Carranza Vélez
ac2531368c Merge pull request #427 from resin-io/dont-update-deviceconfig-if-unchanged
Avoid writing target device config to DB if it hasn't changed
2017-04-27 21:18:38 -07:00
Pablo Carranza Vélez
00dc9e8654 Merge pull request #431 from resin-io/only-delete-apikey-if-os-supports-it
Only delete the provisioning key if the supervisor is running on an OS that supports using the deviceApiKey
2017-04-27 21:17:53 -07:00
Pablo Carranza Velez
c251de1cd3 Only delete the provisioning key if the supervisor is running on an OS that supports using the deviceApiKey
This avoids problems when updating the supervisor on an older OS, where the VPN and other
host services still require config.json to have an apiKey field to authenticate.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-04-27 13:31:25 -07:00
Pablo Carranza Velez
e36fa601ad Avoid writing target device config to DB if it hasn't changed
This helps avoid unnecessary writes to the DB which may cause disk wearout.

We also change the error message in this section to show that the error might have happened
when fetching the device config as much as when setting it.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-04-27 09:42:41 -07:00
Pagan Gazzard
8a1d17a697 4.2.1 2017-04-26 15:14:39 -07:00
Page-
111d32f94f Merge pull request #430 from resin-io/device-key-fixes
Device key fixes
2017-04-26 15:10:41 -07:00
Pagan Gazzard
42cd3a6b01 Fix an infinite loop that could happen when trying to bootstrap if the key exchange fails
Change-Type: patch
2017-04-26 13:54:15 -07:00
Pagan Gazzard
89ccb6480d Fix the case of being registered with a version of the cli/sdk that does not support device api keys.
Change-Type: patch
2017-04-26 13:52:43 -07:00
Pagan Gazzard
6a7ff91180 4.2.0 2017-04-24 12:59:38 -07:00
Page-
26fb0b4f64 Merge pull request #424 from resin-io/improve-key-exchange
Improve key exchange by first checking if an existing device api key is valid.
2017-04-24 12:42:51 -07:00
Pagan Gazzard
d31ee452d0 Deduplicate the device fetching logic 2017-04-24 12:09:50 -07:00