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.
Once the device has been registered, from a console on the device run the following command:
sudo systemctl restart aktualizr-lite
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