Commit Graph

689 Commits

Author SHA1 Message Date
Lorenzo Stoakes
d90c3f0414 Merge pull request #4 from resin-io/RES-1304-investigate-use-of-logfatal-and
Prevent non-fatal errors from closing the supervisor.
2015-10-15 18:43:37 +01:00
Lorenzo Stoakes
849a8c848b Prevent non-fatal errors from closing the supervisor.
This patch fixes a couple of cases where `log.Fatalf` would cause the supervisor
to exit immediately when it's inappropriate to do so. `log.Fatalf` and
co. should not be used unless the supervisor utterly cannot run without
whatever's being checked being in place.

This patch also adjusts the code that relied on the module's values being
created here being available, they now check and send an appropriate error
message if they're not there.
2015-10-15 18:14:42 +01:00
Pablo Carranza Vélez
584d0b54cc Merge pull request #3 from resin-io/RES-1323-keys-in-makefile
Default PubNub and Mixpanel keys are now passed at build time
2015-10-15 11:14:34 -03: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
ae6b042318 Merge pull request #2 from resin-io/docs
Document API and update locking
2015-10-14 12:27:36 -03:00
Pablo Carranza Vélez
dbbca98689 Document API and update locking 2015-10-14 12:15:46 -03:00
Pablo Carranza Vélez
8453e703fe Quickfix: link to Gosuper branch in README 2015-10-13 15:05:10 -03:00
Pablo Carranza Vélez
4369ad31b0 Quickfix: Use yaml to render json with comments in README 2015-10-13 14:50:32 -03:00
Pablo Carranza Vélez
6495b4f436 Use apps.json to determine the preloaded image to pull to dind 2015-10-13 13:45:09 -03:00
Pablo Carranza Vélez
2ea336dec9 Don't duplicate 01_nodoc, and fix grammar in README 2015-10-13 13:45:08 -03:00
Pablo Carranza Vélez
0a893aaa36 Make dind use debian instead of resin-base 2015-10-13 13:45:08 -03:00
Pablo Carranza Vélez
c67f2be88f Refactor README for open source, and make Makefile use DockerHub by default 2015-10-13 13:45:08 -03:00
Pablo Carranza Vélez
c1703ce97a 1.1.0 2015-10-13 13:45:08 -03:00
Pablo Carranza Vélez
3404b4f45b Use ENTRYPOINT to start the supervisor 2015-10-13 13:45:08 -03:00
Pablo Carranza Vélez
25198409b1 Switch back to using arch-based node images 2015-10-13 13:45:08 -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
fd012c35b4 Match resin-supervisor-dind dbus export to the one used on real devices 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
1890c0bc0d Refactor api.go and systemd.go based on PR comments 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
f7c81f987f Mount resin-supervisor src into the emulated device + add socat to help test gosuper 2015-10-13 13:45:07 -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
Praneeth Bodduluri
d6154b802d Adapt VPN service to mimic that of our devices + mount systemd in the supervisor 2015-10-13 13:45:07 -03:00
Praneeth Bodduluri
cd9daa8a8b Add GO api for openvpn control 2015-10-13 13:45:07 -03:00
Pablo Carranza Vélez
98c9ee2c21 1.0.2 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
3d82ea8249 1.0.1 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
3f3a26965e Use raspberrypi2 base image for armv7hf 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
858d1097fe 1.0.0 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
933af97faf 0.0.18 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
6062658933 0.0.17 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
9895cdccf2 Changelog for config.txt changes 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