0.13.0 - New MQTT V1 API
What's Changed in 0.13.0 (Summary)
New Features
Support for any linux distribution
A lot of hard work has gone into supporting thin-edge.io on any linux distribution. A new revamped installation script will automatically detect your linux distribution whether it is Ubuntu/Debian, Rocky Linux, Alpine or Poky (yocto), we have you covered.
thin-edge.io now publishes packages on cloudsmith in the following formats:
- deb (Debian/Ubuntu)
- apk (Alpine Linux)
- rpm (RHEL/Fedora/Rocky Linux/Alma Linux)
- tarball (for any other linux distribution without one of the above package managers)
The documentation has been updated to included the new simplified instructions so that you can deploy thin-edge.io in a simple memorable one-liner on your preferred linux distribution.
Community support for additional service managers (e.g. for distributions without systemd)
The support for additional service managers has been extended (via the community) allowing thin-edge.io to run seamlessly on linux distributions that don't have systemd installed.
The following service managers are provided along with an easy to use install script which will auto detect the correct system manager for your system (if you don't really know or care about which service manager to use):
- sysvinit
- openrc
- runit
- s6-overlay
- supervisord
Check out the documentation for more details.
New MQTT API te/ topics
The new thin-edge.io MQTT API has been implemented to provide a consistent interface across the entire topic.
This release marks the transition from the now deprecated tedge/#
topics to the new te/#
topics. The new te/#
topics implement the same features as the legacy interface plus much more.
The new MQTT API documents the full interface and brings the following functionality:
- Device/service registration via MQTT
- Publishing telemetry data to any device, child device or service on running on either types
- All metrics now support a custom type in the topic
- Public interface to send commands on the local
te/
topic - More reliable processing of commands by leveraging MQTT retained messages for state transitions
- Support custom root prefixes (e.g. being able to replace
te/
with a custom prefix) - Support for updating digital twin data such as custom fragments (
twin
) - thin-edge.io errors are published on the
te/errors
topic (replacingtedge/errors
)
Services are now registered in Cumulocity IoT under new external identities, which will result in duplicated services in the cloud. The renaming was done so that the external identities would be consistent across all entities (child devices, services etc.). If you don't want to see the older services, then you they can be deleted by using the Cumulocity API or using tools such as go-c8y-cli, for example:
c8y devices list --query "c8y_Agent.name eq 'thin-edge.io'" --includeAll \
| c8y devices services list --includeAll \
| c8y identity list --filter "externalId notlike '*:*'" \
| c8y inventory delete
If you are having trouble with removing the old services then please reach out to us and we can offer assistance!
Local Cumulocity IoT API proxy #2261, #2230
A local Cumulocity IoT API proxy is provided by default to simplify accessing the Cumulocity IoT REST api from 3rd party components which makes requesting a local JWT token a thing of the past!
Check out the documentation for more details.
Generic configuration and log plugins
The c8y-configuration-plugin
and c8y-log-plugin
plugins have been refactored to be cloud agnostic. The plugins now only rely on the thin-edge.io interface (both local MQTT and API).
The table below shows the package names which are deprecated and their replacements:
Deprecated Package | New Package |
---|---|
c8y-configuration-plugin | tedge-configuration-plugin |
c8y-log-plugin | tedge-log-plugin |
Note: In the near future, the c8y-firmware-plugin
will also be refactored, but it didn't make it into this release.
Since the plugins are now cloud agnostic, the configuration files used by the plugins have been relocated to the following paths, but don't worry this happens automatically during initialization of each plugin.
/etc/tedge/c8y/c8y-configuration-plugin.toml
➡️/etc/tedge/plugins/tedge-configuration-plugin.toml
/etc/tedge/c8y/c8y-log-plugin.toml
➡️/etc/tedge/plugins/tedge-log-plugin.toml
Re-using thin-edge.io plugins on child device
With the changes to the thin-edge.io MQTT API and the rewriting of the generic plugins, it enabled us to be able to run the same plugins either on the main device (e.g. the current/default setup) or on a child device. This allows you to reduce the amount of could you have to write even further.
The following plugins can be run either in main or child device mode:
- tedge-agent (software management)
- tedge-log-plugin (log management)
- tedge-configuration-plugin (configuration management)
Detailed documentation and examples are not yet available, however they will be updated in the next coming weeks. However below shows a brief example how to run the tedge-agent on a child device to provide software management on child devices:
tedge-agent --mqtt-device-topic-id "device/child1//"
~80% Reduction of installation size - #2295
thin-edge.io installation size has dramatically decreased from ~40MB down to 8MB by packaging the binaries as a single "multi-call" binary. This is a significant step forward to reducing the overall footprint to allow running thin-edge.io on even smaller devices.
Minor changes
- cli: Allow log filtering with $RUST_LOG by @Bravo555 in #2130
- cli: use tedge instead of mosquitto as owner of mosquitto files/folders by @reubenmiller in #2156
- feat(azure): extend supported topics on Azure IoT Hub bridge by @reubenmiller in #2278
- general: Disable lock file if directory does not exist or no permissions by @Ruadhri17 in #2190
- general: Handle binary uploads/downloads without attempting conversion to UTF-8 by @jarhodes314 in #2319
- general: tedge-agent creates /var/tedge/cache directory on start-up by @rina23q in #2293
- monitoring(collectd): increase the default intervals to avoid spamming iot platforms by @reubenmiller in #2141
- mqtt: allow non-root users to read mosquitto configuration files by @Ruadhri17 in #2269
- mqtt: Implement a converter that bridges the old MEA (measurements, events and alarms) topics to the new ones by @PradeepKiruvale in #2125
- troubleshooting: Add support for
config-dir
flag to c8y-remote-access-plugin by @Ruadhri17 in #2211 - troubleshooting: Check if sudo is available when using tedge agent operations by @Ruadhri17 in #2224
Bug fixes
- cli: Exit with code 0 if service manager not present by @Ruadhri17 in #2204
- cli: Fix the wrong exit code after the cloud connection test failure by @Ruadhri17 in #2182
- cli: tedge connect c8y --test must not use a persistent MQTT session by @didier-wenzek in #2209
- configuration: Fix: plugins don't update their internal representation of config files on file change by @Ruadhri17 in #2262
- installation: explicitly remove all packages to avoid problems when dependencies are changed by @reubenmiller in #2124
- installation: remove sudo dependency from installation scripts
- mapper(aws): tedge-mapper-aws health message uses two different timestamp formats for up and down messages by @PradeepKiruvale in #2320
- mapper(aws): tedge-mapper-aws prints errors for known non-json mosquitto bridge health status messages by @PradeepKiruvale in #2247
- mapper(azure): azure tedge mapper fails to translate health status messages by @PradeepKiruvale in #2273
- mapper(c8y): Avoid subscribing to s/dcr and forwarding s/ucr by @jarhodes314 in #2173
- mapper(c8y): Use MQTT clean session for the mosquitto c8y bridge connection by @jarhodes314 in #2171
- mqtt: Adding missing tests for c8y-log-manager and fixing a bug that causes mqtt actor termination by @Ruadhri17 in #2161
- mqtt: Don't log authentication configuration when connecting to MQTT broker by @Bravo555 in #2249
- mqtt: Enable concurrent processing of incoming and outgoing MQTT messages by @jarhodes314 in #2327
- mqtt: Fix tedge agent's mqtt actor termination when wrong payload was parsed by @Ruadhri17 in #2241
- packaging: prevent tedge-agent service stoppage when upgrading from tedge_agent by @reubenmiller in #2360
- packaging: remove symlink using rm -f instead of using conditional logic by @reubenmiller in #2116
- software: Add test for sm plugin max packages (and fixes) by @gligorisaev in #2198
- software: Fix config and help command issues for tedge apt plugin by @Ruadhri17 in #2117
- tedge init: add missing group permissions on base config_dir by @reubenmiller in #2140
- telemetry: Clearing an alarm causes an EOL error by @PradeepKiruvale in #2162
- telemetry: Fix device_id lookup while sending large events over HTTP #2234 by @albinsuresh in #2239
- troubleshooting: Run remote access plugin with correct executable path in child process by @Ruadhri17 in #2277
- troubleshooting: Sync file on atomically_write_file by @didier-wenzek in #2152
- troubleshooting: use auto versioning to align with other components by @reubenmiller in #2120
Docs
-
Include references to the tedge-demo-container to help users get started quickly without requiring a physical device
- Update README.md by @nneuerburg in #2296
- Update overview.md by @nneuerburg in #2298
-
Document the agent and the device management API by @didier-wenzek in #2235
What's Changed in 0.13.0 (full list)
- docs: fix broken links in readme and install script by @reubenmiller in #2104
- docs(mqtt): expose new mqtt proposals to the public docs by @reubenmiller in #2105
- docs: fix broken doc references by @reubenmiller in #2107
- tedge-log-plugin specification by @rina23q in #2069
- docs: add more markdown examples for te2mqtt and the proposal banner by @reubenmiller in #2106
- docs: use links to files instead of folders to avoid unnecessary redirects by @reubenmiller in #2111
- Move all telemetry test to same directory by @PradeepKiruvale in #2114
- fix(config): removing escaped newline char shown in console message by @reubenmiller in #2115
- fix(tedge-apt-plugin): remove symlink using rm -f instead of using conditional logic by @reubenmiller in #2116
- Fix config and help command issues for tedge apt plugin by @Ruadhri17 in #2117
- docs(mqtt): use explicit v1 format to prevent conversion to legacy mqtt api by @reubenmiller in #2121
- fix(c8y-remote-access-plugin): use auto versioning to align with other components by @reubenmiller in #2120
- refactor(uninstall): explicitly remove all packages to avoid problems when dependencies are changed by @reubenmiller in #2124
- tests(lock): improve pid detection logic by using more precise matches by @reubenmiller in #2126
- fix(build): use fixed ziglang 0.10.1 due to build issue with 0.11.0 by @reubenmiller in #2128
- fix(install): improve maintainer script compatibility in preparation for future package support by @reubenmiller in #2123
- Update c8y-mapper and tedge-log-plugin specs by @rina23q in #2127
- fix(install): improve reliability of latest version detection by using non rate limited api by @reubenmiller in #2129
- tedge-configuration-plugin specification by @rina23q in #2097
- chore: add maintainer scripts from existing debian packages for later comparison by @reubenmiller in #2133
- test(ci): reduce PR test report output by hiding passed tests by @reubenmiller in #2134
- chore: add c8y-configuration-plugin maintainer scripts in preparation for new packaging by @reubenmiller in #2135
- Implement a converter that bridges the old MEA topics to the new ones by @PradeepKiruvale in #2125
- fix the order of child id in the tedge topics by @PradeepKiruvale in #2139
- feat: extended linux package support by @reubenmiller in #2138
- Ignore codecov send errors by @Bravo555 in #2144
- build(ci): publish virtual linux packages to armv6 repo by @reubenmiller in #2145
- chore: fix typos in comments by @reubenmiller in #2146
- tedge legacy health messages are not being republished on the te/ topic with the retained flag by @PradeepKiruvale in #2149
- docs(install): update installation guide to detail installing thin-edge.io on any distribution by @reubenmiller in #2148
- Deprecate old TEdgeConfig by @didier-wenzek in #2143
- fix(tedge init): add missing group permissions on base config_dir by @reubenmiller in #2140
- docs(install): update init system instructions by @reubenmiller in #2155
- dev(checks): use zigbuild to run just check task if it is available by @reubenmiller in #2157
- feat(cli): use tedge instead of mosquitto as owner of mosquitto files/folders by @reubenmiller in #2156
- Sync file on atomically_write_file by @didier-wenzek in #2152
- Digital twin by @Bravo555 in #2122
- Fix cargo doc tedge_config_macros error by @Bravo555 in #2160
- build: update cargo-zigbuild to support ziglang 0.11.0 by @reubenmiller in #2165
- Clearing an alarm causes an EOL error by @PradeepKiruvale in #2162
- fix(tests): use more portable bash shebang to prevent units test from failing by @reubenmiller in #2163
- Write error log if updating entity store fails by @Bravo555 in #2164
- Create generic tedge log plugin by @Ruadhri17 in #2086
- Use MQTT clean session for the mosquitto c8y bridge connection by @jarhodes314 in #2171
- Avoid subscribing to s/dcr and forwarding s/ucr by @jarhodes314 in #2173
- Adding missing tests for c8y-log-manager and fixing a bug that causes mqtt actor termination by @Ruadhri17 in #2161
- Fix clippy lints for rust 1.73 by @Bravo555 in #2177
- Allow log filtering with $RUST_LOG by @Bravo555 in #2130
- Entity store: change constructors to remove redundant clones and rename fields by @Bravo555 in #2176
- Update c8y-mapper to consume
te
measurements by @didier-wenzek in #2169 - The mapper must not forward expired JWT tokens to the agent by @PradeepKiruvale in #2178
- Fix cargo audit vulnerabilities: rustls-webpki by @didier-wenzek in #2180
- Fix the wrong exit code after the cloud connection test failure by @Ruadhri17 in #2182
- build(deps): Bump joonvena/robotframework-reporter-action from 2.2 to 2.3 by @dependabot in #2193
- Address clippy warnings with 1.72 cargo clippy by @PradeepKiruvale in #2194
- Inherit the dependencies from the workspace by @PradeepKiruvale in #2186
- packaging: align version schema used in packaging by @reubenmiller in #2188
- build: limit clap version to 4.2.x to prevent MSRV bump to 1.70 by @reubenmiller in #2195
- build: install cargo-zigbuild using latest stable version by @reubenmiller in #2196
- dev: activate python venv before calling integration tests by @reubenmiller in #2191
- Abstract thin-edge MQTT topic schema by @didier-wenzek in #2189
- Disable lock file if directory does not exist or no permissions by @Ruadhri17 in #2190
- Refactoring c8y upload file API and renaming of LogRequest struct by @rina23q in #2203
- test: integration test improvements by updating libraries and reducing apt packages by @reubenmiller in #2197
- Add test for sm plugin max packages (and fixes) by @gligorisaev in #2198
- Remove webpki crate - resolves #2183 by @Bravo555 in #2185
- inherit clap and toml crates from workspace by @PradeepKiruvale in #2206
- Fix: tedge connect c8y --test must not use a persistent MQTT session by @didier-wenzek in #2209
- Exit with code 0 if service manager not present by @Ruadhri17 in #2204
- C8y mapper handling c8y_LogfileRequest by @albinsuresh in #2108
- fix: align tedge-log-plugin settings by @reubenmiller in #2212
- Fix
download
crate unit tests not terminating by @Bravo555 in #2210 - Update tedge plugin specs after c8y-mapper change by @rina23q in #2216
- build(deps): Bump actions/checkout from 3 to 4 by @dependabot in #2218
- CI: Free some disk space by deleting unneeded SDKs by @Bravo555 in #2217
- Forward measurement type to c8y by @PradeepKiruvale in #2219
- Fix panic in tedge_config macro when
-
present in field name by @Bravo555 in #2220 - docs(health): fix header level to produce an anchor which can be referenced by @reubenmiller in #2230
- docs(collectd): align installation instructions and avoid installing unnecessary packages by @reubenmiller in #2229
- chore(tests): bump python requests lib due to security notification by @reubenmiller in #2228
- chore(deps): update dependencies which required Rust 1.70 by @reubenmiller in #2227
- Events for c8y are consumed from te/+/+/+/+/e/+ by @rina23q in #2221
- Add some logs and fix formatting by @Bravo555 in #2233
- build: limit cargo-zigbuild version due to bug in newly released version by @reubenmiller in #2240
- Add netcat, netstat, and ping to test image by @Bravo555 in #2232
- Add support for
config-dir
flag by @Ruadhri17 in #2211 - Check if sudo is available when using tedge agent operations by @Ruadhri17 in #2224
- Fix tedge agent's mqtt actor termination when wrong payload was parsed by @Ruadhri17 in #2241
- c8y-log-plugin fails to upload binary due to 401 error by @PradeepKiruvale in #2226
- Add
mqtt.topic_root
andmqtt.device_topic_id
options by @Bravo555 in #2231 - Fix device_id lookup while sending large events over HTTP #2234 by @albinsuresh in #2239
- feat: tedge-log-plugin packaging and tests by @reubenmiller in #2213
- chore(build): update cargo-zigbuild version by @reubenmiller in #2248
- fix(build): update python version used to publish linux packages by @reubenmiller in #2254
- fix(build): remove c8y-log-plugin as the ci_pipeline uses the list to install all the packages by @reubenmiller in #2255
- Don't log authentication configuration when connecting to MQTT broker by @Bravo555 in #2249
- remove trailing full stop in log entries as it is unnecessary by @reubenmiller in #2252
- Fix: plugins don't update their internal representation of config files on file change by @Ruadhri17 in #2262
- tedge-agent: disable converter and file transfer if running as child device by @Bravo555 in #2265
- chore(collectd): increase the default intervals to avoid spamming iot platforms by @reubenmiller in #2141
- Add support for permission in download request by @Ruadhri17 in #2264
- chore(build): switch from unmaintained users crate to fork to fix security warning by @reubenmiller in #2268
- tedge-mapper-aws prints errors for known non-json mosquitto bridge health status messages by @PradeepKiruvale in #2247
- test: check registration of log file request capability by @reubenmiller in #2270
- Change tedge mosquitto configuration file permissions to 644 by @Ruadhri17 in #2269
- Add c8y auth proxy by @jarhodes314 in #2261
- c8y-mapper consume the "te" new alarm mqtt scheme by @rina23q in #2267
- feat(az): extend supported topics on Azure IoT Hub bridge by @reubenmiller in #2278
- Ignore flaky test_file_transfer_http_methods test by @Bravo555 in #2287
- fix(packaging): use release suffix in version dependency to avoid version mismatches by @reubenmiller in #2286
- Restart operation on child-devices by @didier-wenzek in #2245
- Improve error handling and fix query string handling by @jarhodes314 in #2284
- azure tedge mapper fails to translate health status messages by @PradeepKiruvale in #2273
- Create generic tedge configuration plugin by @Ruadhri17 in #2238
- Use serde tag enum representation for CommandStatus by @didier-wenzek in #2290
- Run remote access plugin with correct executable path in child process by @Ruadhri17 in #2277
- C8y mapping of entity registration messages by @albinsuresh in #2266
- Accept any type as the key of the downloader actor by @rina23q in #2291
- Aws mapper using te topic for measurements by @PradeepKiruvale in #2289
- fix the service measurement topic by @PradeepKiruvale in #2299
- tedge-agent creates /var/tedge/cache directory on start-up by @rina23q in #2293
- Fix integer underflow in EntityTopicId parsing by @Bravo555 in #2300
- Resolve RUSTSEC-2023-0065 by @Bravo555 in #2306
- Make tedge a multi-call binary by @jarhodes314 in #2295
- move aws mapper tests into separate directory by @PradeepKiruvale in #2309
- Fix 2311: don't publish c8y register message twice by @Bravo555 in #2312
- Azure mapper using te topics for telemetry by @PradeepKiruvale in #2304
- Update README.md by @nneuerburg in #2296
- Update overview.md by @nneuerburg in #2298
- Parse log plugin topics using new mqtt schema by @Ruadhri17 in #2305
- Handle binary uploads/downloads without attempting conversion to UTF-8 by @jarhodes314 in #2319
- Do not change XIDs of child devices created via ops dir watcher by @albinsuresh in #2310
- tedge-mapper-aws health message uses two different timestamp formats for up and down messages by @PradeepKiruvale in #2320
- Support
Arc<str>
for fields intedge_config
by @jarhodes314 in #2325 - Enable concurrent processing of incoming and outgoing MQTT messages by @jarhodes314 in #2327
- fix: add missing build.rs script to use the auto generated git based versioning by @reubenmiller in #2338
- Simplify tedge downloader tests to improve the debugging experience by @jarhodes314 in #2336
- refactor to use lib file to enable calling from the multi-call binary by @reubenmiller in #2339
- Add configuration operation support to c8y-mapper by @rina23q in #2303
- Add try_get() and try_get_by_external_id() to entity_store by @rina23q in #2340
- feat: allow non-root users to read c8y-bridge configuration file by @reubenmiller in #2334
- Add reference documentation for
c8y_auth_proxy
by @jarhodes314 in #2330 - Create uploader actor by @Ruadhri17 in #2302
- Test improvements by @jarhodes314 in #2331
- MQTT test helpers to ease MqttMessage assertions by @albinsuresh in #2342
- Rename c8y.enable.log_management to c8y.enable.log_upload by @rina23q in #2341
- Modify Actor trait to take
self
instead of&mut self
by @jarhodes314 in #2329 - Move c8y-mapper to new health topics by @Bravo555 in #2276
- MQTT twin/ topic support for Cumulocity inventory updates by @reubenmiller in #2280
- Updates to devcontainer definition by @albinsuresh in #2352
- Remove old health topics from c8y mapper by @Bravo555 in #2353
- build: use fallback version when git describe only returns a hash by @reubenmiller in #2359
- fix: prevent tedge-agent service stoppage when upgrading from tedge_agent by @reubenmiller in #2360
- Health check on
te/.../cmd/health/check
by @Bravo555 in #2358 - send measurement to main/child device services by @PradeepKiruvale in #2335
- System test for clearing inventory fragments via twin/ topic by @albinsuresh in #2356
- Bump actions/setup-node from 3 to 4 by @dependabot in #2367
- fix placement of assertions due to a git merging error by @reubenmiller in #2374
- Fix ambiguous failure reason in uploader by @Ruadhri17 in #2373
- Switch to tedge-configuration-plugin by @reubenmiller in #2368
- Health status on AWS and Azure mappers by @Bravo555 in #2364
- docs: fix registration examples by @reubenmiller in #2376
- Replace c8y-configuration-management doc by tedge- by @rina23q in #2380
- Support for software list & update on child devices by @didier-wenzek in #2307
- Document the agent and the device management API by @didier-wenzek in #2235
- docs: fix broken links and references to tedge-configuration-plugin by @reubenmiller in #2382
- fix: support sending previously cleared twin property value by @reubenmiller in #2369
- use mqtt v1 in docs by @reubenmiller in #2384
- docs: remove the proposal banners by @reubenmiller in #2388
- Health status documentation by @Bravo555 in #2375
- fix #2383: Use "service" if service type missing by @Bravo555 in #2385
- Fix auto-registration of child device op dirs #2389 by @albinsuresh in #2393
- Use mqtt v1 topic to publish thin-edge.io errors to, e.g. te/errors by @PradeepKiruvale in #2386
- Add requester prefix with timestamp to command operations by @Ruadhri17 in #2381
- docs: fix some docs mistakes introduced by #2375 by @Bravo555 in #2395
- Tedge operation plugins to migrate legacy config file contents by @albinsuresh in #2399
- docs: fix typo in tedge-configuration-management by @Bravo555 in #2400
- Add a BridgeConfig field to include or not local_cleansession by @didier-wenzek in #2398
- tests: skip benchmarking tests by default by @reubenmiller in #2402
New Contributors
- @nneuerburg made their first contribution in #2296
Full Changelog: 0.12.0...0.13.0