Commit Graph

1333 Commits

Author SHA1 Message Date
resin-io-versionbot[bot]
4d2c381e23 v6.1.3 2017-08-03 20:45:06 +00:00
Pablo Carranza Velez
6f87b1db18 Avoid starting apps on startup if device has to reboot due to a configuration change
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-02 20:07:13 -03:00
resin-io-versionbot[bot]
bb6652c52d Auto-merge for PR #472 via VersionBot
When the device is about to reboot or shutdown, close the API server and avoid applying updates
2017-07-28 00:35:58 +00:00
resin-io-versionbot[bot]
fdc7d49e18 v6.1.2 2017-07-27 23:59:50 +00:00
Pablo Carranza Velez
42ac7487e7 When the device is about to reboot or shutdown, close the API server and avoid applying updates
We mark when the device is rebooting and avoid some steps in the update cycle that change the device
state, similarly to when the device is in local mode, to avoid problems with non-atomic operations.
This doesn't solve *all* the potential scenarios of a reboot happening in the middle of an update, but at least
should prevent the case where we start an app container and reboot the device before saving the containerId, potentially
causing a duplicated container issue.

We also correct the API docs to reflect the 202 response when reboot or shutdown are successful.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 20:07:24 -03:00
resin-io-versionbot[bot]
bfc28a0ed4 Auto-merge for PR #469 via VersionBot
Some fixes for offline mode: don't persist uuid, and avoid an error with the missing apiEndpoint
2017-07-27 18:45:32 +00:00
resin-io-versionbot[bot]
902e31f1c0 v6.1.1 2017-07-27 18:07:56 +00:00
Pablo Carranza Velez
55ad977ede Avoid unhandled errors when in offline mode due to a missing apiEndpoint
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 12:46:14 -03:00
Pablo Carranza Velez
f0344ca4be Do not persist the uuid when in offline mode, so that the supervisor tries to provision if it goes out of offline mode
We used to store the uuid which would cause the supervisor to not attempt a provisioning even if offline mode
was turned off. This was to avoid preloaded apps being reloaded constantly leaving multiple containers.

We now avoid persisting the uuid, so that when the supervisor goes out of offline mode it can provision
without the need to wipe out the db. We avoid the problem with preloaded apps by not loading them
if there's apps already stored on the db.

(In the future, apps in the db will only represent target state and we can make preloaded apps be reloaded on every
start, but for now we can't do it as long as we store the containerId on the db - deleting an app on the db
means losing track of its containerId and therefore leaving an orphaned container)

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 12:46:14 -03:00
resin-io-versionbot[bot]
3ba7641d17 Auto-merge for PR #477 via VersionBot
Update docker-delta to 1.1.1, docker-toolbelt to 3.0.1, docker-progress to 2.6.0 to add support for deltas and overlay2
2017-07-27 15:20:35 +00:00
resin-io-versionbot[bot]
0f491c1a98 v6.1.0 2017-07-27 14:45:11 +00:00
Pablo Carranza Velez
7aedd7062d Update docker-delta to 1.1.1, docker-toolbelt to 3.0.1, docker-progress to 2.6.0 to add support for deltas and overlay2
This makes the Async suffix for docker functions unnecessary. It also allows us to remove dockerode as an
explicit dependency.

Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 01:48:35 -03:00
resin-io-versionbot[bot]
e5cac89f1b Auto-merge for PR #479 via VersionBot
Fix preloading and parsing of arguments in the dind supervisor
2017-07-27 04:44:44 +00:00
resin-io-versionbot[bot]
6978465ca8 v6.0.5 2017-07-27 04:06:14 +00:00
Pablo Carranza Velez
f5f8ca6df2 Allow building the supervisor source without optimizations for easier debugging with dindctl
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-26 20:30:51 -03:00
Pablo Carranza Velez
babee8667e Pull the supervisor image if it's not available when running with dindctl
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-26 20:30:51 -03:00
Pablo Carranza Velez
3771fd53ea Fix preloading and parsing of arguments in the dind supervisor
We now remove the quotes from the image name in the ExecStartPre of the supervisor dind service,
so that the images are properly pulled.

