We also remove the Makefile to go to a simpler build system, as long with
the retry_docker_push.sh file. We remove the rest of the automation tools
as they're no longer used and update the circle.yml file.
We also remove debug builds, as these aren't needed moving forward, and were
only to enable livepush builds.
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
We do this by using the standalone installer pinned at v6.9.0. We use
the standalone installer because npm itself fails to upgrade on the
i386-nlp build (npm v3). The standalone installer is installed in /tmp,
and then to avoid mysterious CI errors, we use the original npm to run
the tests.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
Jessie recently had the jessie-updates repos dropped. We upgrade to
stretch to avoid a 404 on update (and to update things anyway).
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This reverts commit 338ba4cdd7.
This is to unblock the release of the supervisor version, pending the
fix of the introduction of the race condition currently affecting v2
deltas.
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This requires the initialisation of both DBus and
Avahi in the `entry.sh` script to allow resolution
via libc.
Due to issues with Avahi's `init.d` script, the previous
PIDfile is explicitly removed.
Connects-to: #712
Change-type: minor
Signed-off-by: Heds Simons <heds@resin.io>
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>
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>
This should help avoid having to run the npm install for devDependencies (which are actually most of the modules)
every time there's a change in the code.
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
We add an endpoint to the supervisor API that checks the following conditions to determine whether the supervisor is healthy:
* That the update cycle has run fully, in a time that's less than twice the poll interval. Unless we're downloading an image, in which case
we assume it's healthy (otherwise we'd get into the issue of determining a reasonable timeout for the image download, which is already done in a configurable way with delta options and the like).
* That the current state report to the Resin API hasn't failed more than 3 times. Unless the device has no connectivity, or the connectivity check is disabled, in which case we don't know
if the report failed simply because there's no network.
* That the gosuper component is working (since we periodically hit its API to get the IP addresses, we mark it as not working if this API call fails).
We need this endpoint to be unauthenticated for the docker daemon to be able to hit it (though, as the rest of the API, it is protected with iptables rules).
Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
It seems that the ARG ARCH causes a cache miss in the next RUN statement (for some reason our use of cache-from in the other stages of the build works better, but here it always causes a miss).
We move the ARG statement to later in the Dockerfile, just before actually using it. Hopefully this will improve caching for most supervisor builds.
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
JSONStream is a hybrid executable-library that doesn't get along well with webpack: it tries to run its binary code
which can throw uncaught exceptions. So we use a custom loader for it - which replaces remove-hashbang-loader, as it only
affected JSONStream too.
(I tried replacing JSONStream altogether, but turns out dockerode uses it too)
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
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>
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>