-
-
Notifications
You must be signed in to change notification settings - Fork 440
Benjamindannegard/x8 waves tutorial #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
184b1d2
Added structure and commands
BenjaminDannegard 3a875a6
Finishing touches
BenjaminDannegard 0366c7e
Linter fixes
BenjaminDannegard 0e31f17
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 6712443
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 90b2a75
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 9621ecd
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 6515889
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard b587496
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 74afd98
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 1a27df3
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard a10ef70
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 7ca4215
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 82e0b23
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 38da167
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 15c72eb
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard a4c9125
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard ef889cd
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard da82ca0
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard b7ec32d
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard ed7665b
Fixed content after review
BenjaminDannegard 74977b8
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 8b5e0c2
Update content/hardware/04.pro/boards/portenta-x8/tutorials/waves-fle…
BenjaminDannegard 1d659fa
Fix `description` and MD typos
marqdevx 6acc599
Align commands with camel case `<explanations>`
marqdevx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+185 KB
...nta-x8/tutorials/waves-fleet-managment/assets/foundriesfactory-device-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+165 KB
...tenta-x8/tutorials/waves-fleet-managment/assets/foundriesfactory-waves-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 111 additions & 0 deletions
111
...t/hardware/04.pro/boards/portenta-x8/tutorials/waves-fleet-managment/content.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
title: 'Using FoundriesFactory Waves Fleet Management' | ||
description: 'Learn how to use Foundries.io Factory fleet management tool Waves to manage multiple Portenta X8 devices' | ||
difficulty: intermediate | ||
tags: | ||
- Embedded Linux | ||
- Flashing | ||
- Foundries.io | ||
author: 'Benjamin Dannegård' | ||
hardware: | ||
- hardware/04.pro/boards/portenta-x8 | ||
--- | ||
|
||
## Overview | ||
|
||
In a production environment it is convenient to plan updates, and have control over when and which devices are updated. FoundriesFactory Waves is the feature for this. It allows you to easily define a group of Portenta X8s and then push updates to that specific group. This tutorial will show you how to define that group and how to construct a Wave that can then be pushed to a group. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Goals | ||
|
||
- Learn how to use Waves fleet manager | ||
- Learn how to assign a target to a Wave | ||
- Learn how to push a Wave to a group of devices | ||
|
||
### Required Hardware and Software | ||
|
||
- USB-C to USB-A or USB-C to USB-C | ||
- Portenta X8 | ||
- Arduino Create account | ||
- Arduino Pro Cloud Subscription. [Learn more about the Pro Cloud](https://www.arduino.cc/pro/hardware/product/portenta-x8#pro-cloud). | ||
- Foundries.io account (linked with the Pro Cloud subscription) | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- FoundriesFactory® ([Check the Getting Started tutorial](https://docs.arduino.cc/tutorials/portenta-x8/out-of-the-box)) | ||
- Devices already attached to your factory ([Check the Getting Started tutorial](https://docs.arduino.cc/tutorials/portenta-x8/out-of-the-box)) | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Instructions | ||
|
||
### Setting Up the Terminal | ||
|
||
Waves fleet management requires us to have the X8 setup with a FoundriesFactory. If you have not done this please take a look our other tutorial [Getting Started tutorial](https://docs.arduino.cc/tutorials/portenta-x8/out-of-the-box), it will walk you through how to set up the X8 with your FoundriesFactory. To use Waves we also need to have fioctl installed and configured, you can follow this guide [here](https://docs.foundries.io/latest/getting-started/install-fioctl/index.html) for setting up fioctl. Creating waves and device groups will be done via the host, which is your factory, so the following commands will be in a terminal using fioctl connected to your FoundriesFactory. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Rotating Our Keys | ||
|
||
For security purposes we recommend that you rotate the keys of your FoundriesFactory. Rotation of the key will convert the root role's online-key, generated during the bootstrap of a Factory, to an offline key. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
First we will rotate the root keys. These are the most important keys, they can be used to create new target keys. We will rotate them with this command: | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
fioctl keys rotate-root --initial /absolute/path/to/root.keys.tgz | ||
``` | ||
|
||
Now we can rotate the target only keys. With this command: | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
fioctl keys rotate-targets /absolute/path/to/root.keys.tgz | ||
``` | ||
|
||
And finally we copy the target keys to root using: | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
fioctl keys copy-targets /absolute/path/to/root.keys.tgz /path/to/target.only.key.tgz | ||
``` | ||
|
||
Now we can move on to creating our Wave. | ||
|
||
### Creating the Wave | ||
|
||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
The command below will create a wave that can then be pushed to our devices. To create a Wave we will have to sign it with a key, here we will use the targets only key. Then we can give the wave a name, target number and tag. The `target number` needs to correspond to the target that we want the wave to contain for our devices. The `tag` can be set as production or development. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
fioctl wave init -k /absolute/path/to/targets.only.key.tgz <wave-name> <target number> <tag> | ||
``` | ||
|
||
And then we can complete the wave by calling this function with the waves name. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
fioctl wave complete <wave-name> | ||
``` | ||
|
||
Or we can cancel it if we wish with: | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
fioctl waves cancel <wave name> | ||
``` | ||
|
||
When you create the wave you should be able to see it on your factory page. Here it should also be marked as complete once you call the wave complete command. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
 | ||
|
||
### Create the Device Group | ||
|
||
With this command we create our group. We give it a name and we can also give it a short description. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
fioctl config device-group create <group name> <"short description here"> | ||
marqdevx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
Now to assign a device to our group we use: | ||
``` | ||
fioctl device config group <device name> <group name> | ||
``` | ||
|
||
On your FoundriesFactory page you can sort devices by group on the device page. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
 | ||
|
||
And now to rollout our wave to our device group we use: | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
fioctl waves rollout <wave name> <device group name> | ||
``` | ||
|
||
Now every device in the device group should have the target specified in the wave creation. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Conclusion | ||
|
||
In this tutorial we first looked at what is required to use the Wave tool. We then went through the process of creating a wave and device group. Then we pushed a target to the device group using the Wave tool. | ||
BenjaminDannegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Troubleshooting | ||
|
||
- If you are having trouble with any fioctl commands you can use `fioctl wave --help` or `fioctl wave rollout --help` depending on the context. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.