Skip to content

Config Files

Overview

Standard device configuration files that will be used on embedded boards will be documented here. These configuration files can be edited on each device directly or adjusted before building a new image.

swupdate.cfg - Cloud agent configuration

Here we cover the /etc/swupdate/swupdate.cfg file which passes configuration parameters to SWUpdate. These parameters are then used to authenticate with your account on Update Factory.

globals :
{
    loglevel = 4;
    syslog = true;
    postupdatecmd = "post_download.sh";
};

suricatta :
{
    tenant              = "yourtenant";
    id                  = "device-<unique-id>";
    url                 = "https://personal.updatefactory.io";
    cafile              = "/etc/ssl/certs/ca-certificates.crt";
    gatewaytoken        = "99616d4fae39167deddf21cd90047861";
    /*targettoken         = "3bc13b476cb3962a0c63a5c92beacfh7";*/
};

Parameters

Here is a brief description of the parameters in the above /etc/swupdate/swupdate.cfg configuration file. When all required changes are saved, the service needs to be restarted for changes to take effect:

systemctl restart swupdate
/etc/init.d/swupdate restart

Details about other configuration file parameters can be found here.

tenant

The tenant parameter is the name of the tenant that has been provided. Usually the tenant corresponds to the name of the customer.

id

The id parameter defines the Controller ID field of the target device and it is the unique indentifier of every device.

url

The url parameter defines which service the target will be connecting to:

  • Free and Development subscriptions must use the personal environment by using the value https://personal.updatefactory.io in the url parameter
  • Proof of Concept and Expansion subscriptions must use the business environment by using the value https://business.updatefactory.io in the url parameter

cafile

The cafile parameter defines the path of the file containing the certificates of the trusted Certificate Authorities.

targettoken

The targettoken parameter defines the security token used by the device to authenticate to UpdateFactory with the HTTP-Authorization header. Every device has its own Target Token, and it can be obtained in the Target details of the Deployment view in the Management UI.

gatewaytoken

The gatewaytoken parameter defines the security token used by the device or a gateway to authenticate to UpdateFactory with the HTTP-Authorization header. The Gateway Token is the same for all devices connected to a given tenant, and it can be obtained in the Authentication configuration section of the System Config view in the Management UI.

update.env - Automatic vs manual update trigger

Note

This applies only to meta-updatefactory-singlecopy. When double-copy strategy is used, the installation will be performed in the background on the standby copy. Reboot can be controlled by specifying a post update command.

The device can be setup to install updates:

  • manually (default setting): in this mode the user is required to start installation with command reboot_for_update.sh after the logs in Update Factory Server or in the device (serial console) notify the update is downloaded.
  • automatically: in this mode the system immediately reboots for installation as soon as download of the update is complete.

The configuration file /etc/swupdate/update.env allows to adjust the behaviour, and defaults to manual mode:

export UPDATE_FORCED=false

Change parameter to true to have updates installed automatically.