Age | Commit message (Collapse) | Author |
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
Signed-off-by: Marcel Müller <m.mueller@ifm.com>
|
|
Signed-off-by: Marcel Müller <m.mueller@ifm.com>
|
|
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>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
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>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Signed-off-by: Marcel Müller <m.mueller@ifm.com>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
This reverts commit 52031edacfac8f4ba6d4d9af27bb5951b80636a4.
|
|
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>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
* 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>
|
|
Co-authored-by: Versioneer <info@thin-edge.io>
|
|
* (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>
|
|
* 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>
|
|
Co-authored-by: Versioneer <info@thin-edge.io>
Co-authored-by: Sebastian Büttner <sebastian.buettner@softwareag.com>
|
|
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>
|
|
* (cargo release) bump version 0.4
|
|
* Update all dependencies for 0.4
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
|
|
Co-authored-by: Versioneer <info@thin-edge.io>
|
|
Co-authored-by: Versioneer <info@thin-edge.io>
|
|
* [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>
|
|
|
|
* (cargo release) bump version
Co-authored-by: Versioneer <info@thin-edge.io>
|
|
* 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>
|
|
components (#358)
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
|
|
Co-authored-by: Versioneer <info@thin-edge.io>
|
|
* 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.
|
|
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
|
|
* (cargo release) bump version
Co-authored-by: Versioneer <info@thin-edge.io>
|
|
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>
|
|
* This removes lots of complexity
* No need to maintain a separate branch of rumqttc.
|
|
Co-authored-by: Versioneer <info@thin-edge.io>
|
|
|
|
* Cargo outdated
* Update the version of the rcgen crate to actually zeroize the keys
Co-authored-by: Wenzek <diw@softwareag.com>
|
|
* [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>
|
|
* [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>
|
|
- 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.
|
|
(#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)
|
|
Updating email to info@thin-edge.io
|