Pagan Gazzard
b1d16da9fa
Separate out the pubnub logging functionality.
2015-10-13 13:29:40 -03:00
Pagan Gazzard
9673ae40d9
Remove some unneeded dependencies.
2015-10-13 13:28:00 -03:00
Pagan Gazzard
c5506d4566
Separate vpn connecting.
2015-10-13 13:28:00 -03:00
Pagan Gazzard
a7f5689873
Separate vpn bootstrapping.
2015-10-13 13:28:00 -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
53196208b0
Start the connectivity check straight away, rather than waiting for bootstrapping to succeed.
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
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
c8a7c49cd5
Move the application update poll interval to an env var and reduce to 60s.
2015-10-13 13:27:57 -03:00
Aleksis Brezas
c4f9fd853d
require config is needed to retry bootstrap
2015-10-13 13:27:56 -03:00
Pagan Gazzard
7f38248cfa
Let the new supervisor handle tagging itself as a working supervisor, this means that the check that a supervisor update is a working update will not be nullified by a reboot.
2015-10-13 13:19:45 -03:00
Pagan Gazzard
5efcde7922
Start the supervisor update check ASAP, it allows us to push (and automatically update to) new supervisor images that fix issues in earlier stages.
2015-10-13 13:19:44 -03:00
Pagan Gazzard
5bb552f065
Make mixpanelTrack nicely handle errors being passed in and use it for logging bootstrapping errors.
2015-10-13 13:19:44 -03:00
Pagan Gazzard
f43afd4a95
Retry the bootstrap process if it fails - this means that we remove a point of failure (the previous connectivity check barrier merely reduced the chance of hitting that failure point)
2015-10-13 13:19:44 -03:00
Lorenzo Stoakes
f39b51885d
Syntax cleanup pass.
2015-10-13 13:10:12 -03:00
Aleksis Brezas
aab2a3b3d3
missing require
2015-10-13 13:10:12 -03:00
Aleksis Brezas
69e2af5aa1
wait for an ok from next supervisor before exit
2015-10-13 13:10:11 -03:00
Praneeth Bodduluri
b790e4e304
Blink interval of 200ms was too slow to be seen - reverting to 400ms used in api.coffee
2015-10-13 13:10:11 -03:00
Praneeth Bodduluri
e7216618ad
Make Blinkable LED configurable + Move blink to utils + Check connectivity before bootstrap + Blink LED on loss of connection
2015-10-13 13:10:11 -03:00
Pagan Gazzard
d07c6abe99
Store and make use of container ids.
...
This stores the container id for an app when creating that app, using it when it is necessary to stop/remove the app and when attempting to start it again (rather than creating a new container each time, eg restarting the pi does not create a new container any more)
2015-10-13 13:10:11 -03:00
Pagan Gazzard
a47022a0b4
Report the host ip address to the API on startup and every 5mins after.
2015-10-13 13:06:43 -03:00
Petros Angelatos
3e1dd1f922
Log every mixpanel event and remove redundant logs
2015-10-13 13:06:42 -03:00
Petros Angelatos
1501cf3122
Integrate mixpanel
2015-10-13 13:06:42 -03:00
Page
4cfcd39524
Enable periodic update checks, and add logic to only switch to the new image if it is different.
2015-10-13 13:06:42 -03:00
Petros Angelatos
3c4318893a
Remove unused version
variable
2015-10-13 13:03:16 -03:00
Petros Angelatos
98870dcd16
Generate random UUID
...
Generate a random UUID when the device bootstraps instead of
deterministically calculating one from the CPU serial number. This means
that a specific device can be used with many applications and users
without problem.
2015-10-13 13:03:16 -03:00
Petros Angelatos
2b054123fe
Remove unused crypto module
2015-10-13 13:03:16 -03:00
Page
97d2771826
Change automatic update check to every 5 mins instead of 15.
2015-10-13 13:03:15 -03:00
Page
791cbda490
Fix typo.
2015-10-13 13:03:15 -03:00
Vasilis Souleles
10451fd27d
added getSupevisorVersion
2015-10-13 13:03:15 -03:00
Petros Angelatos
c7ce76c436
Use /data instead of /supervisor/data
2015-10-13 13:01:25 -03:00
Page
bc0d981610
Use an app object throughout, rather than relying upon just the imageId, this is very useful for adding extra properties to the app when starting/etc (eg env vars/ports/etc)
2015-10-13 12:58:58 -03:00
Page
b65e3fd3f9
Remove some more unnecessary parens.
2015-10-13 12:58:57 -03:00
Petros Aggelatos
3aed83fe04
Removed unsed variables
2015-10-13 12:58:57 -03:00
Petros Aggelatos
637d68921f
Application management code in its own module
2015-10-13 12:58:56 -03:00
Petros Aggelatos
614b24c796
Fix output format of VPN logs
2015-10-13 12:58:56 -03:00
Petros Aggelatos
12b3e194b5
Run application when supervisor starts
2015-10-13 12:58:56 -03:00
Petros Aggelatos
a8846b37b6
Minor log change
2015-10-13 12:58:56 -03:00
Petros Aggelatos
c98a274bde
Fixed syntax errors
2015-10-13 12:58:55 -03:00
Petros Aggelatos
309da94028
OCD
2015-10-13 12:58:55 -03:00
Petros Aggelatos
de342a9209
Revamp/rewrite of supervisor as a docker application
2015-10-13 12:58:55 -03:00