Commit Graph

281 Commits

Author SHA1 Message Date
Scott Lowe
fcad35402a Convert command note to oclif
Add oclif support for piped input

Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-30 14:47:43 +02:00
Scott Lowe
49b00e18ae Convert command settings to oclif
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-30 14:47:43 +02:00
Scott Lowe
e5d2661c96 Clarify balena device os-update help re balenaCloud
Change-type: patch
Resolves: #1679
Signed-off-by: Scott Lowe <scott@balena.io>
2020-03-26 13:59:12 +01:00
Paulo Castro
671dca8287 Add project directory validation for balena push / build / deploy commands
Change-type: minor
2020-02-17 15:19:07 +00:00
Paulo Castro
a1c406a479 Add '--cache-from' option to balena build and deploy commands
It implements the same feature as the "docker build --cache-from" option.

Resolves: #1616
Change-type: minor
2020-02-13 18:43:15 +00:00
Paulo Castro
be209f1626 Fix Windows standalone zip installer (missing mmmagic db for CRLF conversion)
Change-type: patch
2020-02-07 18:19:10 +00:00
Scott Lowe
58e7880f1d Add support for auto-conversion of CRLF line endings.
Applies to commands:
 balena push
 balena build
 balena deploy --build

Change-type: minor
Resolves: #1273
Signed-off-by: Scott Lowe <scott@balena.io>
2020-01-31 16:27:22 +01:00
Paulo Castro
1e37c97ffb Fix proxy support and add proxy exclusion feature (Node.js >= 10.16.0 only)
See README for more details on proxy configuration and Node.js compatibility.

Resolves: #1579
Resolves: #1335
Connects-to: #1580
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-27 12:11:11 +00:00
Rich Bayliss
8f6902f4cb
configure: Allow passing system-connection files to 'os configure' command
Allow passing files to `os configure` via `--system-connection` to allow
pre-configuration of network connections, such as cellular/GSM.

Change-type: minor
Connects-to: #957
Connects-to: #1162
Connects-to: #1498
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-01-21 21:05:23 +00:00
Paulo Castro
edd755d41c Add hint about the 'jq' utility in the documentation of the --json option
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2020-01-14 16:19:09 +00:00
Matthew McGinn
046743071d meta: Americanize all spellings
Connects-to: https://github.com/balena-io/docs/issues/1300
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2020-01-03 13:42:34 -05:00
Paulo Castro
323c9191b6 Add --verbose and --json options to the 'devices supported' command
The command was also converted to oclif.

Resolves: #467
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-27 11:54:27 +00:00
Paulo Castro
7fd436cd91 Add multicontainer (microservices) support for 'balena env rename'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-12 13:39:26 +00:00
Paulo Castro
7c1faa6de0 Add multicontainer (microservices) support for 'balena env rm'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-12 13:39:26 +00:00
Paulo Castro
90e184ea1f Add multicontainer (microservices) support for 'balena env add'
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-11 17:50:08 +00:00
Paulo Castro
38920a1c59 Add multicontainer (microservices) support for 'balena envs'
Connects-to: #1153
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-11 17:50:08 +00:00
Paulo Castro
df58ac7673 Add balena envs '-j' option to produce JSON output
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-06 15:51:09 +00:00
Paulo Castro
02dcff5b67 Fix 'balena help join' docs re moving devices between apps on the same server
Resolves: #1429
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-21 15:31:45 +00:00
Paulo Castro
6c3429eb0c Add README note regarding Git for Windows console installation choice
Resolves: #598
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-20 23:38:49 +00:00
Scott Lowe
afd97bd304 Hide discontinued device types in balena devices supported.
Add tests for action.
Convert action to TypeScript.

Connects-to: #1485
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:55 +01:00
Paulo Castro
d94a74dfee Fix 'os configure --config', and migrate it to oclif + TypeScript
Also add more non-interactive configuration options:
--config-network, --config-wifi-*, --config-app-update-poll-interval

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-12 21:09:18 +00:00
Paulo Castro
636ecaf4e0 Improve help and docs (CLI install dependencies) for the preload command
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-09 14:04:50 +00:00
Thodoris Greasidis
1b943bdf7d Support managing tags using release commit hashes
The sdk version in the shrinkwrap already
supports setting tags by commit hashes and as a
result this already works in the cli as of v11.9.6.
This PR just adds some docs and some extra
handling when the commit param prefix is all
numeric.

