Use case:
I have a lot of Utilite2 single board computers to configure
On each device I installed Linaro (Ubuntu-based), booted from MicroSD card. Linaro is recommended OS for Utilite2
On each device I have to do a lot of manual steps (all of them from command line):
- Change default passwords
- Change hostname
- Edit resolv.conf file
- Install some required packages
- Set the specific timezone
- Download few bigger files from the Internet (wget)
- Edit PATH variable
- Configure static IP address
I would like to automate whole manual work described in point no. 3. I can write a bash script which will do it for me, but I would like to ask you: is there any better way than scripting it?
When you work with web-apps on server side, you probably use tools like Chef or CloudFormation templates, to setup servers and clusters. You don't configure each server manually. This approach has another big advantage - you can keep your configuration as code and reuse it for each server. I need to understand how to do this for physical hardware.
When it comes to IoT, most resources and presentations which I found focus on the big picture. They show how devices "talk" to each other and how system's architecture looks like. But we can not forget that before each device is in the system, it needs to be configured somehow.
From my point of view (beginner in IoT) there are following options to achieve this:
- Configure each device manually - this solution is not efficient one, so to speak...
- Run parametrized setup script on each device - scripts written in bash or python
- Create pre-configured OS image or distro - @sob in his answer mentioned Yocto, so thanks for that - I didn't know it.
- Create a package with configuration and install it on each device - Yadt works like that
- Use some kind of tools like Chef, but IoT-specific - I don't know any of them and I'm wondering if you know any.