summaryrefslogtreecommitdiffstats
path: root/tedge/Cargo.toml
AgeCommit message (Collapse)Author
2022-07-01Split binary in CLI lib and main() shimMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-24Adapt errors to miette interfaceMarcel Müller
Signed-off-by: Marcel Müller <m.mueller@ifm.com>
2022-05-24Adapt tedge binary to new error typesMarcel Müller
Signed-off-by: Marcel Müller <m.mueller@ifm.com>
2022-05-13Merge branch 'feature/add_tedge_api/self-describing-configuration-types' ↵Matthias Beyer
into feature/add_tedge_api_impl This merge brings in self-describing configuration type functionality, so that we can `tedge-cli doc <plugin_name>` for getting the documentation for the configuration of a plugin named `<plugin_name>`. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-13Add tracy compatible tracing outputMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-13Add tracing-chrome capabilitiesMatthias Beyer
This patch implements tracing capabilities using tracing_chrome, which can be enabled via a CLI flag that specifies the file to write to. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-13Redesign logging setupMatthias Beyer
This patch rewrites the logging setup in the CLI implementation in a way so that by default we get WARN and ERROR logging (which can be turned off completely if desired). If the user wants, they can specify `--logging info` for a bit more verbosity, or `--logging debug` for a lot more verbosity. If they feel confident, `--logging trace` drowns them in log output ;-) Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-13Make logging non-optionalMatthias Beyer
Before this patch, the logging code was optional in tedge-cli. But we always want to build this piece of code. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-13Remove console-subscriberMatthias Beyer
console-subscriber needs unstable tokio features and we do not want that right now to be included. This also simplifies building tedge-cli with all features enabled. Before, one had to specify them and to take care of not specifying "core_debugging", now `--all-features` should suffice. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-12Add CLI interface for printing plugin documentationMatthias Beyer
This patch adds a CLI interface for printing the plugin documentation using the new infrastructure for self-describing configuration objects. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-12Move doc-printing to CLI crateMatthias Beyer
This patch moves the terminal-printing-logic for the self-describing configuration types to the CLI crate implementation, as it should not reside in the API crate. The example is removed, as we're now implementing this in the CLI, so the best example we can get will be there shortly. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-10Wire up notification plugin in tedge-cliMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-04-20Integrate MQTT plugins into CLIMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-04-14Fix: Use miette with "fancy" feature in CLIMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-04-13Add measurement-filter plugin in CLIMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-04-13tedge-cli: Adapt for miette as error handling crateMatthias Beyer
This patch adapts the tedge-cli crate for the changes from commit 9ccd86589db8f9a72c4d7f545813e8da40b4d039 ("Replace PluginError with miette::Error") which replaced anyhow with miette. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-03-23Add httpstop plugin to tedge CLI implementationMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com> Signed-off-by: Marcel Müller <m.mueller@ifm.com>
2022-03-23Adapt tedge-cli to new core interfaceMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-03-23Revert "Remove plugin_log"Matthias Beyer
This reverts commit 52031edacfac8f4ba6d4d9af27bb5951b80636a4.
2022-03-23Remove plugin_logMatthias Beyer
Remove implementation, because the log plugin does not have a usecase anymore, not even for debugging. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com> Signed-off-by: Marcel Müller <m.mueller@ifm.com>
2022-03-17Add tedge-cli binaryMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2021-11-24Restructure directories of the workspace (#559)Lukasz Woznicki
* Restructure directories of the workspace * Rename c8y_translator_lib to c8y_translator * Update comment on how to get dummy plugin path Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-11-24(cargo release) bump version 0.4.3github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-11-11Patch version bump (#573)github-actions[bot]
* (cargo release) bump version * Update get-thin-edge_io.sh to 0.4.2 Co-authored-by: Versioneer <info@thin-edge.io> Co-authored-by: Lukasz Woznicki <75632179+makr11st@users.noreply.github.com>
2021-11-10[CIT 515] Fix the tests of the MQTT component. (#561)Didier Wenzek
* Add a test helper to except a message on MQTT * Fix doc string Signed-off-by: Wenzek <diw@softwareag.com> * Move the test_mqtt_server in a dev-dependency * The tests of the agent are not dependent of MQTT * Working around sub ack * Refactor the test message logger * Add test helper functions * Make test clearer * Use test helper functions to simplify the tests * Rename module * Launch the test MQTT broker just once * Encapsulate the port of the MQTT test broker * Display the first 30 bytes of the messages recieved by the test MQTT broker * Make serial the agent tests * Upgrade to rumqtt latest * Fix mqtt test broker log * Reproduce the issue with lost messages when the sm_mapper is down * Cargo fmt * Addressing comments * Update test * Remove test_serial attribute * Ignore test `tedge_agent_check_no_multiple_instances_running` * Run commit-workflow tests with no-fail-fast * ignore test requesting sudo * Make helper functions method of the test broker handler * Cargo fmt * Wait for the mapper under test to start Co-authored-by: Wenzek <diw@softwareag.com>
2021-10-29(cargo release) bump version (#538)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io> Co-authored-by: Sebastian Büttner <sebastian.buettner@softwareag.com>
2021-10-15Fix issue #495 (#511)Didier Wenzek
On `tedge connect` the configuration files are created in temporary files that are renamed once finalized. This rename cannot be done across file-systems, causing the issue #495. The fix is to create the temporary file along the target file in the same directory. Signed-off-by: Wenzek <diw@softwareag.com> Co-authored-by: Wenzek <diw@softwareag.com>
2021-10-14Release 0.4.0 (#493)Lukasz Woznicki
* (cargo release) bump version 0.4
2021-10-11Update all dependencies (#487)Lukasz Woznicki
* Update all dependencies for 0.4 Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-09-29(cargo release) bump version (#457)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-09-15(cargo release) bump version (#429)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-09-13[CIT-538] Directly use rumqttc to implement `tedge mqtt sub` (#418)Didier Wenzek
* [CIT-538] Directly use rumqttc to implement `tedge mqtt sub` * [CIT-538] Re-implement `tedge mqtt pub` directly on top of `rumqttc` * [CIT-538] Re-implementing `tedge connect c8y` directly on top of rumqttc * [CIT-538] Re-implement `tedge connect az` directly on top of rumqttc * [CIT-538] Remove last depencies to the `mqtt_client` library * [CIT-538] Fix typo * [CIT-538] Clean `tedge connect` output Co-authored-by: Wenzek <diw@softwareag.com>
2021-08-31Release 0.3.0 (#410)Lukasz Woznicki
2021-08-19Patch version bump (#390) 0.2.4github-actions[bot]
* (cargo release) bump version Co-authored-by: Versioneer <info@thin-edge.io>
2021-08-08[CIT-450] Tedge Agent - SM feature (#354)Lukasz Woznicki
* Add basic tedge_agent code and service * Add tedge_utils::fs atomically write file * Add short documentation notes for tedge_agent * Make sm-plugins path dynamic for agent * Update dependencies due to cargo audit hyper vuln Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-07-29Move utils from tedge cli to separate crate to be usable by other tedge ↵Lukasz Woznicki
components (#358) Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-07-21(cargo release) bump version (#352)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-07-13Add system service manager abstraction (#338)Michael Neumann
* Refactor code to use abstract `SystemServiceManager`. * Implement Debug for UserManager This simplifies code that embeds a `UserManager` and has to implement `Debug` on it's own as `Debug` cannot be automatically derived. * Add `SystemdServiceManager` * Add NullSystemServiceManager that always fail This can be used as fallback manager where commands that don't need a SystemServiceManager would still work. * Bring in support for OpenRC / BSD service(8) * Add feature flag "openrc" to override the default system service manager that is selected based on the target operation system. For instance, Gentoo has target_os = "linux", but uses OpenRC. OpenRC can also be used on other systems. * Code roughly based on PR #196.
2021-07-08Update crates dependencies versions (#337)Lukasz Woznicki
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-07-08Patch version bump to 0.2.2github-actions[bot]
* (cargo release) bump version Co-authored-by: Versioneer <info@thin-edge.io>
2021-07-05[CIT-403] Address issue with self signed certificates not allowed when ↵Lukasz Woznicki
uploading to certificate (#312) * Add `How to add self signed cert` how to guide * Add error extraction for webpki::Error from reqwest::Error Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-06-29Get rid of MqttClient#publish_with_ack functionality (#306)Michael Neumann
* This removes lots of complexity * No need to maintain a separate branch of rumqttc.
2021-06-23(cargo release) bump version (#308)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-06-09(cargo release) bump version (#284)Lukasz Woznicki
2021-06-04Cargo outdated (#268)Didier Wenzek
* Cargo outdated * Update the version of the rcgen crate to actually zeroize the keys Co-authored-by: Wenzek <diw@softwareag.com>
2021-06-03[CIT-394] fix build on windows (#267)Didier Wenzek
* [CIT-394] Create unix/windows module for flockfile * [CIT-394] Extract the `users` module into the `common/tedge_users` crate * [CIT-394] cargo fmt * [CIT-394] Use `tedge_users` rather than `users` Co-authored-by: Wenzek <diw@softwareag.com>
2021-04-13[CIT-218] Extract the device identifier from the device certificate (#176)Didier Wenzek
* [CIT-218] Extract certificate related code to a new crate * [CIT-218] Cargo fmt * [CIT-218] Add tests * [CIT-218] Add PemCertificate::subject_common_name() * [CIT-218] Cargo fmt Co-authored-by: Wenzek <diw@softwareag.com>
2021-04-07Refactor TEdge config (#155)Michael Neumann
- Refactor TEdgeConfig - Move configuration into `tedge_config` crate. - Add `ConfigSetting` trait. Each "thing" that we want to make configurable will have it's own struct-type. For example `struct DeviceIdSetting` or `C8yUrlSetting`. - The `ConfigSetting` trait does not provide any means of how to read/write/unset a configuration setting. It only provides the key, description and the value type of the setting, but no implementation. - Use trait `ConfigSettingAccessor` to implemenent `query`, `update` and `unset` methods. - `TEdgeConfigRepository` implements functionality to read/write a `TEdgeConfig`. The `TEdgeConfig` struct itself just holds data. - Add `TEdgeConfigLocation` which holds all data that we need to resolve the defaults in TEdgeConfig, including the name of the config file (TODO: we might want to split these two apart). The defaults differ depending on the location of the `tedge.toml`, whether it's located in `/etc` or a users `$HOME/.tedge` (or in tests). - Only add the `tedge_config` crate. `tedge` is currently not modified to use the new API. - Remove remaining `unwrap`s, also from tests - No longer create intermediate directories upon saving configuration # FOLLOW-UP TASKS - Refactor the `tedge` crate to use `tedge_config`. - Compute the `device.id` from the certificate stored in `device.cert.path`, if any. - Ensure that the config is updated only by `tedge config set/unset`. - Extend tedge_config_location to also manage the paths to the bridge configuration files. - Update `ConfigRepository::store()` to properly set file ownership.
2021-03-29two bug fixes: include in mosquitto config, maintainer script path of tedge ↵Sebastian Büttner
(#125) fixing to small bugs: include shouldn`t be added multiple times to mosquitto.conf maintainer scripts path for tedge should be relative to repo root (as in tedge-mapper)
2021-03-26feature/cit 290/update contact email (#123)Sebastian Büttner
Updating email to info@thin-edge.io