I’m developing an IoT device on Revolution Pi /Raspberry Pi 3 running a Yocto image with Qt5, PostgreSQL and nodejs as the core of a new Ticket Vending Machine.
So far, I managed to build an image with Mender client 2.0 connecting to a local demo server on my Ubuntu 16.04 development system.
Building images and deploying them to my device is working as expected.
Before switching to production mode on hosted mender, I need to clarify how my network configuration (systemd-networkd) can be saved and reinstalled to the new rootfs after deployment of a new rootfs.
I came across the following problems:
1.) Using DHCP - the lease information is stored within the rootfs, so after the deployment and reboot, the lease information is cleared and the client starts DCHP_DISCOVER instead of DHCP_REQUEST an I get a new IP address for my client, every time I deploy a new rootfs.
2.) Using a fixed IP, I would have to provide different images for all my devices. I can not manage this for several 100 devices.
Has anybody managed this problem ?
Should I use update scripts in mender artifacts to save eth.network file to /data partition and replace them again in /etc before reboot ?
Can I override network settings with any kind of file on my /data-partition ?
Do you have any experience ? Thank you in advance !