We also fix the parsing of arguments in dindctl so that it correctly parses all of the arguments (the last one was being missed if it didn't have a parameter).

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-26 20:30:51 -03:00
resin-io-versionbot[bot]
8e1a38d610 Auto-merge for PR #478 via VersionBot
Fix the message shown when docker gives a 500 error when starting a container
2017-07-26 20:02:44 +00:00
resin-io-versionbot[bot]
097262878d v6.0.4 2017-07-26 18:47:54 +00:00
Pablo Carranza Velez
279ab60233 Fix the message shown when docker gives a 500 error when starting a container
The test for an exec format error caused a `err.json.trim` is not a function
error so the message shown didn't relate to what the problem actually was.
This makes the test for the exec format error safer.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-26 10:41:25 -03:00
resin-io-versionbot[bot]
49d149a196 Auto-merge for PR #476 via VersionBot
Use a pinned build of the debian image to build base and gosuper, to avoid unnecessary rebuilds
2017-07-25 20:46:34 +00:00
resin-io-versionbot[bot]
b6742851f2 v6.0.3 2017-07-25 20:09:26 +00:00
Pablo Carranza Velez
7746d6be99 Use a pinned build of the debian image to build base and gosuper, to avoid unnecessary rebuilds
Up to now, a new debian:jessie build would invalidate the cache for the base and gosuper images, slowing down Circle builds.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-25 10:52:40 -03:00
resin-io-versionbot[bot]
654e6ce929 Auto-merge for PR #470 via VersionBot
Refactor build process and switch to CircleCI
2017-07-25 00:45:06 +00:00
resin-io-versionbot[bot]
7ee2d48706 v6.0.2 2017-07-24 20:03:30 +00:00
Pablo Carranza Velez
b328a1e916 Make the ARCH-supervisor-base image builder smaller by not keeping the downloads, sstate and build directories
We should revisit this if we want to later copy those folders into the host and use Circle's caching system with them, or if https://github.com/moby/moby/issues/32507 gets implemented in which case we can use a bind mounted folder instead.

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
d9605c71dd automation/build.sh: build base, nodesuper and gosuper before supervisor, and use them for cache
Otherwise the step where we build them doesn't reuse what was built when building the supervisor,
because we're explicitly setting `--cache-from` options.

We also push the images as soon as they're built.

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
d7f7a0bf57 Disable armel builds, and make the automation build without using docker-in-docker
Changelog-Entry: Disable armel builds
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
fa8116d97c Disable pushing to registry.resinstaging.io, and use build environment to login to dockerhub
Also, avoid building the dind builder twice, and try to get a reusable docker instance.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
8dfc559126 Move dindctl to the base of the repository
This makes it easier to use, as it's meant to be used constantly when developing. No need to change PATH
or type `./tools/dev/dindctl`, just run `./dindctl` now.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
29de3ceeb2 Add a script to automate the creation of meta-resin PRs
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
60a8ab85f4 Add a deploy-to-resin.js and automatically deploy to the Resin API on master builds
Also, make all of the arch builds part of the Circle workflow.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
392d963348 Use a local supervisor image for the dind supervisor
We change the Makefile and dinctl so that instead of having to deploy and then pull a supervisor image, we save it from the local
docker images and load it inside the dind container.

We also fix dind so that it uses the dind hack script from the docker repo as official dind images do (this avoids breaking the
permissions of /dev/pts/ptmx in the host as in https://github.com/kubernetes/kubernetes/issues/18230).

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
5bfeccccef Add builds for all architectures, and actually push the built images
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
e28e770fd7 Replace the Jenkins build with a CircleCI build that uses the new multi-stage build
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
da04b3065c Make dindctl an easier to use tool that takes options instead of using env vars
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
012b23f012 Refactor the makefile to make it easier to use and make use of the multi-stage build
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
8d84facff5 Add a single Dockerfile to build the supervisor as a multi-stage build
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
resin-io-versionbot[bot]
d0251a5cd3 Auto-merge for PR #464 via VersionBot
Use webpack to join all modules
2017-07-12 04:58:12 +00:00
resin-io-versionbot[bot]
2594ffee08 v6.0.1 2017-07-12 03:06:42 +00:00
Pablo Carranza Velez
1790939046 Use webpack to join all modules
This saves around 13MB in the resulting uncompressed docker image.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-11 14:01:16 -07:00
resin-io-versionbot[bot]
c84a269947 Auto-merge for PR #467 via VersionBot
Replace edge device type with generic-amd64
2017-07-07 18:37:25 +00:00
resin-io-versionbot[bot]
9b72451b4c v6.0.0 2017-07-07 18:03:13 +00:00
Joe Roberts
087e7c3af0
Deprecate edge device type
Change-type: major
2017-07-05 10:20:26 +01:00
resin-io-versionbot[bot]
95c78155c9 Auto-merge for PR #468 via VersionBot
Fix semver comparison for OS version when determining if the device has deviceApiKey support
2017-07-04 19:18:38 +00:00
resin-io-versionbot[bot]
933515db79 v5.1.1 2017-07-04 18:33:42 +00:00
Pablo Carranza Velez
8b2138f744 Fix semver comparison for OS version when determining if the device has deviceApiKey support
The current setup would cause the check to always fail - the consequence is not *that* bad since
the provisioning key still gets overwritten, but it's better to delete it if we can.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-04 02:56:31 -07:00
resin-io-versionbot[bot]
c9b42b83b4 Auto-merge for PR #446 via VersionBot
Add support for aarch64
2017-07-01 10:48:35 +00:00
resin-io-versionbot[bot]
14e31857e3 v5.1.0 2017-07-01 08:47:33 +00:00
Pablo Carranza Velez
1dfa8b4448 Correct the DBUS_SYSTEM_BUS_ADDRESS variable to what godbus expects now
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 23:46:17 -07:00