Commit Graph

868 Commits

Author SHA1 Message Date
Pablo Carranza Velez
a8677a4401 Add listener for container events and reattach on restart 2016-06-11 11:55:22 -03:00
Pablo Carranza Vélez
891376dd2c Merge pull request #164 from resin-io/fix-deltas-dont-use-supervisor
fix deltas by not using the supervisor as source
2016-06-10 18:14:21 -03:00
Pablo Carranza Velez
6e39128f3a fix deltas by not using the supervisor as source 2016-06-10 17:22:52 -03:00
Pablo Carranza Velez
f69e635196 1.11.2 2016-06-10 16:45:13 -03:00
Petros Angelatos
1f3eddb3b0 Merge pull request #163 from resin-io/fix-delta-error-handling
connects to #160 fix delta error handling by listening for the 'error' event
2016-06-10 12:41:02 -07:00
Petros Angelatos
573cf31514 fix delta error handling by listening for the 'error' event
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-06-10 19:19:23 +00:00
Pablo Carranza Velez
1b7c91a791 1.11.1 2016-06-09 11:17:07 -03:00
Pablo Carranza Vélez
d069ce35e6 Merge pull request #161 from resin-io/fix-alpine-postinstall-sh
Use sh for postinstall as alpine has no bash
2016-06-09 11:11:32 -03:00
Petros Angelatos
d906786d58 update docker-delta to latest version
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-06-09 06:58:40 +00:00
Petros Angelatos
af32a48db4 symlink docker root to default path if not already there
docker-delta uses the docker API to query the docker root location.
However, docker returns the path in the host, not the path that it
happens to be bind mounted in the supervisor container. So in order for
the deltas to work properly, these paths must be the same.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-06-09 05:50:51 +00:00
Pablo Carranza Velez
1a1e1b5e8b Use sh for postinstall as alpine has no bash
Remove pipefail from postinstall.sh and use POSIX comparison
2016-06-07 15:44:28 -03:00
Pablo Carranza Velez
30457c0e0f 1.11.0 2016-06-07 13:01:38 -03:00
Pablo Carranza Vélez
9c0042c2d5 Merge pull request #120 from resin-io/restart-policy
Container restart policy specification.
2016-06-07 13:00:11 -03:00
Pablo Carranza Velez
3c38e6aa03 Changelog for restart policies 2016-06-07 12:50:25 -03:00
Alexios Theodoros Brezas
e3f480c217 Container restart policy specificiation.
Allow users to set container restart policy using environment variables.

RESIN_APP_RESTART_POLICY sets the name of the policy, and
if policy is "on-failure", optionally, RESIN_APP_RESTART_RETRIES
sets the maximum number of retries.

More information on docker docs:
https://docs.docker.com/engine/reference/run/#restart-policies-restart

One major change we introduce here is that the default policy is set
to always while we used to have the default "no".

