I am using an Ubuntu 22.02 machine (64bit) with 12 cores for building the Yocto image. The more core/threads you have on your machine, the faster the builds will be. Gitlab, Minio S3 and Wikijs are running locally on the same machine in dockerized mode and behind a reverse proxy. The setup of the CI/CD registry and how the generated builds are deployed to Minio for storage, is out of the scope of this document.
For developing the Flutter App, any machine should serve. I am using a Macbook air M2 with 16GB of RAM for that purpose.
Milestone 1 is a preparation milestone during which the Gitlab projects have been setup and a basic build for the target have been provided.
As of Milestone 2, a Gitlab workflow has been enacted to ensure all code changes are carefully review and selected before finding their path to production code. The workflow is described with the following steps:
a developer with Developer role in Gitlab clones the project locally for local development (master branch)
they creates a topic branch locally from the default master branch
they include all the necessary changes and run all the required tests locally
once work is completed, the topic branch will get pushed to Gitlab and a Merge Request is being generated
only a Maintainer can review the Merge Request and allow it to get integrated or not
once the changes have been merged to the default branch, the topic branch can be deleted
the developer has to make sure to pull latest change from the default master branch
Releases are mainly tags on the production branch. Once the software on the master branch has enough new features to be released, a merge request should be generated to push latest changes to production branch. If all tests have been concluded successfully, the
Mender offers the possibility to update the target device locally without connecting to a Mender deployment server. This functionality is useful when the target is not accessible online and needs updating for some reason or another. This is documented in detail on Mender's website: https://docs.mender.io/artifact-creation/standalone-deployment
The steps to carry out the offline update are as follows:
modify the target Yocto build by adding some changes to (adding a recipe)
copy the generated .mender file to a USB flash drive (best formatted with FAT32)
attach the USB flash drive to target
with the dmesg or fdisk -l commands in order to check the available storage devices on your system and the file system they are using
create a mount point for your USB device with the following command: mkdir /media/usb-flash
mount the USB storage device to the mount point that was just created: mount /dev/sda1 /media/usb-flash
standalone deployment requires that the Mender client on the target be disabled before applying the update. This can be done with the following command: systemctl stop mender-client
ensure that mender-client has been stopped correctly with: systemctl status mender-client. This should return a status inactive for the service.
now the update can be applied with: mender install /media/usb-flash/MENDER-DELTA-FILENAME.mender
The update will take some time to carry on. You should see a progress update displayed.
Once the update is done, a reboot is necessary if some rootfs base files have been changed. Restart the system using reboot
log in again with SSH and check if the package that was added to the Yocto build is now present on the rootfs
if everything is ok, you can commit the changes so that mender knows that the update is permanent. This can be achieved with mender commit
should you revert to the build that was present earlier, use mender rollback