Developer Guide

  • 2022.3
  • 10/25/2022
  • Public Content
Contents

OTA Updates

The OTA updates solution is based on the Basic Fleet Management architecture. The following diagram presents the architecture, components, and communications for these use cases.
Prerequisites:

Operating System Update

On the ThingsBoard* dashboard, click
Trigger SOTA
, select
update
, and click
SEND
. Update progress is visible in the ThingsBoard logs. The client host reboots after SOTA completes.
If the operating system update fails,
dpkg
may have been interrupted in the past or the SOTA cache directory is missing on the robot. Run the following commands to solve the issue:
sudo dpkg --configure -a sudo mdkir -p /var/cache/manageability/repository-tool/sota

Firmware Update

This example updates the Intel® RealSense™ camera firmware.
  1. Preparation for the Intel® RealSense™ camera firmware update:
    1. Place the
      .bin
      file that contains the firmware in a
      .tar.gz
      archive. Make sure that you do not archive the entire directory, only the
      .bin
      file.
    2. Set up a basic HTTP server, and upload the
      .tar.gz
      on it as a trusted repository server.
  2. On the ThingsBoard* dashboard, click
    Trigger Config Update
    .
  3. Choose:
    • Command: append
    • Path: trustedRepositories:http://url-to-http-server/and-optional-path-if-necessary/
  4. Click
    Send
    , and observe the logs in the ThingsBoard* bottom screen.
  5. Trigger the firmware update.
    • BIOS Version: any number
    • Manufacturer: set the value according to the following image
    • Product: set the value according to the following image
    • Release Date: the current date in the YYYY-MM-DD format
    • Vendor: set the value according to the following image
    • Server Username and Server Password: only used if the HTTP server is password protected
  6. Click
    Send
    , and observe the logs in the ThingsBoard* bottom screen.
The client host reboots after the update complete.

Manifest Update to Trigger POTA (Operating system update and Firmware update)

Programming Over The Air, or POTA, includes both SOTA and FOTA.
A configuration update is still required if the image URL is not listed on trusted repository.
  1. Trigger a POTA by clicking
    Manifest Update
    . Replace the default manifest with your text.
    Example:
    <?xml version="1.0" encoding="utf-8"?> <manifest> <type>ota</type> <ota> <header> <type>pota</type> <repo>remote</repo> </header> <type> <pota> <fota name="sample"> <biosversion>5.12</biosversion> <manufacturer>AAEON</manufacturer> <product>UP-APL01</product> <vendor>American Megatrends Inc.</vendor> <releasedate>2022-07-08</releasedate> <fetch>http://glaic3n125.gl.intel.com/rs_13.tar.gz</fetch></fota> <sota> <cmd logtofile="y">update</cmd> <release_date>2024-12-31</release_date> </sota> </pota> </type> </ota> </manifest>
  2. Click
    Send
    , and observe the logs in the ThingsBoard* bottom screen.
The client host reboots after the update completes.

Container Update

