Configuring devices
Device configuration - general
When you want to change configuration of a device, you have a few options:
- Change configuration directly on device - this is the most versatile approach as this way you are able to change any configuration. If you do change some configuration which is understood by DWARFG_LONG directly on the device, the updated configuration profile will be send to the server on the next device -> server update.
- Change configuration via WebTunnel via DWARFG_LONG - if the device has a local web interface, you should be able to change any configuration exposed on the web UI this way, even without direct access to the device as DWARFG_LONG would act as a web proxy. Please note that because the WebTunnel must be initiated from the device side (based on command from server of course), a full-featured ssh client needs to be deployed on the device. Some device types (Advantech routers, generally any regular Linux distribution) do have that deployed by default, some (Teltonika routers, OpenWRT devices) may need manual installation as they have only a limited-feature ssh client deployed by the OS vendor. Again, configuration profile updates will be sent to DWARFG_LONG on next update.
- Change configuration in DWARFG_LONG - if the configuration you want to change is exposed in Device Details in DWARFG_LONG, the configuration profile in the server is updated immediately when the change is done and the configuration change will be sent to the device on it's next contact with DWARFG_LONG.
- Setup configuration cloning - as described below, if you want one device track exactly the configuration of another device, you can setup configuration cloning. This way, any configuration change that ends in config profile change of the origin device will be propagated to the cloned device configuration - in time. Also, when the cloned device diverts from the master device configuration, it is automatically set to return to the configuration matching the master device configuration on the next data update. Please see details below.
The configuration that is changeable directly in the Device Details in DWARFG_LONG differs per device type. For DWARFG_LONG early versions, the list of such configuration parameters tends to be quite short - just the Firmware version for Advantech devices and Hostname for all other devices.
When you perform a configuration change in DWARFG_LONG, device's Sync Status changes from Synchronized to Pending to indicate there is a pending configuration change. You may also be able to spot the Processing status briefly in between. That state may be safely ignored as that is a temporary transition state occuring between UI requesting an operation and DWARFG_LONG service picking the request up. Once the device receives the request, it is processed and finally, at the second data update from device since the request from user, device updates DWARFG_LONG with actual configuration containing the applied update thus allowing DWARFG_LONG to clear device status back to Synced.
Device configuration - cloning
If you have devices that should have exactly same configuration, you can use the device cloning feature.
In this mode, there is one origin device and one or more devices with cloned configuration (clone).
This is a tracking mode, meaning that DWARFG_LONG tries to clean up any configuration difference between the devices once it occurs. This means that:
- Any configuration change on origin that DWARFG_LONG is able to track is propagated to all of the cloned devices if applicable (see below). This is called update.
- Any configuration change on cloned device (detectable by DWARFG_LONG) that creates a deviation from the origin is reverted back by DWARFG_LONG, trying to hold the device configuration according to origin.
While you can clone only the devices of the same device type (e.g. Advantech router to Advantech router), the origin and cloned devices does not need to be of the exactly same product variants. That means, that one can have for example a wifi and the second may be without wifi. The result is that while one device configuration profile contains wifi configuration, the second does not. In other words, the wifi configuration changes are not applicable for cloning to this particular target.
Also, you need to keep in mind that cloning does NOT manage firmware version. That is intentional, to increase the flexibility and applicability of the configuration cloning between devices. You can think of the firmware version as a very special configuration key, not being part of a configuration profile.
Last thing to think about when cloning is that the configuration propagation (update) or enforcement (cleanup of the deviation) takes usually at least 2 data update cycles. Consider a change on the origin device:
- Once done, the configuration update will be sent on the next update from the device to the server. The update is sent on every connection to the server, so it depends a lot on the agent profile being used. The default is 260 seconds but if you e.g. set the data update to happen only once a day, the configuration update to the server may be sent much later than default.
- Once the update arrives into DWARFG_LONG, it is evaluated and in case configuration update is applicable to the cloned device, an updated configuration is prepared.
- On next contact from cloned device (in up to 260 seconds but again depending on the agent profile active for that device), the update is handed over to the device.
- Device processes the update and sends its actual configuration back to DWARFG_LONG within the next contact (again up to 260 seconds by default).
- After the updated configuration is delivered, evaluated and found matching, DWARFG_LONG sets cloned device Status to Synchronized
- To sum up: the whole operation's total time depends heavily on your settings. It could take anywhere between a few seconds and roughly 10 minutes.
Now, how do you setup cloning?
- Clone from - single device
- Go to device Details of the to-be-cloned device
- Click on Select device to be cloned from
- Clone to - single device
- Go to device Details of the source device
- Click on Select device to be cloned from
- Clone to - multiple devices
- Go to device Devices table
- Select the devices you want the configuration to be cloned to.
- Clink on Assign Config Profile button below the table.
- Select the desired source device adn confirm.
Next to the Device Details you can also see the cloned configuration indication directly in the devices list table.