Device and Fleet Management
Introduction
In this article, you will learn how to manage devices and fleets of devices for easy updates with the Torizon Cloud.
Prerequisites
- An account registered in the Torizon Cloud
- A Toradex System-on-Module (SoM) with Torizon OS installed.
- Optional: A host machine with TorizonCore Builder installed if you plan to create a customized Torizon OS image.
Device Management
The Torizon Cloud provides two convenient ways to provision new devices to the service.
- Single Device: if you want to provision a single device, you should use the single command provided in the web interface.
- Multiple devices: if you need to provision multiple devices without adding another step to your production process, you can provide provisioning data to the image that will be installed. After installation, the devices will provision themselves automatically.
Accounts & Provisioned Devices
When you provision a device to your account, it is registered under this account's repository. You can learn more about repositories and accounts in the Repository Sharing article section.
Best Practices for Device Provisioning
You can make your devices available to different users by leveraging the repository sharing feature. However, if you want to change the device provisioning ownership to a new account, you will have to reprovision the device to the new account.
Consider this aspect when provisioning and organizing your devices and fleets. We highly recommend creating a proper corporate-managed account to provision your devices and avoid using personal accounts (for evaluation purposes, this can be neglected).
Hibernation Mode
A Hibernated Device is a device that, while functioning normally application-wise, is not able to leverage Torizon Cloud features (e.g. OTA Updates and Remote Access connections). While hibernated, these devices don't count towards your quota of paying online devices. Devices can be taken on and off hibernation mode via the Web Console or the API. Refer to the table below to see the differences between supported features in Hibernated versus Online devices.
Feature | Online Device | Hibernated Device |
---|---|---|
No Upkeep Costs | ❌ | ✅ |
Device Provisioning | ✅ | ✅ |
Fleet Management | ✅ | ✅ |
Other Torizon Cloud Features | ✅ | ❌ |
The most common use cases for Hibernated Devices are:
- Decouple the provisioning process while flashing production devices in the factory from the start of incurring costs for online devices. You can have a device provisioned at no cost, for instance, while it is inside your warehouse;
- If you provide OTA Updates, Remote Access, and other Torizon Cloud features as optional for your product, or if you are not sure you need them, you can go to production with your fleet provisioned in hibernation mode. Later, you can opt-in to all these features when - and if - needed, without recalling devices or sending technicians to the field.
Hibernation mode can be enabled in different ways:
- During Manual Provisioning: when running the one-line command to provision your device on the Torizon Cloud add the
-z
flag to provision the device in hibernated mode. - After Provisioning: if your device is already provisioned and you would like to hibernate it, you can do so through the API endpoint /devices/hibernation, or directly on the Web Console like the picture below (you need to enable Early Access Features to your account, follow this section to enable it):
- Provisioning at scale: use Torizon Core Builder to create a custom Torizon OS image and set
hibernated:true
tag in theoutput/provisioning
section.
To remove a device from Hibernation Mode, you can follow the same API endpoint linked above, or click the same button shown on the picture above, on a Hibernated Device.
Network Requirement
The devices need internet access for provisioning, searching for remote updates, and remote access.
If you are in a restricted network, you will need to configure it so the Torizon infrastructure addresses are reachable by the devices. The network domain and port for accessing the Torizon Cloud by a device for provisioning are the following:
- To provision a device:
app.torizon.io
on port 443. - Provisioned device after June 2022:
dgw.torizon.io
on port 443. - Provisioned device before June 2022:
ota-ce.torizon.io
on port 443. Be aware that these devices will be migrated to thedwg.torizon.io
domain in the future.
If you have an existing device and want to check which gateway it is connecting to, look at /var/sota/import/gateway.url
.
For remote access:
- The devices need access to
ras.torizon.io
on port 2222 to establish a Remote Access session.
Provisioning a single device
You just need to run a single command on the device command-line either from the serial port or SSH.
This command provides the authentication token. On the device, it registers, downloads, and installs credentials. By executing this command on the device, the system will securely authenticate with the Toradex OTA backend.
Provisioning multiple devices
This is the recommended way to provision devices during production. You can learn all about it in our production programming and provisioning at scale article.
With the device provisioned, the fleet manager can update the containers, operating system, and associate it to fleets.
Polling Time
By default, Torizon OS is configured to poll the OTA server once every 5 minutes. That may sound like a lot of time for evaluation, but it is a reasonable default configuration for production. You can set a custom polling time.
To read more about the software that runs on the target device, see the Technical Overview of Torizon Cloud article.
Device Status
It is easy to check the provisioned devices status regarding their connection to the Torizon Cloud. Check the image below:
The indicated icon shows different collours according to the time passed since the last polling. When mouse-hovering on top of the indicated icon, corresponding messages are displayed.
- Green - "reported online x minutes ago": when less than 6 minutes have passed since the last polling cycle.
- Yellow - "reported online x minutes ago": when more than 6 minutes and less the 9 minutes have passed since the last polling cycle.
- Red - "this device hasn't been online for a while": when more than 9 minutes have passed since the last polling cycle.
Updating Multiple Devices by Creating a Fleet
The Torizon Cloud provides a flexible way to create a Fleet of devices. The creation of Fleets facilitates the secure update process of Multiple Devices.
On the Fleet menu, you can check the devices in each fleet and check their status. You can also add and remove devices from fleets.
Currently, it is only possible to add devices of the same type to a fleet. As an example, you cannot have a fleet composed of Apalis iMX8 and Verdin iMX8M Mini devices. You would need to create one fleet for each of them. If you need to have a heterogeneous fleet, please contact us and mention this article.