Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tools/onboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ You need:
- **This computer on the Wi-Fi network** the device should use. Most
devices only use 2.4 GHz networks.

## Install with go-c8y-cli

The tool is also a go-c8y-cli extension. Install it with:

```sh
c8y extensions install thin-edge/tiny-edge
```

Then start it with `c8y tinyedge onboard` instead of `./tedge-onboard`. It
takes the same options, and it uses your active go-c8y-cli session. Run
`c8y extensions upgrade tinyedge` to get a newer version.

The rest of this section, apart from the download itself, still applies.

## Download

Download the file for your computer from the
Expand Down
5 changes: 3 additions & 2 deletions tools/onboard/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ for target in "$@"; do
CGO_ENABLED=$cgo GOOS=$goos GOARCH=$goarch \
go build -trimpath -ldflags "-s -w -X main.version=$version" \
-o "$out/$name" .
cp README.md "$out/"
cp README.md extension.yaml "$out/"
if [ "$goos" = windows ]; then
(cd dist && zip -qr "$(basename "$out").zip" "$(basename "$out")")
else
tar -C dist -czf "$out.tar.gz" "$(basename "$out")"
# No macOS AppleDouble (._*) files: go-c8y-cli expects one top-level folder
COPYFILE_DISABLE=1 tar -C dist -czf "$out.tar.gz" "$(basename "$out")"
fi
rm -rf "$out"
echo "built $out"
Expand Down
18 changes: 18 additions & 0 deletions tools/onboard/extension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: Apache-2.0
#
# go-c8y-cli extension manifest. build.sh puts it in each release archive,
# so the tool installs with:
#
# c8y extensions install thin-edge/tiny-edge
#
# and runs as "c8y tinyedge onboard". Add other tiny-edge host commands
# under "commands".
version: v1
name: tinyedge
binary:
path: tedge-onboard
commands:
- name: onboard
description: Set up a device for Cumulocity over a USB cable
# tedge-onboard has no subcommands, so pass only the user's arguments
exec: []
Loading