Commit Graph

71 Commits

Author SHA1 Message Date
Vipul Gupta (@vipulgupta2048)
732950fb9e Add message to refer to v2 endpoints
Change-type: patch
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipul@balena.io>
2021-04-06 14:16:12 +00:00
Miguel Casqueira
711909d915 Removed upgrades.md doc
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2021-03-31 18:56:31 -04:00
Matthew McGinn
f9a157c9ec typos: seperate -> separate
mainly to get the docs one, but figured i could hit them all

Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2021-03-17 14:27:53 -04:00
Miguel Casqueira
c64d3cb216 Clarify when update_pending in /v1/device is true
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-10-30 18:46:22 -04:00
M. Casqueira
1b51db06c1 Clarify docs for toggling update lock override from dashboard
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-09-17 18:22:33 -04:00
Nitish Agarwal
82dda7d852 Fixes documentation - ping doesn't need apiKey and minor documentation formatting changes.
Change-Type: patch
Signed-off-by: Nitish Agarwal <1592163+nitishagar@users.noreply.github.com>
Co-authored-by: xginn8 <xginn8@users.noreply.github.com>
2020-07-31 23:38:21 +05:30
Rich Bayliss
1b91ef3405
state: Report device MAC address to the API
When reporting device information, send the MAC address of any
interfaces on the system. Also expose in the Supervisor API at
the route GET /v1/device.

Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-06-22 10:41:06 +01:00
Hugh Brown
989ec83a27 Add supervisor upgrade document
Connects-to: https://github.com/balena-io/balena-io/issues/2157
Change-type: patch
Signed-off-by: Hugh Brown <hugh@balena.io>
2020-06-16 13:05:17 -07:00
Miguel Casqueira
466c7999db Remove CoffeeScript tests and all CoffeeScript tools
Closes: #1318
Change-Type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-05-15 13:01:51 -04:00
Miguel Casqueira
8295858b32 Added endpoint to check if VPN is connected
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-05-11 21:21:44 -04:00
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