Commit Graph

398 Commits

Author SHA1 Message Date
Pagan Gazzard
b63e7fd595 Accept the pattern as an argument for the blink module. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
cd2603f228 Change the blink pattern to use a pattern specified by an object. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
c218adb09e Separate the blinking out, ready to move to a separate module. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
1c46e1e2a4 Separate the network polling out, ready to move to a separate module. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
e67de4b279 Simplify the state checking logic. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
49d6e3142c Use a 10s timeout for the connectivity check to make the internet connectivity check more responsive. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
bf0b38354f Use a repeating blink pattern that starts on the first failed internet check, and is consistent until we get internet again.
Previously it would pause whilst waiting for the next check (potentially a very very long time, as request doesn't have a timeout by default)
2015-10-13 13:27:59 -03:00
Pagan Gazzard
5e380fb66a Turn the connectivity check into a singleton, so we only have one running. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
2557ebcfc2 Move the connectivity check into utils. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
63f1d66402 Fix trying to delete supervisor images. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
b1b039cdd1 Check if the container is running, and if not then print a meaningful error message. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
58b9040a36 Use read -p to wait for enter. 2015-10-13 13:27:59 -03:00
Aleksis Brezas
32e1712df7 register device fallback fix 2015-10-13 13:27:59 -03:00
Pagan Gazzard
53196208b0 Start the connectivity check straight away, rather than waiting for bootstrapping to succeed. 2015-10-13 13:27:59 -03:00
Aleksis Brezas
460768d366 do not override dockerfile cmd 2015-10-13 13:27:59 -03:00
Pagan Gazzard
fcc6d1375d Fix the default device type. 2015-10-13 13:27:59 -03:00
Pagan Gazzard
b9675de9e0 Change IP address update interval from 5m to 30s 2015-10-13 13:27:58 -03:00
Petros Angelatos
7ffb65d3fa Expose host dbus to containers. This enables control of host connman 2015-10-13 13:27:58 -03:00
Aleksis Brezas
433f0920c8 remove exited supervisors 2015-10-13 13:27:58 -03:00
Aleksis Brezas
86c2e1280e delete exited containers 2015-10-13 13:27:58 -03:00
Pagan Gazzard
f5f6ee3a61 Enable compression for all of our custom requests. 2015-10-13 13:27:58 -03:00
Pagan Gazzard
7f5052f274 Update resin-platform-api to v0.2.7
* now correctly returns rejected promises for non-2xx responses
* now defaults compression to on
2015-10-13 13:27:58 -03:00
Pagan Gazzard
26c8b140ce Only get the device id once, rather than for every request to updateDeviceInfo 2015-10-13 13:27:58 -03:00
Pagan Gazzard
6a50889086 Only select the fields we need to compare/update apps. 2015-10-13 13:27:58 -03:00
Pagan Gazzard
de6de9d397 Select just the id as it's all we need, and reduces network traffic. 2015-10-13 13:27:58 -03:00
Aleksis Brezas
e6e42d6631 improved getregistryandname 2015-10-13 13:27:58 -03:00
Aleksis Brezas
4185fb56c8 comment docker utility functions 2015-10-13 13:27:58 -03:00
Aleksis Brezas
a5ee91ceaf calculate progress in a transform stream and expose a callback for progress events 2015-10-13 13:27:58 -03:00
Aleksis Brezas
6b496693ad download progress bars 2015-10-13 13:27:58 -03:00
Aleksis Brezas
cdca01eed1 Use require to parse package.json for supervisor version 2015-10-13 13:27:58 -03:00
Aleksis Brezas
523a8b5637 update device supervisor_version 2015-10-13 13:27:58 -03:00
Pagan Gazzard
567784b3e9 Default to using a cache dir in ~/cache/resin-supervisor whilst building - when building without a cache volume we get the cache included in the image as well! :( 2015-10-13 13:27:58 -03:00
Pagan Gazzard
3b2b75998e Tell startNewSupervisor which image to start, we need to start the working image on a restart, and the new (possibly broken) image on update. 2015-10-13 13:27:58 -03:00
Pagan Gazzard
271719708c Update resin-platform-api to v0.2.5
This fixes a load of `Cannot read property 'd' of undefined` errors I had whilst staging was down for update.
2015-10-13 13:27:57 -03:00
Pagan Gazzard
c8a7c49cd5 Move the application update poll interval to an env var and reduce to 60s. 2015-10-13 13:27:57 -03:00
Pagan Gazzard
c7c1c45f38 Deal with int env vars more nicely (actually parse them and check they're valid ints) 2015-10-13 13:27:57 -03:00
Praneeth Bodduluri
10012a48cf Enforce a TLS check while connecting to the server - Prevents MITM 2015-10-13 13:27:57 -03:00
Pagan Gazzard
ffc05f9d84 Use .constructor.prototype for promisifying instead of __proto__. 2015-10-13 13:27:57 -03:00
Pagan Gazzard
00d725cfac Move the cleanupContainersAndImages code into the docker utils, and make use of a count of currently fetching images to only clean up images if we aren't fetching any. 2015-10-13 13:27:57 -03:00
Pagan Gazzard
07a4df1d05 Share the code for fetching an image. 2015-10-13 13:27:57 -03:00
Pagan Gazzard
67c9db9fce Move the docker promisification/creation to a util lib. 2015-10-13 13:27:57 -03:00
Pagan Gazzard
73c62cb5be Make sure the responses are at least non-empty, otherwise we're going to get into a broken vpn situation. 2015-10-13 13:27:57 -03:00
Pagan Gazzard
4c257c8e7d Log the body of the sign_certificate response, it'd be very useful for debugging. 2015-10-13 13:27:57 -03:00
Praneeth Bodduluri
ba7dd0f3dd Remove un-required ifneq 2015-10-13 13:27:57 -03:00
Praneeth Bodduluri
f57a0ba055 Fetch the buildstep and accelerator - only if needed 2015-10-13 13:27:57 -03:00
Praneeth Bodduluri
aad16c8a25 Replace ||true with Makefile ignores 2015-10-13 13:27:57 -03:00
Praneeth Bodduluri
b8c57312a4 Remove non-existent commands from .PHONY 2015-10-13 13:27:57 -03:00
Praneeth Bodduluri
b80861f2ed Use Dockerfile instead of the tmp 2015-10-13 13:27:57 -03:00
Praneeth Bodduluri
dba752f6b3 Use ARCH= to define the architecture to build. Embedd version into builds 2015-10-13 13:27:57 -03:00
Praneeth Bodduluri
f13d25ba85 Cleanup Makefile for using the currently used deployment repos as sources 2015-10-13 13:27:57 -03:00