Managing the Device¶
The FoundriesFactory provides you the ability to produce your own custom platform images, and a mechanism to securely deploy them to any of the registered devices.
A couple of quick notes:
The default user and password is
fio; we recommend changing it now if you haven’t already.
For dynamic host name resolution to work, your local network needs to support Zeroconf and the hostname must be otherwise unclaimed.
Registering the Device with the OTA Server¶
Your Linux microPlatform image includes a tool,
lmp-device-register that will register your device(s) via Foundries.io REST API.
From a console on the device run this command to register the device into your factory:
# -a - this allows you to specify an optional comma separated list of # Docker Apps to manage on the device. Check :ref:`tutorial-containers` # for more information. # -n - the name of the device as you'd like it to appear in fioctl and the UI sudo lmp-device-register -n device-name-01
There will be a challenge that needs to be pasted into the URL printed out on the screen. Enter the challenge into the text field on the website.
Now your device is registered, and any new platform builds produced will be pushed down to this device, and be applied. You can view all the devices registered to your factory at: https://app.foundries.io/devices/. You can also work with your fleet using the fioctl command line tool.
If for some reason you would like to re-provision a device, you will need to remove the credentials generated by lmp-device-register, and re-provision the device. Using the same device name twice is not supported:
sudo -s systemctl stop aktualizr-lite rm -rf /var/sota/* lmp-device-register -a shellhttpd -n your_device_name systemctl start aktualizr-lite
If you would like to monitor the update status on the device, here are a couple of useful commands:
sudo journalctl -f -u aktualizr-lite sudo ostree admin status
Managing Device Updates¶
Once registered, a device’s updates options can be remotely managed with
fioctl devices config updates:
# Configure the device to run the "shellhttpd" app fioctl devices config updates <device> --apps shellhttpd # Configure the device to run 2 apps (comma separate the apps) fioctl devices config updates <device> --apps app1,app2 # Configure the device to take updates from the "master" tag: fioctl devices config updates <device> --tags master
These updates are handled on the device by the fioconfig daemon. This checks for configuration updates on a configurable periodic interval. The factory default is 5 minutes. So - changes can take up to 5 minutes before they appear. For more details on tagging see Advanced Tagging.