Commit Graph

61 Commits

Author SHA1 Message Date
Gareth Davies
a6b0c50d8e
docs: Clarify update locks for multicontainer applications
Change-type: patch
Signed-off-by: Gareth Davies <gareth@balena.io>
2020-03-16 14:09:28 -07:00
Cameron Diver
3ff3bce605 Allow getting the target state when not in local mode
Change-type: patch
Closes: #1176
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-01-30 11:24:59 +00:00
Pagan Gazzard
05a566dcb5 Switch to balenaos-in-container
Change-type: patch
2019-11-12 13:50:05 +00:00
Matthew McGinn
d12c10b0c2 docs: update lockfile Python snippet
Port over the downstream changes from https://github.com/balena-io/docs/pull/1184

Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-10-30 09:02:19 -04:00
Cameron Diver
da0534b3c8 Add usage example repo to documentation
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 18:33:47 +01:00
Cameron Diver
48bccd34db Add journald format flag
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 15:02:05 +01:00
Cameron Diver
2d924b83fc Update documentation and explicitly unpipe journald stream
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 15:02:05 +01:00
Matthew McGinn
8c9f974b07 docs: fix up typo "sucess" -> "success"
Related to https://github.com/balena-io/docs/pull/1065

Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-09 16:36:57 +02:00
Cameron Diver
1794b334a0
Fix version documentation for journald endpoint
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-09 12:48:06 +01:00
Cameron Diver
43cbf7dbba
Add an endpoint and module for reading journald logs
Change-type: minor
Closes: #1003
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-09 11:08:29 +01:00
Matthew McGinn
f2bb8a768e docs: update APPID to BALENA_APP_ID as exposed from the env
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-07-24 23:40:31 +01:00
Cameron Diver
3304825216 Add a supervisor endpoint to cleanup orphaned volumes
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-07-10 14:25:44 +01:00
Matthew McGinn
baa0e87513 docs: fix up broken meta-balena proxy link
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-07-10 10:11:46 +02:00
Matthew McGinn
acb38dfcfa docs: make headers consistent
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-05-07 00:41:58 +08:00
Matthew McGinn
331b109a64 docs: fix up some stray resin references
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-05-03 18:58:56 +08:00
Cameron Diver
b922789dee
device-api: Add v2/device/tags api endpoint
This endpoint will fetch the device tags from the balena api

Change-type: minor
Closes: #890
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-13 14:21:23 +00:00
Cameron Diver
3f231e8ff3
device-api: Add v2/device/name endpoint
This endpoint returns the last known device name from the API. This
differs from the BALENA_DEVICE_NAME_AT_INIT env var because this will
not change throughout the runtime of the container.

Closes: #908
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-13 14:21:22 +00:00
Cameron Diver
d9bc26bd83
docs: Standardise naming and json in api documentation
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-11 16:39:06 +00:00
Cameron Diver
4a17f704ab
docs: Add documentation for v2/state/status endpoint
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-11 16:24:44 +00:00
Heds Simons
79e7fb0b93
docs: Clarify Supervisor envvars exposure via label
Connects-to: #830
Change-type: patch
Signed-off-by: Heds Simons <heds@whaleway.net>
2018-12-04 16:38:26 +00:00
Pablo Carranza Velez
7fe94ec115 docs: Clarify that older supervisors use RESIN_ variables
We add a note on state endpoint docs to use RESIN_ variables. Since users will likely navigate directly to each endpoint, we add the note on the docs for each endpoint, except for endpoints added in >= 7.21.0 (since that version never made it to production).

We also switch some variables that were still referenced as RESIN_ to now use BALENA_.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-11-30 14:45:10 -03:00
Cameron Diver
311eaf0ac0
device-api: Add container id endpoint
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-11-28 16:44:19 +00:00
hippolyt
04ec6d1379
Appended API example
Added api proxy example to /supervisor/v2/applications/state

Change-type: patch
2018-11-07 10:22:15 +00:00
Cameron Diver
3ad8700066
doc: Add documentation for supervisor endpoints added after v7
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-11-06 13:13:06 +00:00
Pablo Carranza Velez
8298487a88 Rename most of the documentation and variable names from resin to balena
Change-type: minor
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-11-01 17:00:13 -07:00
Pablo Carranza Velez
87a8d8f8f4 Env var changes in API docs, new private env vars, remove unused vars
We update the supervisor API docs to reflect the new `BALENA_` injected env vars.
We also add the new sensitive env vars to the list of vars not sent by the API.

And we remove the unused RESIN_DATA_PATH and RESIN_PROXYVISOR_HOOK_RECEIVER from the
vars the supervisor parses from its own environment.

Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-10-16 15:12:05 +02:00
Pablo Carranza Velez
8003f25c3d Add /tmp/balena lock and handover paths and BALENA_ env vars
We change the lockfile to /tmp/balena/updates.lock, and the resin-kill-me file to /tmp/balena/handover-complete.
In the host, we change to use /tmp/balena-supervisor instead of /tmp/resin-supervisor.

We add BALENA_ env vars in addition to the RESIN_ env vars.

We keep backwards compatibility by using both paths for the lockfile and handover, and keeping the RESIN_ env vars.

