Pablo Carranza Velez
10350c3d4a
Remove volumes when removing a container
2015-11-25 15:00:45 -08:00
Pablo Carranza Vélez
cbb3e2f461
Improve the update strategies:
...
* On handover, fetch old app from DB before starting the new app (and overwriting the DB record)
* Tidy up the logging
* Fix waitToKill so that it actually works
* Several other fixups
2015-11-23 10:02:19 -08:00
Pablo Carranza Vélez
1d6811a423
Implement waitToKill, keep RESIN_OVERRIDE_LOCK, and changelog for update strategies
2015-11-16 19:03:37 +00:00
Pablo Carranza Vélez
13dce75a21
Implement several update strategies
...
* Break up the update function into manageable parts
* Refactor the special variables into the RESIN_SUPERVISOR_ namespace
* Use three update strategies: normal, kill before download, hand over
TO-DO: implement waitToKill in the hand over case.
2015-11-16 19:03:36 +00:00
Praneeth Bodduluri
51ee79b7a2
Fix the error that comes up when no ip addresses are returned by gosuper
2015-11-12 20:33:18 +05:30
Pagan Gazzard
16a9cfa365
Switch to docker-progress for pull progress.
2015-11-10 17:29:22 +00:00
Praneeth Bodduluri
6bc92b4276
Fix semvar versioning in tcp-ping endpoint
2015-11-09 19:50:49 +05:30
Pablo Carranza Vélez
0605a9f4ee
Use generic config.forceSecret[name] and allow forcing logsChannel
2015-11-03 13:49:24 -03:00
Pablo Carranza Vélez
b08a028d69
Use random secret for logs channel
2015-10-28 20:02:00 -03:00
Pablo Carranza Vélez
811e929955
Don't bind mount docker.sock. It doesn't exist on devices that use rce
2015-10-16 13:56:06 +00:00
Pablo Carranza Vélez
ee273f1ec7
Expose a RESIN_SUPERVISOR_VERSION env var to app
2015-10-15 23:08:21 +00:00
Pablo Carranza Vélez
4bcba5adf6
Refactor to use a different name for the env vars (otherwise resin-vars overrides it with a null value)
2015-10-14 18:50:26 -03:00
Pablo Carranza Vélez
33d402c3c0
Default PubNub and Mixpanel keys are now passed at build time
2015-10-14 16:53:33 -03:00
Pablo Carranza Vélez
7eb17bd79b
Don't let the bootstrap delete apiSecret from DB
2015-10-13 13:45:08 -03:00
Pablo Carranza Vélez
b57dd10e81
Add API endpoint to expire and create new API key
2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
4130df7771
Add Changelog and switch to using RESIN variables
2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
96d4aebb76
Refactor api.go to use abstracted sendResponse and sendError - Also fix most go doc complaints
2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
4413397103
Abstract update polling function and fix wrong comment for disabling logging
2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
8fe516253a
Modify the earlier logic of Interval instead of a timeout
2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
50a804683d
Use Promises for requests+ Add better console logs
2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
9efcc59252
Reorganize callbacks to utils and check for status accepted from go supervisor
2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
e43e11b3c1
Enable control of API poll interval through Device Variables
2015-10-13 13:45:08 -03:00
Praneeth Bodduluri
b91cb78eea
Allow control of VPN + TCP check + Pub nub logs with Device Environment variables
2015-10-13 13:45:07 -03:00
Pablo Carranza Vélez
3d7f5f3ced
Fix getting API key from DB by returning its .value
2015-10-13 13:45:07 -03:00
Pablo Carranza Vélez
e975f0f69f
Do auth for localhost too
2015-10-13 13:45:07 -03:00
Pablo Carranza Vélez
ec6fd6eb03
Pass api key to app, and keep it saved in the DB (do not regenerate on startup)
2015-10-13 13:45:07 -03:00
Pablo Carranza Vélez
6ed2fddd37
Wrap all update errors as Errors
2015-10-13 13:45:07 -03:00
Petros Angelatos
2d891262a7
wait 5s after sending SIGTERM and before sending SIGKILL
...
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2015-10-13 13:45:07 -03:00
Pablo Carranza Vélez
0fd03054e8
Expose supervisor API to app by allowing all requests from 127.0.0.1 and passing address and port as env vars
2015-10-13 13:45:07 -03:00
Pablo Carranza Vélez
7f7a550363
Only apply boot config or special actions when env vars have changed and within lock, and persist the new env to the DB
2015-10-13 13:45:07 -03:00
Pablo Carranza Vélez
8da8092104
Use a function in utils to extend env vars
2015-10-13 13:45:06 -03:00
Pablo Carranza Vélez
65df89aab6
Give extra environment variables to preloaded apps. Ensures the app is not unnecessarily restarted as soon as we gain connectivity.
2015-10-13 13:45:06 -03:00
Pablo Carranza Vélez
d25447d539
Promisify executeSpecialActionsAndBootConfig and remount /boot rw
2015-10-13 13:45:06 -03:00
Pablo Carranza Vélez
c136793cdd
Blacklist certain config.txt entries, Update node to 0.10.40 everywhere
...
Use board-specific images until we have new arch based ones
2015-10-13 13:45:06 -03:00
Pablo Carranza Vélez
39a07b8cd4
Remove the RPi /boot bind mount
2015-10-13 13:45:06 -03:00
Pablo Carranza Vélez
0e283e8e72
Actually apply config.txt changes and reboot
...
Keep the original statements where possible. (to ensure same config keys under different filters are not overwritten with always the same value)
2015-10-13 13:45:06 -03:00
Pablo Carranza Vélez
8b4d1e9f75
Ensure special env vars are persistent and add placeholder for device.setBootConfig
2015-10-13 13:45:06 -03:00
Praneeth Bodduluri
38df4651cb
Change to using _.has
2015-10-13 13:45:06 -03:00
Praneeth Bodduluri
173d5ee651
Execute the callback function associated with the specialActionVars only once and remove unused parts
2015-10-13 13:45:06 -03:00
Pablo Carranza Vélez
941d3b15af
Allow special env vars with a callback which don't cause an app restart
2015-10-13 13:45:06 -03:00
Praneeth Bodduluri
66a4bf4ab3
Remove unused config.supervisorContainer in config.coffee
2015-10-13 13:45:06 -03:00
Pablo Carranza Vélez
bd889e06a1
Bind mount /boot in RPi
2015-10-13 13:45:06 -03:00
Praneeth Bodduluri
391a141843
Change ipAddress to IPAddresses and add error message on unknown ip addr type
2015-10-13 13:45:05 -03:00
Praneeth Bodduluri
ea0b058721
Change APIResponse to a struct with a Data Interface
2015-10-13 13:45:05 -03:00
Praneeth Bodduluri
e1957def25
Address style fixes in app.coffee
2015-10-13 13:45:05 -03:00
Praneeth Bodduluri
f86f5881d9
Implement and use golang endpoint for getting ipaddress' of the device
2015-10-13 13:45:05 -03:00
Pablo Carranza Vélez
8eb1c3ea7b
Ensure we have the deviceId by GETting it from the Resin API
2015-10-13 13:45:05 -03:00
Pablo Carranza Vélez
8de173f6c3
Use crypto.randomBytes for API secret
2015-10-13 13:45:05 -03:00
Pablo Carranza Vélez
0373607c56
Refactor bootstrapper. Run preloaded supervisor dind. Change dind configs to be ignored and document how to populate them.
2015-10-13 13:45:05 -03:00
Pablo Carranza Vélez
909e193cea
Update resin-register-device to 2.0.0
2015-10-13 13:45:05 -03:00