Age | Commit message (Collapse) | Author |
|
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>
|
|
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
|
|
|
|
* [CIT-273] Run certificate creation as mosquitto
* [CIT-273] Add integration test
* [CIT-273] Fix windows build & test
* [CIT-273] Fix $PATH in integration tests
* [CIT-273] Cargo fmt
* [CIT-273] Fix users mod.
* [CIT-273] Update the user model
* [CIT-273] Make UserManager not Send
* [CIT-273] Improve test
Remove the dev-dependencies to openssl
* [CIT-273] Workaround test
* [CIT-273] Cargo fmt
* [CIT-273] Ensure UserGuard is !Send
* [CIT-273] Add a constant ROOT_USER
* [CIT-273] Removing unnecessary clone
* [CIT-273] Remove dead code
* [CIT-273] Improve message on panic
* [CIT-273] Add `tedge-user` feature to tag integration tests
* [CIT-273] Cargo fmt
* [CIT-273] Inject an ExecutionContext
* [CIT-273] Cargo fmt
Co-authored-by: Wenzek <diw@softwareag.com>
|
|
|
|
Co-authored-by: Wenzek <diw@softwareag.com>
|
|
* [CIT-280] Show certificate thumbprint
* [CIT-280] create a new function to show thumbprint
* [CIT-280] refactored code and added a tests to verify the thumbprint
* [CIT-280] replace openssl with b64|sha1
* [CIT-280] fixed a typo in test name
* [CIT-280] Fixed tests to avoid updaing tedge.toml
Co-authored-by: Pradeep K J <pradeekumar.kj@softwareag.com>
|
|
* [CIT-264] Adding postinst script for tedge debian package.
The posinst script contains creation of
- users
- groups
- /etc/tedge folder
- file to /etc/sudoers.d
* Extended comments with --gecos arguments
moved the postinst script to new place to be aligned with tedge-mapper
* changed to check for already existent users and groups
using install for directory creation in one command
* Update configuration/debian/tedge/postinst
Co-authored-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
* Update configuration/debian/tedge/postinst
Co-authored-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
* removed optionsystemd-units = { enable = false }
Co-authored-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
|
|
* Add tedge cert upload c8y command.
* Add url split to remove port number.
|
|
Co-authored-by: Wenzek <diw@softwareag.com>
|
|
* Add feature
* Add integration test feature
* Add feature also to mapper
* Use feature integration-test
* Also disable use statements to avoid warnings
... when feature is not active
* Refactor: move use statements into function
* Add feature and move tests to tests folder
* Remove tests that depend on HOME
* run cargo fmt
|