Pablo Carranza Velez
c4e5d7afca
Improvements on config and dependent device handling:
...
* Store config vars when there's nothing else to update
* Do not mark an update as failed if the hook failed
* When hitting the dependent devices hook, send appId as int
2016-10-05 23:21:29 +00:00
Pagan Gazzard
5c10644df7
Update to lodash 4
2016-10-05 23:03:12 +00:00
Pablo Carranza Velez
503e043c4c
In cleanup, normalize all image tags for comparison
2016-10-04 17:48:11 -03:00
Pablo Carranza Velez
ddaa9f12db
Use getRegistryAndName from docker-toolbelt 1.2.0
2016-10-04 14:43:45 -03:00
Pablo Carranza Velez
a6f2ff074c
Dependent devices, state endpoint, extra env vars and deviceConfig:
...
* Implement proxyvisor API with dependent device handling
* Use the state endpoint from the API to get the full device state
* Add a deviceConfig db table to store host config separately, and allow deleting config.txt entries
* Expose RESIN_APP_NAME, RESIN_APP_RELEASE, RESIN_DEVICE_NAME_AT_INIT, RESIN_DEVICE_TYPE and RESIN_HOST_OS_VERSION env vars
* Add missing error handler on a stream in docker-utils
2016-09-30 23:40:03 -03:00
Pablo Carranza Velez
e7acff0bcf
On cleanup, force removal for images and containers, and remove container volumes
2016-09-29 19:34:19 -03: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
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
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
Pagan Gazzard
6cb4b090c5
Rename pullImage to pullAndProtectImage to make it a bit clearer that it isn't a simple pull
2016-06-24 21:08:47 +00:00
Pablo Carranza Velez
4278b6baf1
Add endpoints for docker-compose up and down
2016-06-24 21:08:46 +00:00
Kostas Lekkas
d64d413838
Remove unused vars and fix linting issues
2016-06-16 18:47:12 +03:00
Pablo Carranza Velez
6e39128f3a
fix deltas by not using the supervisor as source
2016-06-10 17:22:52 -03: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
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 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
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 Velez
951bd2888f
Fix routing for deleting images with a slash in the name
2016-05-17 19:18:39 +00: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
3a77c2ec4b
Allow passing tag when using fromImage in /v1/images/create
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 Velez
7039b23ad9
Increase delta request timeout to 15 minutes
2016-05-02 17:33:21 -03:00
Kostas Lekkas
fcaafd9033
Reduce noise in logs
2016-03-07 13:16:38 +02:00
Pablo Carranza Velez
27e8e3c027
Update docker-progress and drop default port from repo tag
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
78f0df281b
Replace dockersync.sh with node and dockerode stuff. Don't install docker. Add Dockerfile changes for armel.
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
676f6699fe
Nicer use of spawn
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
9dd1fa2408
Catch out of sync errors falling back to scratch. Make update retries more dependent on number of failures
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
d3fea26c11
Send both source tag and Id to delta server
2016-01-28 11:08:42 -03:00
Pablo Carranza Velez
b9eb6836be
Better check for source image.
...
Don't use config.supervisorImage, and use image Id's instead of tags.
Also, change the RESIN_DELTA var into the RESIN_SUPERVISOR_ namespace.
2016-01-28 11:08:42 -03:00
Pablo Carranza Vélez
5b48856c9a
Bring back request - and show an error when talking to delta server fails
2016-01-28 11:08:42 -03:00
Pablo Carranza Vélez
1a5a9b0e23
findSimilarImage should always return an array, and test the repoTag[0]
2016-01-28 11:08:42 -03:00
Pablo Carranza Vélez
8e4e844cfa
JSON.parse env before checking for delta, and use progress.percentage
2016-01-28 11:08:42 -03:00
Petros Angelatos
582e3322ec
Set a 5 min timeout to delta requests
2016-01-28 11:08:42 -03:00
Petros Angelatos
071ee3dcf4
Ignore output from dockersync.sh
2016-01-28 11:08:42 -03:00
Petros Angelatos
f6eafb7b96
Always send the final progress event
2016-01-28 11:08:42 -03:00
Petros Angelatos
595f80e031
Fix rsync stream resumption
2016-01-28 11:08:42 -03:00
Petros Angelatos
8c7964684a
Return the supervisor tag containing the git commit
2016-01-28 11:08:42 -03:00
Petros Angelatos
bd2f31624b
Delete unused functions
2016-01-28 11:08:42 -03:00
Petros Angelatos
10e166020e
Speed up rsync diff application
2016-01-28 11:08:42 -03:00
Petros Angelatos
9adbd81bc0
Avoid shadowing the config variable
2016-01-28 11:08:42 -03:00
Petros Angelatos
11dfbd1687
Don't timeout while waiting for delta
2016-01-28 11:08:42 -03:00
Petros Angelatos
cbde944565
Implement rsync diff fetching method
2016-01-28 11:08:42 -03:00
Pagan Gazzard
16a9cfa365
Switch to docker-progress for pull progress.
2015-11-10 17:29:22 +00:00