Resolves: #1064
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-16 09:12:17 +03:00
Paulo Castro
a8fcd85f1a Update/improve npm install instructions for Windows
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-14 13:34:02 +01:00
Paulo Castro
7dd33adfd1 Fix 'balena build --emulated' on Windows (including default docker socket)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-09 13:10:49 +01:00
Thodoris Greasidis
d463a2f0e5 Allow deleting config vars with 'env rm'
Resolves: #1459
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-10-03 13:51:33 +03:00
Paulo Castro
c07b28e694 Migrate 'envs' and 'env rename' commands to oclif
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-18 12:54:31 +01:00
Paulo Castro
cdedc58ec1 Fix failing registry secrets authentication under certain conditions
('balena build' and 'balena deploy')

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-19 16:41:59 +01:00
Matthew McGinn
731db63e78 balena-ssh: add info about remote vs local connections
small formatting fixups

Closes: https://github.com/balena-io/docs/issues/974
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-19 16:14:26 +02:00
Lucian
f1d9c29786 Fix bug where "env rm" fails silently if an additional arg is present
Fixes #1380

Argument parsing of "env rm" command was improved by migrating it to oclif

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-12 13:47:31 +01:00
Cameron Diver
67a4e88e44 Support headless remote builds
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-06 08:45:05 +01:00
Paulo Castro
9d5ecb5f9c Add options to 'balena version' to show Node.js version
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-27 16:22:26 +01:00
Cameron Diver
cf9fdbe6e4 If a secrets file is not specified, read it from the data directory
Change-type: minor
Closes: #1164
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-18 11:13:09 +01:00
Thodoris Greasidis
825213c02a Add device OS update action
Resolves: #788
Depends-on: https://github.com/balena-io/balena-sdk/pull/638
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-06-11 15:27:23 +03:00
Cameron Diver
7fccd4a35e Update tunnel documentation after argument changes
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-06 17:56:20 +01:00
Paulo Castro
462b41b4ea Add 'scan' command to the website reference documentation
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-05 23:17:59 +01:00
Paulo Castro
0bbe376e41 Remove 'signup' command
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 17:06:46 +01:00
Paulo Castro
1e2e48b149 Revert 'balena flash' to 'balena local flash'
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:52:37 +01:00
Cameron Diver
6696b1b5f7 Make livepush the default when pushing to a local device
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:36 +01:00
Cameron Diver
b391c96e64 Allow multiple services to be tailed with balena logs and push
Also correctly type the input.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:35 +01:00
Cameron Diver
0ee73f5164 Don't require a login for commands operating on local devices
Change-type: patch
Closes: #1195
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:35 +01:00
Cameron Diver
1a1861bfcb Remove or move most local namespaced commands
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:52:34 +01:00
Paulo Castro
6e7f51758e Add CONTRIBUTING.md and some guidance on commit messages and doc files.
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:59 +01:00
Paulo Castro
ea89a6f221 Update documentation markdown following v11-meta branch rebase
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:58 +01:00
Cameron Diver
64c2f00d2a Update balena ssh command to support local devices and multicontainer
Change-type: major
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-04 13:51:57 +01:00
Alexis Svinartchouk
c49a1d3fbf Remove --dockerPort's -p alias for balena preload
It was conflicting with --pin-device-to-release -p alias

Changelog-entry: Remove --dockerPort's -p alias for `balena preload`
Change-type: major
2019-06-04 13:51:56 +01:00
Paulo Castro
abf573fa47 Begin the transition to oclif with 'balena env add' (fix dropped leading
zero in device UUID).

This commit is fairly chunky because it adds the oclif dependency for
the first time, and refactors the CLI help and docs generation code to
accommodate both Capitano and oclif.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:56 +01:00
Paulo Castro
a4efc7c9c4 Fix CI build error (missing @types/mz)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-30 12:57:03 +01:00
Cameron Diver
f77156772a Add the ability to specify an environment variable when pushing to local
mode device

Closes: #1255
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-27 13:23:55 +01:00
Alexis Svinartchouk
9434570c2d Improve preload's --commit parameter description
Change-type: patch
2019-05-22 17:29:08 +02:00
Alexis Svinartchouk
2091768c84 Rename preload --commit latest to preload --commit current
`latest` is still supported

