Skip to content

Commit

Permalink
Merge pull request #2382 from reubenmiller/fix-broken-links
Browse files Browse the repository at this point in the history
docs: fix broken links and references to tedge-configuration-plugin
  • Loading branch information
reubenmiller authored Oct 28, 2023
2 parents 0e42b37 + 5bc2b3a commit edba325
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 42 deletions.
33 changes: 13 additions & 20 deletions docs/src/operate/c8y/config_management_plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ With `thin-edge.io`, you can manage config files on a device by using the [Cumul
If you are new to the Cumulocity **Configuration Management** feature,
we recommend you to read [the Cumulocity user guide](https://cumulocity.com/guides/users-guide/device-management/#managing-configurations) along with this how-to guide.

The configuration management functionality is provided by the `c8y-configuration-plugin` package which is installed by default. If it is not installed then please install the components again following the [install guide](../../install/index.md).
The configuration management functionality is provided by the `tedge-configuration-plugin` package which is installed by default. If it is not installed then please install the components again following the [install guide](../../install/index.md).

## Getting started

Before starting anything, make sure [your device is connected to Cumulocity](../../start/connect-c8y.md).

**Step 1**
Open the file `/etc/tedge/c8y/c8y-configuration-plugin.toml` and add entries for the configuration files that you'd like to manage from Cumulocity cloud in the following format:
Open the file `/etc/tedge/plugins/tedge-configuration-plugin.toml` and add entries for the configuration files that you'd like to manage from Cumulocity cloud in the following format:

```toml title="file: /etc/tedge/c8y/c8y-configuration-plugin.toml"
```toml title="file: /etc/tedge/plugins/tedge-configuration-plugin.toml"
files = [
{ path = '/etc/tedge/tedge.toml', type = 'tedge.toml'},
{ path = '/etc/tedge/mosquitto-conf/c8y-bridge.conf', type = 'c8y-bridge.conf' },
Expand All @@ -34,39 +34,39 @@ files = [
* `type` is a unique alias for each file entry which will be used to represent that file in Cumulocity UI.
* `user`, `group` and `mode` are UNIX file permission settings to be used to create a configuration file. If not provided, the files will be created with `root` user. If the file exists already, its ownership will be retained.

For more details on this configuration file format, refer to the [reference guide](../../references/c8y-configuration-management.md#configuration).
For more details on this configuration file format, refer to the [reference guide](../../references/agent/tedge-configuration-management.md#configuration).

:::note
You can also configure the `c8y-configuration-plugin.toml` from the cloud later.
You can also configure the `tedge-configuration-plugin.toml` from the cloud later.
:::

**Step 2**
Start the configuration plugin process and enable it on boot by `systemctl` (recommended).

```sh
sudo systemctl enable c8y-configuration-plugin
sudo systemctl start c8y-configuration-plugin
sudo systemctl enable tedge-configuration-plugin
sudo systemctl start tedge-configuration-plugin
```

Alternatively, you can run the process directly.

```sh
sudo c8y-configuration-plugin
sudo tedge-configuration-plugin
```

**Step 3**
Navigate to your Cumulocity Device Management and the desired device. Open its **Configuration** tab.
You can find `c8y-configuration-plugin` and more are listed as supported configuration types, as declared in the plugin configuration file in step 1.
You can find `tedge-configuration-plugin` and more are listed as supported configuration types, as declared in the plugin configuration file in step 1.

![Cumulocity Configuration Management Upload](../../images/c8y-config-plugin-upload.png)

This is the configuration file of `c8y-configuration-plugin`, where you can add file entries that you want to manage with Cumulocity.
This is the configuration file of `tedge-configuration-plugin`, where you can add file entries that you want to manage with Cumulocity.

## Update c8y-configuration-plugin from Cumulocity
## Update tedge-configuration-plugin from Cumulocity

To update any configuration file, create a local copy of that config file and then upload that file to the [Cumulocity configuration repository](https://cumulocity.com/guides/users-guide/device-management/#to-add-a-configuration-snapshot) with the appropriate configuration type.

The `c8y-configuration-plugin.toml` file can also be updated from the cloud in a similar manner to add/remove further configuration file entries. The updated TOML file has to be uploaded with the configuration type: **c8y-configuration-plugin**.
The `tedge-configuration-plugin.toml` file can also be updated from the cloud in a similar manner to add/remove further configuration file entries. The updated TOML file has to be uploaded with the configuration type: **tedge-configuration-plugin**.

Then, go back to the **Configuration** tab of your desired device in Cumulocity.

Expand All @@ -78,11 +78,4 @@ You can choose the file that you uploaded from the **AVAILABLE SUPPORTED CONFIGU
After the operation created gets marked SUCCESSFUL, reload the page.
Then you can find new supported configuration types as you defined.

:::note
All configuration updates are notified over `tedge/configuration_change/<config-type>` MQTT topic, giving the opportunity to software components installed on the device or a child device to react to these updates.
For more details, refer to the [Notifications section of the specification](../../references/c8y-configuration-management.md#notifications).
:::

To get to know more about the `c8y-configuration-plugin`, refer to [Specifications of Device Configuration Management using Cumulocity](../../references/c8y-configuration-management.md).


To get to know more about the `tedge-configuration-plugin`, refer to [Specifications of Device Configuration Management using Cumulocity](../../references/agent/tedge-configuration-management.md).
2 changes: 1 addition & 1 deletion docs/src/operate/configuration/update_config_paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The following table captures the paths that can be changed, with their default l

The following daemons also need to be re-started after `data.path` is updated:

* `c8y-configuration-plugin`
* `tedge-configuration-plugin`
* `c8y-firmware-plugin`

## Example: Set a custom temporary directory path
Expand Down
2 changes: 1 addition & 1 deletion docs/src/operate/troubleshooting/monitor_tedge_health.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The following endpoints are currently supported:
* `tedge/health/tedge-mapper-aws`
* `tedge/health/tedge-mapper-collectd`
* `tedge/health/tedge-log-plugin`
* `tedge/health/c8y-configuration-plugin`
* `tedge/health/tedge-configuration-plugin`

All future tedge services will also follow the same topic naming scheme convention.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/operate/troubleshooting/thin_edge_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ tedge-mapper = "trace"
tedge-agent = "info"
tedge-watchdog = "debug"
tedge-log-plugin = "warn"
c8y-configuration-plugin = "error"
tedge-configuration-plugin = "error"
```

:::note
Expand Down
6 changes: 3 additions & 3 deletions docs/src/references/agent/restart-operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ sidebar_position: 4

Thin-edge defines a `restart` operation to restart a device, being the main device or a child device.

- A restart is typically triggered by a [mapper](../mappers) on behalf of a cloud operator.
- A restart is typically triggered by a [mapper](../mappers/index.md) on behalf of a cloud operator.
- A restart can also be triggered from another operation (as a software update)
or service (detecting for instance some anomalies requesting a reboot).
- `tedge-agent` is the reference implementation of the `restart` operation.
- However, a custom `restart` plugin implementation can be installed on a device with specific requirements.

## MQTT API

The `restart` operation API follows the [generic thin-edge rules for operations](device-management-api.md):
The `restart` operation API follows the [generic thin-edge rules for operations](./device-management-api.md):

- The `te/<device-topic-id>/cmd/restart` topic is used to tell the device `<device-topic-id>` can be restarted.
- Each `restart` request is given a `<command-id>` and a dedicated topic `te/<device-topic-id>/cmd/restart/<command-id>`,
where all the subsequent states of the restart command are published during its execution.
- The workflow is [generic with `"init"`, `"executing"`, `"successful"` and `"failed"` statuses](references/agent/device-management-api.md/#operation-workflow).
- The workflow is [generic with `"init"`, `"executing"`, `"successful"` and `"failed"` statuses](./device-management-api.md#operation-workflow).

### restart registration

Expand Down
12 changes: 6 additions & 6 deletions docs/src/references/agent/tedge-configuration-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Thin-edge provides an operation plugin to manage device configuration files.

* This management is bi-directional:
* A device can act as a reference,
with all the managed files being uploaded to the [tedge file transfer repository](tedge-file-transfer-service.md)
with all the managed files being uploaded to the [tedge file transfer repository](../tedge-file-transfer-service.md)
and stored there as a configuration snapshot.
* A configuration update can be pushed from the tedge file transfer repository to any devices of the same type,
i.e. supporting the same kind of configuration files.
Expand Down Expand Up @@ -60,12 +60,12 @@ As part of this plugin installation:
* On systemd-enabled devices, the service definition file for this plugin is also installed.

Once installed, the `tedge-configuration-plugin` runs as a daemon on the device,
listening to configuration snapshot commands on the `<root>/<identifier>/cmd/config_snapshot/+` [MQTT topic](mqtt-api.md#command-examples)
and to configuration update commands on the `<root>/<identifier>/cmd/config_update/+` [MQTT topic](mqtt-api.md#command-examples).
listening to configuration snapshot commands on the `<root>/<identifier>/cmd/config_snapshot/+` [MQTT topic](../mqtt-api.md#command-examples)
and to configuration update commands on the `<root>/<identifier>/cmd/config_update/+` [MQTT topic](../mqtt-api.md#command-examples).

## Configuration

The `c8y-configuration-plugin` configuration is stored by default under `/etc/tedge/plugins/tedge-configuration-plugin.toml`
The `tedge-configuration-plugin` configuration is stored by default under `/etc/tedge/plugins/tedge-configuration-plugin.toml`

This [TOML](https://toml.io/en/) file defines the list of files to be managed by the plugin.
Each configuration file is defined by a record with:
Expand Down Expand Up @@ -125,8 +125,8 @@ by the configuration of thin-edge:

* `tedge config get mqtt.bind.address`: the address of the local MQTT bus.
* `tedge config get mqtt.bind.port`: the TCP port of the local MQTT bus.
* `tedge config get mqtt.topic_root`: the root of the [MQTT topic scheme](mqtt-api.md) to publish and subscribe.
* `tedge config get mqtt.device_topic_id`: the identifier of the [MQTT topic scheme](mqtt-api.md) to publish and subscribe.
* `tedge config get mqtt.topic_root`: the root of the [MQTT topic scheme](../mqtt-api.md) to publish and subscribe.
* `tedge config get mqtt.device_topic_id`: the identifier of the [MQTT topic scheme](../mqtt-api.md) to publish and subscribe.

## Handling config snapshot commands

Expand Down
4 changes: 2 additions & 2 deletions docs/src/references/agent/tedge-log-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Thin-edge provides an operation plugin to fetch log files from the device.
As part of this plugin installation:
* On systemd-enabled devices, the service definition file for this `tedge-log-plugin` daemon is also installed.

Once installed, the `tedge-log-plugin` runs as a daemon on the device, listening to log update commands on the [`<root>/<identifier>/cmd/log_upload/+` MQTT topic](mqtt-api.md).
Once installed, the `tedge-log-plugin` runs as a daemon on the device, listening to log update commands on the [`<root>/<identifier>/cmd/log_upload/+` MQTT topic](../mqtt-api.md).

## Configuration

Expand Down Expand Up @@ -68,7 +68,7 @@ then a JSON message with an empty array for the `types` field is sent, indicatin

## Handling log upload commands

The plugin subscribes to log upload commands on the [`<root>/<identifier>/cmd/log_upload/+` MQTT topic](mqtt-api.md).
The plugin subscribes to log upload commands on the [`<root>/<identifier>/cmd/log_upload/+` MQTT topic](../mqtt-api.md).
For example, it subscribes to the following topic for the main device.

```sh te2mqtt
Expand Down
2 changes: 1 addition & 1 deletion docs/src/references/domain-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ The figure below illustrates the child-device concept.
## Plugins

**thin-edge** realizes **Device Management** based on **plugins**.
* a **plugin** can be an (external) executable (e.g. as the `c8y-configuration-plugin` for _configuration management_)
* a **plugin** can be an (external) executable (e.g. as the `tedge-configuration-plugin` for _configuration management_)
or part of a thin-edge built-in software component (e.g. _software management_ in `tedge-agent`)
* to realize **Device Management** functionality, a **plugin** accesses _resources_ and _services_ of the device, as e.g.
* _software management_ uses the device's _package manager_
Expand Down
12 changes: 6 additions & 6 deletions docs/src/start/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ This functionality is directly installed with the initial script. However, it is

As an example you can copy the following content to add some new configuration files which can be retrieved or applied to the device:

```toml title="file: /etc/tedge/c8y/c8y-configuration-plugin.toml"
```toml title="file: /etc/tedge/plugins/tedge-configuration-plugin.toml"
files = [
{ path = '/etc/tedge/tedge.toml' },
{ path = '/etc/tedge/mosquitto-conf/c8y-bridge.conf', type = 'c8y-bridge.conf' },
Expand All @@ -405,11 +405,11 @@ Where:
If the configuration plugin service has not ready started, then you can configure the service to start automatically on boot, and start it now using (if you are using `systemd` on your device):

```sh
sudo systemctl enable c8y-configuration-plugin
sudo systemctl start c8y-configuration-plugin
sudo systemctl enable tedge-configuration-plugin
sudo systemctl start tedge-configuration-plugin
```

Then navigate to Cumulocity IoT Device Management and the desired device. Open its Configuration tab. You can find c8y-configuration-plugin and more are listed as supported configuration types, as declared in the plugin configuration file. Here you can save the configuration files into the repository or download them.
Then navigate to Cumulocity IoT Device Management and the desired device. Open its Configuration tab. You can find tedge-configuration-plugin and more are listed as supported configuration types, as declared in the plugin configuration file. Here you can save the configuration files into the repository or download them.


### Change configuration files via Cumulocity IoT.
Expand Down Expand Up @@ -450,7 +450,7 @@ To change the collectd metrics of the device, which are displayed in Cumulocity

1. Add a new entry to the `files` section of the plugin's configuration file

```toml title="file: /etc/tedge/c8y/c8y-configuration-plugin.toml"
```toml title="file: /etc/tedge/plugins/tedge-configuration-plugin.toml"
files = [
# ...
{path = '/etc/collectd/collectd.conf', type = 'collectd.conf'},
Expand Down Expand Up @@ -510,7 +510,7 @@ To see the content of the log files in Cumulocity IoT, take the following steps:

![Request Log file](./images/RequestLogfile.png)

If `tedge-log-plugin.toml` is added to the `c8y-configuration-plugin.toml` it is possible to do the administration from there.
If `tedge-log-plugin.toml` is added to the `tedge-configuration-plugin.toml` it is possible to do the administration from there.

<!-- TODO: Check if restarting the tedge-log-plugin is required each time the log file is edited -->

Expand Down
2 changes: 1 addition & 1 deletion docs/src/understand/tedge-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In the current version of thin-edge, the agent features are not implemented by a
but by a set of executables:

- `tedge-agent`
- `c8y-configuration-plugin`
- `tedge-configuration-plugin`
- `c8y-firmware-plugin`
- `tedge-log-plugin`
- `c8y-remote-access-plugin`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ Check if a service using configured service type

Check if a service using configured service type as empty
[Arguments] ${service_name}
Skip msg=Skipping due to bug #2383
Execute Command tedge config set service.type ""
Custom Test Setup
ThinEdgeIO.Restart Service ${service_name}
Expand Down

1 comment on commit edba325

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
344 0 4 344 100 58m27.210999999s

Please sign in to comment.