Because the containers (or applications) are orchestrated and deployed by Intel® Smart Edge Open, the ThingsBoard* Rule Chain routes AOTA trigger requests to the Intel® Smart Edge Open server. AOTA only works for whole pod updates.
  1. Verify the current version:
    $ helm list -A NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION cadvisor telemetry 1 2022-09-13 17:14:17.731573771 +0300 EEST deployed cadvisor-0.1.0 1 cert-manager cert-manager 1 2022-09-13 17:05:37.960015552 +0300 EEST deployed cert-manager-v1.6.1 v1.6.1 collab collab 1 2022-09-14 11:41:31.420169905 +0300 EEST deployed collab-0.1.0 2022.3.0 collab-dds-router collab-dds-router 1 2022-09-14 11:40:51.67619388 +0300 EEST deployed collab-dds-router-0.1.0 0.5.0-beta.9 collectd telemetry 1 2022-09-13 17:14:10.903887379 +0300 EEST deployed collectd-0.1.0 1 fleet fleet-management 1 2022-09-14 13:23:47.082994841 +0300 EEST deployed fleet-0.2.0 2022.3.0 grafana telemetry 1 2022-09-13 17:15:27.339867512 +0300 EEST deployed grafana-6.16.13 8.2.0 harbor-app harbor 1 2022-09-13 17:06:59.18688859 +0300 EEST deployed harbor-1.7.4 2.3.4 nfd-release smartedge-system 1 2022-09-13 17:12:20.988514637 +0300 EEST deployed node-feature-discovery-0.2.0 v0.9.0 onboarding onboarding 1 2022-09-14 15:04:07.609923463 +0300 EEST deployed onboarding-0.1.0 2022.3.0 **onboarding-pengo onboarding-pengo 4 2022-09-16 13:19:26.690734294 +0300 EEST deployed onboarding-pengo-0.1.18 2022.3.0** ovms ovms-tls 1 2022-09-14 11:29:31.642868313 +0300 EEST deployed ovms-tls-0.2.0 2022.3.0 prometheus telemetry 1 2022-09-13 17:13:40.166305066 +0300 EEST deployed prometheus-14.9.2 2.26.0 statsd-exporter telemetry 1 2022-09-13 17:14:01.640302724 +0300 EEST deployed prometheus-statsd-exporter-0.4.10.22.1
  2. Create the /var/amr/helm-charts/ directory:
    $ mdkir -p /var/amr/helm-charts/
  3. If you are onboarding with a Cogniteam* Pengo robot, make a copy of the AMR_server_containers/01_docker_sdk_env/docker_orchestration/ansible-playbooks/01_amr/onboarding-pengo directory:
    $ cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_<version>/AMR_server_containers/01_docker_sdk_env/docker_orchestration/ansible-playbooks/01_amr/ $ cp -r onboarding-pengo onboarding-pengo2
  4. To create a new version of a Helm* chart, increment the version field in the
    Chart.yaml
    file:
    $ nano onboarding_pengo2/helm_onboarding_pengo/Chart.yaml $ cat onboarding_pengo2/helm_onboarding_pengo/Chart.yaml apiVersion: v2 appVersion: 2022.3.0 description: A helm chart for onboarding-pengo name: onboarding-pengo type: application **version: 0.1.20**
  5. Move the new Helm* chart to /var/amr/helm-charts/.
    $ mv onboarding_pengo2 /var/amr/helm-charts
  6. On the ThingsBoard* dashboard, click
    Trigger AOTA
    .
  7. Select:
    • App: application as App
    • Command: update
    • Container Tag: onboarding-pengo
    • Version:
  8. Click
    Send
    , and observe the logs in the ThingsBoard* bottom screen.
    Known issue: A timeout error occurs after clicking
    Send
    because the AOTA request message is rerouted to the Intel® Smart Edge Open server, and the robot never receives the request.
    Expected results:
    • On the Intel® Smart Edge Open server, check the mqtt_aota service status. It should look similar to the following.
      $ systemctl status mqtt_aota ● mqtt_aota.service - MQTT Broker AOTA Service Loaded: loaded (/etc/systemd/system/mqtt_aota.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2022-09-16 10:42:39 EEST; 1 day 4h ago Main PID: 934368 (python3) Tasks: 2 (limit: 618670) Memory: 15.2M CGroup: /system.slice/mqtt_aota.service └─934368 /usr/bin/python3 /usr/local/bin/mqtt_onboard_aota.py sep 17 15:38:26 glaic3edge02 python3[3951685]: + helm_extra_args+=(--set "env_label=${OPT_ENV_LABEL}") sep 17 15:38:26 glaic3edge02 python3[3951736]: + cd /var/amr/helm-charts/onboarding_pengo2/helm_onboarding_pengo sep 17 15:38:26 glaic3edge02 python3[3951736]: + helm upgrade --install onboarding-pengo . --namespace onboarding-pengo --set env.whoami=root --set hostIP=10.237.23.136:30003 --set 'node_names={glaic3pengo1}' --set tier_label=BasicFleetManagement --set env_label=tutorial sep 17 15:38:27 glaic3edge02 python3[3951737]: **Release "onboarding-pengo" has been upgraded. Happy Helming!** sep 17 15:38:27 glaic3edge02 python3[3951737]: NAME: onboarding-pengo sep 17 15:38:27 glaic3edge02 python3[3951737]: LAST DEPLOYED: Sat Sep 17 15:38:26 2022 sep 17 15:38:27 glaic3edge02 python3[3951737]: NAMESPACE: onboarding-pengo sep 17 15:38:27 glaic3edge02 python3[3951737]: STATUS: deployed sep 17 15:38:27 glaic3edge02 python3[3951737]: REVISION: 5 sep 17 15:38:27 glaic3edge02 python3[3951737]: TEST SUITE: None
    • On the Intel® Smart Edge Open server, the Helm* chart version is renewed to a newer version.
      $ helm list -A NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION cadvisor telemetry 1 2022-09-13 17:14:17.731573771 +0300 EEST deployed cadvisor-0.1.0 1 cert-manager cert-manager 1 2022-09-13 17:05:37.960015552 +0300 EEST deployed cert-manager-v1.6.1 v1.6.1 collab collab 1 2022-09-14 11:41:31.420169905 +0300 EEST deployed collab-0.1.0 2022.3.0 collab-dds-router collab-dds-router 1 2022-09-14 11:40:51.67619388 +0300 EEST deployed collab-dds-router-0.1.0 0.5.0-beta.9 collectd telemetry 1 2022-09-13 17:14:10.903887379 +0300 EEST deployed collectd-0.1.0 1 fleet fleet-management 1 2022-09-14 13:23:47.082994841 +0300 EEST deployed fleet-0.2.0 2022.3.0 grafana telemetry 1 2022-09-13 17:15:27.339867512 +0300 EEST deployed grafana-6.16.13 8.2.0 harbor-app harbor 1 2022-09-13 17:06:59.18688859 +0300 EEST deployed harbor-1.7.4 2.3.4 nfd-release smartedge-system 1 2022-09-13 17:12:20.988514637 +0300 EEST deployed node-feature-discovery-0.2.0 v0.9.0 onboarding onboarding 1 2022-09-14 15:04:07.609923463 +0300 EEST deployed onboarding-0.1.0 2022.3.0 **onboarding-pengo onboarding-pengo 5 2022-09-17 15:38:26.58658014 +0300 EEST deployed onboarding-pengo-0.1.20 2022.3.0** ovms ovms-tls 1 2022-09-14 11:29:31.642868313 +0300 EEST deployed ovms-tls-0.2.0 2022.3.0 prometheus telemetry 1 2022-09-13 17:13:40.166305066 +0300 EEST deployed prometheus-14.9.2 2.26.0 statsd-exporter telemetry 1 2022-09-13 17:14:01.640302724 +0300 EEST deployed prometheus-statsd-exporter-0.4.10.22.1

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.