Change-type: patch
2019-05-21 18:00:01 +02:00
Thodoris Greasidis
9f15ee58df docs: Fix os configure example in os build-config docs
Connects-to: #1231
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-05-16 12:38:44 +03:00
Paulo Castro
3303ac21c9 Update README and INSTALL docs (review typos and some rewording)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-01 18:15:47 +01:00
Paulo Castro
2ad0b60aeb Unify the CLI instructions between capitanodoc.ts and README.md, move
the installation instructions to INSTALL.md, and update the markdown
generation scripts.

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-29 14:27:32 +01:00
Cameron Diver
1b13d1b969
Allow specifying a .local address for logs and push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-25 11:00:45 +01:00
Cameron Diver
a6d2950260 Allow filtering of system logs with push and logs commands
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 17:30:18 +01:00
Cameron Diver
56c74af1ff Add per-service filtering to logs and push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 15:05:05 +01:00
Cameron Diver
97c15208b5 push: Add detached flag to avoid streaming logs after local push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 14:31:30 +01:00
Cameron Diver
f816cb4ce8 Fix and update log documentation
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 13:04:49 +01:00
Cameron Diver
d412d39164 Add ability to use balena logs with a local mode device
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-24 12:48:52 +01:00
Paulo Castro
db25a65753 Add --dockerfile option to the build, deploy and push commands
It allows the selection of an alternative Dockerfile in single-
container projects that do not include a docker-compose file.

Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-23 15:34:19 +01:00
Cameron Diver
7c71098d86
Update livepush documentation and required versions
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:05 +01:00
Cameron Diver
6a9a9e1fdb
Add livepush ability to balena push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-04-23 14:00:04 +01:00
Paulo Castro
29dd5e71a1 Fix docs markdown (deprecation messages for 'local push' and 'sync')
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-13 16:23:06 +01:00
Paulo Castro
30698c62e3 Remove 'quickstart' command and deprecate 'local push'.
Change-type: major
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-04-03 17:34:55 +01:00
Gergely Imreh
b4439b7d78
ssh: add --noninteractive flag not to suggest devices to connect to
The suggestion happens if the UUID supplied is not found. Because
of that function, it's impossible to do an atomic connect to a device
in non-interactive mode. The auto-suggestion results connecting to
the first available device, which is likely not the intended action.
The current workaround is running a `balena device UUID` and check
its exit code before running `balena ssh UUID`, but since these
are independent steps, still can connect to another device, if between
the two commands anything changes. With this flag used, one could never
connect accidentally to the wrong device due to suggestions.

Change-type: minor
Signed-off-by: Gergely Imreh <gergely@balena.io>
2019-03-12 11:50:17 +00:00
Gergely Imreh
a5cfbb3181
ssh: correct the minimum OS version that allows host OS connection
Since openBalena API v0.11.0 (downstream API 9.16.0) the minimum
OS version has been lowered from 2.7.5 to 2.0.0 for host OS access.

Change-type: patch
Signed-off-by: Gergely Imreh <imrehg@gmail.com>
2019-03-11 15:24:12 +00:00
Paulo Castro
de3837f777 Minor doc updates (add DEBUG hint)
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-03-04 19:53:18 +00:00
Paulo Castro
05e80094de Add registry-secrets help msg for build and deploy commands
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-02-27 21:58:44 +00:00
Paulo Castro
211fb824a1 Extend private registry support to balena build and deploy commands
Resolves: #1116
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-02-27 13:16:09 +00:00
Chris Crocker-White
67673a55f7 Fix regression in ee75ff and restore functionality to ToC in docs
Change-type: patch
Signed-off-by: Chris Crocker-White <chriscw@balena.io>
2019-02-22 16:37:57 +00:00
Paulo Castro
24fdfc9aef Update 'balena help local flash' documentation re zipped images
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-01-17 17:52:28 +00:00
Matthew McGinn
10fff8f0f5 Merge branch 'master' of github.com:balena-io/balena-cli into typo 2018-12-31 08:22:32 -05:00
Trevor Sullivan
64ec151e4b Added documentation about the dependencies required to build balena-cli
Change-type: minor
Signed-off-by: Trevor Sullivan <trevor@balena.io>
2018-12-28 13:00:43 -08:00
Matthew McGinn
3e4e661b28
Fix up small docs typo
Change-type: patch
Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
2018-12-28 08:40:18 -05:00
Paulo Castro
0f302d30ec Add push --registry-secrets option for private docker registry authentication
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2018-12-18 00:01:15 +00:00
Thodoris Greasidis
853d146457 Update the os configure examples to better explain --device-type
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-12-14 15:46:27 +02:00
Thodoris Greasidis
1e5cf8655e actions: Add resource tag operations
Resolves: #866
HQ: https://github.com/resin-io/hq/issues/150
HQ: https://github.com/resin-io/hq/pull/281
Change-type: minor
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-12-10 23:05:48 +02:00
Cameron Diver
a357405f3a
Make architecture checking more stringent when installing emulators
Also change the documentation to an armv7hf.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-12-03 13:10:54 +00:00
Thodoris Greasidis
5abd240d50 actions/config: Fix examples to include --version as required
Connects-to: #1007
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2018-11-23 16:01:01 +02:00
Akis Kesoglou
8291c96e69 Make specifying the version during configuration optional
`version` used to be optional but it seems we recently had to make it a required parameter. However it really feels redundant when all it’s used for is to determine whether the command should issue a legacy user API key or a provisioning key.

