Commit Graph

1063 Commits

Author SHA1 Message Date
Pablo Carranza Velez
a8dd29cd82 Change the logger to send at a specific interval and with a different message format
Log messages to PubNub are now an array instead of an object.
Each element of the array is an object with m (message), t (timestamp) and s (isSystem, optional) attributes.
Logs are sent at a specific interval (110ms, fit with some margin to PubNub's approximated 10 messages/s limit), and truncated to PubNub's 32KB limit.
2016-08-29 19:03:06 -03:00
Pablo Carranza Vélez
4f6f59b80e Merge pull request #240 from resin-io/fix-makefile
Fix proxies assignment in Makefile
2016-08-26 18:20:00 -03:00
Pablo Carranza Velez
a20084d906 Fix proxies assignment in Makefile 2016-08-23 10:23:18 -03:00
Pablo Carranza Velez
6de51543a5 1.14.0 2016-08-16 21:02:30 +00:00
Pablo Carranza Vélez
016a82586e Merge pull request #232 from resin-io/231-header-auth
WIP: Allow using an HTTP header for auth
2016-08-16 18:00:55 -03:00
Pablo Carranza Velez
1eb63366ee Allow using an HTTP header for auth 2016-08-16 20:39:55 +00:00
Pablo Carranza Vélez
439bac6331 Merge pull request #229 from resin-io/228-iptables
Add iptables rules to block requests to the supervisor API from all interfaces except vpn, docker and local
2016-08-16 17:36:19 -03:00
Pablo Carranza Velez
72369ca0be Changelog for iptables rules 2016-08-16 20:35:04 +00:00
Pablo Carranza Velez
145d124410 Check if rules exist before adding them 2016-08-16 09:30:38 -03:00
Pablo Carranza Vélez
55a8f897e8 Fix docs
Do not document the container management endpoints, as the API can and will probably have changes soon
2016-08-15 23:07:00 +02:00
Pablo Carranza Velez
c4ea2c77a0 Add iptables rules to block requests to the supervisor API from all interfaces except vpn, docker and local 2016-08-15 18:02:36 -03:00
Pablo Carranza Velez
211560472a 1.13.2 2016-08-09 15:23:27 -03:00
Petros Angelatos
d673015011 Merge pull request #227 from resin-io/fix-offline-mode
bootstrap: if offlineMode is enabled, persist only the uuid
2016-08-02 23:48:58 -07:00
Petros Angelatos
dd06f993ce bootstrap: if offlineMode is enabled, persist only the uuid
If we don't persist the uuid then every time the supervisor starts it
will think it's a new device. This triggers a wipe of the local state
and also a re-load of the preloaded apps. This in turn causes multiple
instances of the preloaded apps to be left running.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-08-02 23:48:13 -07:00
Petros Angelatos
d6a7608374 1.13.1 2016-07-28 17:45:43 -07:00
Petros Angelatos
5ee15e664e utils: allow specifying links in compose files
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-07-28 17:45:16 -07:00
Petros Angelatos
b708f05476 utils: sort compose options
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-07-28 17:43:26 -07:00
Petros Angelatos
92d7ffbf04 1.13.0 2016-07-27 02:55:18 -07:00
Petros Angelatos
cd9ddf0d2f Merge pull request #222 from resin-io/foobar
WIP add missing rimraf package
2016-07-26 23:28:57 -07:00
Petros Angelatos
f39ab4b0c8 add missing rimraf package
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-07-26 21:27:36 -07:00
Petros Angelatos
eb09713391 Merge pull request #216 from resin-io/215-improve-containers-api
Improve containers API
2016-07-26 20:52:56 -07:00
Petros Angelatos
4c704a76fc Merge pull request #219 from resin-io/enable-offline-mode
WIP: Allow the supervisor to work in offline mode
2016-07-26 14:06:19 -07:00
Petros Angelatos
66fe7fc30c logger: empty the publish queue if in offline mode
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-07-26 14:04:51 -07:00
Pablo Carranza Velez
98d9aca92d Allow the supervisor to work in offline mode
A supervisorOfflineMode true-ish attribute in config.json will cause that:
* If unprovisioned, the supervisor won't try to provision on Resin
* The update cycle will not start as the device won't consider itself provisioned
* Logs will not be sent to pubnub
* Mixpanel events won't be tracked
* The device state won't be updated to the Resin API

This change will also make the Supervisor API work with an unprovisioned device.
2016-07-23 14:04:24 +00:00
Pablo Carranza Velez
02e111ff62 Allow only the options that we know can be supported 2016-07-22 23:28:28 -03:00
Pablo Carranza Velez
4db78b9743 Allow purging and deleting a container from the DB with a purge option 2016-07-22 23:17:25 -03:00
Pablo Carranza Velez
0b4f50d207 Avoid creating duplicate entries in the image table 2016-07-22 23:17:25 -03:00
Pablo Carranza Velez
1d16941a2d Fix cleanup of official images, and allow passing Name in container options 2016-07-22 23:17:25 -03:00
Pablo Carranza Velez
e41ebbb52b Add validation for options when creating and starting containers 2016-07-22 23:17:25 -03:00
Pablo Carranza Velez
54288f036a Improve the docker compose API
- Validate the options in the YAML file
- Define bind mounts for each service as in Resin apps
- Keep the modified compose file inside the supervisor's /data folder
- Fix error reporting in the first stage of "up"
2016-07-22 23:17:25 -03:00
Pablo Carranza Velez
b97fe634d5 Add default binds to containers created with API, add /v1/containers/update endpoint, and add a /data bind with an internal id 2016-07-22 23:17:25 -03:00
Page-
d652e13005 Merge pull request #203 from axbannaz/202_fix_prox_and_propagate_proxy_to_dind
202 fix prox and propagate proxy to dind
2016-07-22 14:42:57 -07:00
Kostas Lekkas
23c3ed8719 Merge pull request #218 from resin-io/217-fix-double-logs
Fix double-printed logs after container restart
2016-07-22 10:23:38 +03:00
Kostas Lekkas
761a0cbd82 Fix double-printed logs after container restart 2016-07-21 22:39:19 +03:00
Page-
72ed2883fe Merge pull request #214 from resin-io/linting
Run the linting automatically as part of the jenkins build.
2016-07-19 16:36:11 -07:00
Pagan Gazzard
8715534d84 Run the linting automatically as part of the jenkins build. 2016-07-19 14:37:46 -07:00
Pablo Carranza Vélez
965b75816d Merge pull request #210 from resin-io/208-remove-run-dbus
Do not bind mount /run/dbus to /run/dbus
2016-07-19 14:52:42 -03:00
Pablo Carranza Velez
0609619863 Do not bind mount /run/dbus to /run/dbus 2016-07-19 02:13:34 +00:00
Pablo Carranza Vélez
711a9a8e22 Merge pull request #212 from resin-io/211-catch-non-btrfs-imagerootdir
Default to not bind mounting kmod if container distro can't be found
2016-07-18 23:08:44 -03:00
Pablo Carranza Velez
f5b0a4e7e7 Default to not bind mounting kmod if container distro can't be found 2016-07-18 16:49:45 +00:00
Pablo Carranza Vélez
8ce7b72854 Merge pull request #207 from resin-io/206-log-timestamp
Use log-timestamp to add timestamps to logs
2016-07-18 13:46:53 -03:00
Pablo Carranza Velez
102eb460db Use log-timestamp to add timestamps to logs 2016-07-18 14:01:16 +00:00
Pablo Carranza Velez
427a19f2ca 1.12.2 2016-07-15 23:56:09 +00:00
Pablo Carranza Vélez
fae4e6372d Merge pull request #205 from resin-io/204-bind-mount-kmod
WIP: Bind mount kmod if the container is debian or raspbian
2016-07-15 20:54:22 -03:00
Pablo Carranza Velez
5f926faa70 Bind mount kmod if the container is debian or raspbian
Use docker-toolbelt module.
The bind mount is read-only.
2016-07-15 20:46:09 +00:00
Arash Bannazadeh-Mahani
2ecc0fb715 Propagate the runtime proxy info down to the dind docker. 2016-07-08 14:58:50 -07:00
Arash Bannazadeh-Mahani
a190c48f2f Fix: Did not properly propagate no_proxy var 2016-07-08 14:57:36 -07:00
Kostas Lekkas
8cc68e2245 Merge pull request #192 from resin-io/184-dind-dev-bind-mount
dind: add helper scripts to speed-up development with bind mounts
2016-07-08 20:23:37 +03:00
Pablo Carranza Velez
819428850f 1.12.1 2016-07-08 14:02:06 -03:00
Kostas Lekkas
991795de96 dind: bind mount /sys/fs/cgroup only if host is Linux 2016-07-08 20:00:22 +03:00