We validate the arguments and pass retries parameter only for the case
of "on-failure" as specified in Docker API as of v1.19.
We could let docker handle the arguments directly, gaining
forwards-compatibility with any new features, but I opted
for an implementation that is as well-defined as possible.
2016-06-07 12:49:30 -03:00
Pablo Carranza Velez
a6466b93aa 1.10.1 2016-06-07 11:30:44 -03:00
Petros Angelatos
ca7df421e4 Merge pull request #159 from resin-io/deltas-v2
Switch to docker-delta library to use deltas v2
2016-06-06 19:45:51 -07:00
Petros Angelatos
20419bee3b Switch to docker-delta library to use deltas v2
This npm library implements the new delta format and also works with
docker 1.10.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-06-04 01:04:34 +00:00
Pablo Carranza Vélez
9b3381453e Merge pull request #158 from resin-io/157-fix-container-cleanup
Correctly compare container image name on cleanup
2016-06-03 14:08:54 -03:00
Pablo Carranza Velez
7104806ad1 Correctly compare container image name on cleanup
Docker 1.10 sends containerInfo.Image without the ":latest", so
the image name doesn't match the app's imageId.
This fix first splits the image name into repo and tag and then rebuilds
it to include ":latest" when appropriate. Should avoid removing containers
when using resin-sync.
2016-06-02 14:55:12 -03:00
Kostas Lekkas
131f7f5b22 Merge pull request #156 from resin-io/154-restore-private-env-vars
bugfix: do not mutate original env vars object
2016-06-01 14:18:27 +03:00
Kostas Lekkas
383be0946e bugfix: do not mutate original env vars object 2016-06-01 00:02:53 +03:00
Kostas Lekkas
bead6eb9c3 Merge pull request #153 from resin-io/152-log-to-stdout
Log useful supervisor info to stdout/stderr
2016-05-31 11:31:33 +03:00
Kostas Lekkas
6193ebe1df Log useful supervisor info to stdout/stderr 2016-05-30 16:51:27 +03:00
Alexios Theodoros Brezas
932af53913 1.10.0 2016-05-26 17:49:40 +03:00
Aleksis Brezas
f1391e8209 Merge pull request #149 from resin-io/fix-progress-bars
update docker progress to fix progress bars in docker v1.10
2016-05-26 17:47:15 +03:00
Alexios Theodoros Brezas
cba5f1c651 update docker progress to fix progress bars in docker v1.10 2016-05-26 17:46:37 +03:00
Pablo Carranza Velez
fa33cd72e1 1.9.0 2016-05-24 00:06:36 -03:00
Pablo Carranza Velez
ed7b936fee Use buffer-equal-constant-time to evaluate apikey 2016-05-23 23:59:45 -03:00
Pablo Carranza Vélez
1780a49030 Merge pull request #148 from resin-io/fix-alpine-versioning
Add changelog for alpine super and fix version reporting
2016-05-19 13:37:28 -03:00
Pablo Carranza Velez
25be1176d2 Add changelog for alpine super and fix version reporting 2016-05-19 16:25:49 +00:00
Pablo Carranza Vélez
cfbc83ee16 Merge pull request #146 from resin-io/145-load-image-endpoint
Add /v1/images/load endpoint
2016-05-19 11:42:02 -03:00
Pablo Carranza Velez
534035e7ae Changelog and docs for /v1/images/load 2016-05-19 13:27:59 +00:00
Pablo Carranza Velez
d58517f32d Use rwlock to block when images are being pulled 2016-05-19 13:24:23 +00:00
Pablo Carranza Velez
95f4fdb97f Add /v1/images/load endpoint 2016-05-18 13:47:54 -03:00
Pablo Carranza Vélez
ebf2c04a08 Merge pull request #134 from resin-io/alpine
Add alpine supervisor build info
2016-05-18 11:59:32 -03:00
Pablo Carranza Vélez
6748eb3c41 Merge pull request #143 from resin-io/142-local-management-api
Add endpoints to manage images and containers locally
2016-05-17 16:35:52 -03:00
Pablo Carranza Velez
951bd2888f Fix routing for deleting images with a slash in the name 2016-05-17 19:18:39 +00:00
Trong Nghia Nguyen
7ff638585c Add alpine supervisor build info 2016-05-17 11:59:39 +07:00
Pablo Carranza Velez
7b9eaeea3a Add some protections to avoid deleting supervisor or app containers 2016-05-17 00:03:23 +00:00
Pablo Carranza Velez
55870b16b1 Changelog and docs for image and container endpoints 2016-05-16 09:52:48 -03:00
Pablo Carranza Velez
3a77c2ec4b Allow passing tag when using fromImage in /v1/images/create 2016-05-13 10:35:03 -03:00
Pablo Carranza Velez
dcc3717949 Use Routers to separate endpoints with bodyParser 2016-05-13 10:35:03 -03:00
Pablo Carranza Velez
5d822b8dab Allow pulling images too 2016-05-13 10:35:03 -03:00
Pablo Carranza Velez
3d2f3ad94b Implement container management endpoints 2016-05-11 15:43:21 +00:00
Pablo Carranza Velez
8101d08433 Add endpoints to create, delete and list images, and also list containers 2016-05-11 14:44:05 +00:00
Pablo Carranza Vélez
8145f5632d Merge pull request #141 from resin-io/124-add-appid-env-var
Add RESIN_APP_ID variable
2016-05-10 12:50:22 -03:00
Pablo Carranza Velez
67a7271995 Add RESIN_APP_ID variable 2016-05-09 19:35:35 -03:00
Pablo Carranza Vélez
87649acb4b Merge pull request #139 from resin-io/125-increase-delta-request-timeout
Increase delta request timeout to 15 minutes
2016-05-05 12:00:38 -03:00
Pablo Carranza Velez
7039b23ad9 Increase delta request timeout to 15 minutes 2016-05-02 17:33:21 -03:00