This makes version optional but tries to figure it out by itself by reading os-release from the image's boot partition. This is not foul-proof however, and while it'll work with most recent images it won't work with all and in that case it'll bail out and only then warn the user to specify it via the --version argument.

Change-type: minor
2018-11-16 19:39:43 +02:00
Akis Kesoglou
6e36cd139a Include join and leave commands in API documentation
Change-type: patch
2018-11-16 16:02:43 +02:00
Tim Perry
a809847d60 Mark api keys in the CLI as non-experimental
After the recent SDK updates, they should now work everywhere

Change-type: patch
2018-11-07 16:30:56 +01:00
Tim Perry
dc6cde2cf1 Change env var commands to set app-wide env vars, using the new SDK
Change-type: major
2018-10-29 22:29:03 +01:00
Tim Perry
4907fccf48 Rename everything from 'resin' to 'balena'
Change-type: major
2018-10-29 22:29:02 +01:00
Thodoris Greasidis
4d42f74c0c Add support for the Opensource provisioning flow
Connects-to: #978
Change-type: major
Depends-on: https://github.com/resin-io/resin-sdk/pull/594
HQ: https://github.com/resin-io/balena/pull/1140
Signed-off-by: Thodoris Greasidis <thodoris@resin.io>
2018-10-29 22:29:02 +01:00
Heds Simons
bf71f9ea16 Merge pull request #981 from resin-io/local-mode-v2
Local mode v2
2018-10-19 17:09:28 +02:00
Cameron Diver
947f91d570 Support multicontainer local mode in resin push
Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:44:56 +02:00
Alexis Svinartchouk
0c1c108b2b Check for correct architecture when preloading, instead of correct device type
Preload will now propose to preload any app that matches the image
architecture.

Change-type: major
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-10-19 16:43:02 +02:00
Tim Perry
8df066df12 Fix formatting of preload examples
Based on https://github.com/resin-io/docs/pull/915 from @drjasonharrison-vp-eio

Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-10-03 15:31:24 +02:00
Tim Perry
8688eb5da0 Include --emulated in the example resin build parameters
Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-09-19 15:34:29 +02:00
Theodor Gherzan
3b283d4a98
Device api keys are no longer used in the registration process
Change-type: patch
Signed-off-by: Theodor Gherzan <theodor@resin.io>
2018-09-10 12:30:51 +01:00
Cameron Diver
e7c68c1a5c
Support emulated and nocache options for remote builds
Change-type: minor
Closes: #901
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-08-09 14:36:34 +01:00
Tim Perry
392cd8569f Make build trigger hash examples clearer
Signed-off-by: Tim Perry <tim@resin.io>
2018-08-09 11:47:21 +02:00
Tim Perry
e32eda26d9 Update .resin-sync.yml docs for local push and include example env vars
Change-type: patch
Signed-off-by: Tim Perry <tim@resin.io>
2018-08-09 11:21:45 +02:00
Tim Perry
36eb0a108e Post-review tweaks to OS actions 2018-07-13 19:34:59 +02:00
Tim Perry
0bf6fb1739 Add --version options to os configure & config generate
This is used to ensure the correct type of API key is used in all
configuration.

Change-Type: patch
2018-07-13 19:34:59 +02:00
Tim Perry
f9cf0aaf23 Remove a couple of artifacts of the pubnub logs implementation 2018-07-12 15:10:16 +02:00
Tim Perry
52f93f8f12 Add --generate-device-api-key parameter to config generate
Change-Type: minor
2018-07-10 19:57:56 +02:00
Tim Perry
8c74f784f7 Make sure 'resin push' is included in the docs
Fixes #906
Change-Type: patch
2018-06-26 19:00:20 +02:00