Skip to content

Commit

Permalink
Docs: Include changes from the PR and sign artifact instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Ramirez Vargas <[email protected]>
  • Loading branch information
MuchoLucho committed Aug 31, 2023
1 parent 5ced36b commit 77fac55
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions 09.Add-ons/10.Configure/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It is possible to create and apply configuration for the device using Mender UI

Mender applies configuration in a similar way as software updates.
`deviceconfig` is a microservice on the server responsible for "translating" a configuration change made in the UI into a deployment.
It then proceeds to trigger a deployment to the device using the same mechanism used in OTA, the `deployments` microservice.
It then proceeds to trigger a deployment to the device using the same mechanism used in OTA, the `deployments` microservice.

On the device side, a specialized update module is responsible for applying the configuration.
You can find more information about the configuration update module on [Mender Hub](https://hub.mender.io).
Expand All @@ -34,15 +34,15 @@ The picture below shows the configuration update flow.
There are no special device requirements for using Mender Configure, but editing the configuration
from the UI is not supported if the device is using **signed Artifacts**. It is still possible to
see reported configuration the UI. Configure Artifacts can be
deployed with a manually signed Artifact, by following the regular Artifact deployment flow.
deployed with a manually signed Artifact, by following the regular Artifact deployment flow as described in [Handle signed Artifacts](#handle-signed-artifacts).

## How to deploy a configuration to multiple devices at once

The `mender-configure` add-on was designed thinking on being executed from the UI for one device at a time, however, you can generate the artifact manually and then create deployments to groups (static or dynamic) taking advantage of the `mender-configure` Update Module:
The `mender-configure` add-on was designed to be executed from the UI for one device at a time however, you can generate the artifact manually and then create deployments to groups (static or dynamic) taking advantage of the `mender-configure` Update Module:

### Prerequisite

You will need an script already localted in `/usr/lib/mender-configure/apply-device-config.d` as described in ["How to make an apply-device-config script"](01.Device-integration/docs.md#how-to-write-an-apply-device-config-script) section of these docs.
You will need a script already localted in `/usr/lib/mender-configure/apply-device-config.d` as described in ["How to make an apply-device-config script"](01.Device-integration/docs.md#how-to-write-an-apply-device-config-script) section of these docs.

### Create the `mender-configure` artifact

Expand All @@ -69,4 +69,22 @@ mender-artifact write module-image \
-m "device-config.json"
```

Then just upload it to the Mender Server and you are ready to create the deployment for groups of devices.
Then just upload it to the _Releases_ section of the Mender Server and you are ready to create the deployment in the _Deployment_ UI for groups of devices.

#### Handle signed Artifacts

You can take advantage of this approach to handle signed artifacts as you can include signatures from your workstation as opposed by using the Mender Configure UI per device to deploy a configuration. Just generate they key and add the `-k private.key` flag into the previous command as described in the [Artifact Signing section](../../06.Artifact-creation/07.Sign-and-verify/docs.md#signing).

The command should look something like this instead:

```bash
mender-artifact write module-image \
-T "mender-configure" \
-o "<an-artifact-name>.mender" \
-n "<an-artifact-name>" \
-t "<your-device-type>" \
--software-version "<1>" \
--software-filesystem "data-partition" \
-m "device-config.json" \
-k "private.key"
```

0 comments on commit 77fac55

Please sign in to comment.