Changelog-entry: Move the handover and lock files to /tmp/balena, rename them, and add BALENA_ env vars
Change-type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-10-16 15:12:04 +02:00
Cameron Diver
409a582507
Docs: Add documentation for the v2/applications/state endpoint
Change-type: patch
Closes: #719
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-08-13 10:51:32 +01:00
Cameron Diver
1fbc147c6d
Update update-locking documentation
Change-type: patch
Closes: #656
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-05-29 18:18:37 +01:00
Tim Perry
2586ab3677 Update docs with multicontainer API breakages
Change-Type: patch
2018-05-11 17:36:12 +02:00
Pablo Carranza Velez
348ff66cee
Replace the gosuper component with a node module that handles communication with systemd, and stop using an init system in the supervisor container
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-22 15:55:15 +00:00
Pablo Carranza Velez
5d7d99c258 Document that the update lock can be forced on reboots and shutdowns
Closes #373
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-19 16:30:59 -03:00
zwalchuk
d931bf217a Update update-locking.md
Test to see if this updates commit message

Change-type: patch
Signed-off-by: Zach Walchuk zach@resin.io
2018-03-05 07:09:42 -08:00
zwalchuk
2ce831420f Small updates for standardization
A few small updates to standardize terminology and header with the rest of the docs.
2018-03-05 07:09:42 -08:00
Pablo Carranza Velez
0e7bb77c41 docs: clarify that open connections will not be closed when configuring a proxy, and change all proxy API examples to use uuid
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-01-18 19:07:00 -03:00
Pablo Carranza Velez
0960d947ed Add documentation for the /v1/device/host-config endpoint
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-01-18 18:28:05 -03:00
Gergely Imreh
343aaa7a09
update-locking: updating the documentation with extra information and tools
Change-type: patch
2017-12-15 13:29:20 +00:00
Pablo Carranza Velez
95bbe6ea49 Add a /v1/healthy endpoint that fails if the supervisor is unhealthy, and a HEALTHCHECK command to the Dockerfile that uses it
We add an endpoint to the supervisor API that checks the following conditions to determine whether the supervisor is healthy:
* That the update cycle has run fully, in a time that's less than twice the poll interval. Unless we're downloading an image, in which case
we assume it's healthy (otherwise we'd get into the issue of determining a reasonable timeout for the image download, which is already done in a configurable way with delta options and the like).
* That the current state report to the Resin API hasn't failed more than 3 times. Unless the device has no connectivity, or the connectivity check is disabled, in which case we don't know
if the report failed simply because there's no network.
* That the gosuper component is working (since we periodically hit its API to get the IP addresses, we mark it as not working if this API call fails).

We need this endpoint to be unauthenticated for the docker daemon to be able to hit it (though, as the rest of the API, it is protected with iptables rules).

Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-12-11 00:11:56 -08:00
Pablo Carranza Velez
42ac7487e7 When the device is about to reboot or shutdown, close the API server and avoid applying updates
We mark when the device is rebooting and avoid some steps in the update cycle that change the device
state, similarly to when the device is in local mode, to avoid problems with non-atomic operations.
This doesn't solve *all* the potential scenarios of a reboot happening in the middle of an update, but at least
should prevent the case where we start an app container and reboot the device before saving the containerId, potentially
causing a duplicated container issue.

We also correct the API docs to reflect the 202 response when reboot or shutdown are successful.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 20:07:24 -03:00
Joe Roberts
087e7c3af0
Deprecate edge device type
Change-type: major
2017-07-05 10:20:26 +01:00
Horia Delicoti
ff632e811c docs/API.md: Fix documentation command sent via the API proxy for POST /v1/update.
Change-Type: patch
Signed-off-by: Horia Delicoti <horia.delicoti@gmail.com>
2017-04-11 08:09:27 +02:00
Pablo Carranza Velez
27690e0c30 Issue #20: Change the update lock to a temporary filesystem
The lock is now located at `/tmp/resin-supervisor/<appId>/` on the host, and `/tmp/resin/`
on the user container. The old lock location is supported only in Resin OS 1.X (and both locks are
taken in that case).

This fixes the race condition when the app is started before the supervisor, and takes a lock that is
cleared on supervisor startup.

Change-Type: major
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-03-10 01:19:35 +02:00
curcuz
b10cb20ea4 document dependent apps feature
Signed-off-by: Carlo Maria Curinga <czkzcz.cmc@gmail.com>

Change-Type: minor
2016-12-19 20:33:15 +01: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
534035e7ae Changelog and docs for /v1/images/load 2016-05-19 13:27:59 +00:00
Pablo Carranza Velez
55870b16b1 Changelog and docs for image and container endpoints 2016-05-16 09:52:48 -03:00
Kostas Lekkas
8577280dc5 Merge pull request #126 from resin-io/add-stop-start-endpoints
WIP: Add stop, start and get app endpoints
2016-04-25 13:27:08 +03:00
Kostas Lekkas
cca41e8271 Minor API doc fix 2016-04-20 17:56:02 +03:00
Kostas Lekkas
757e5b3244 Return container Id from the /v1/start and /v1/stop endpoints 2016-04-20 15:49:22 +03:00
Kostas Lekkas
49d0ff55f4 Small API doc fix for /v1/start endpoint 2016-04-20 14:54:00 +03:00