Page 1 of 1
AutoConfiguration Script
Posted: 09 Feb 2021, 19:26
by FrancoTampieri
Hi!
I'm working to make a script for my deploy of my revolution pi, that allow me to auto configure some part of the device and the software with some identifiers.
I would like to use the hostname like RevPixxxxx (where x is numbers), I see that number is printed outside the box, but I don't know if is memorized in the firmware or hardware of the revolutionpi.
I use the piSerial but I see the internal serial number that is different from that number, I would to understand like if is only possible to automate the configuration of that pi with a scanner that decode the QR code and modify the hostname of the device.
Can you help me?
Kind Regards
Franco
Re: AutoConfiguration Script
Posted: 17 Feb 2021, 17:05
by dirk
Hi
I would like to use the hostname like RevPixxxxx (where x is numbers), I see that number is printed outside the box, but I don't know if is memorized in the firmware or hardware of the revolutionpi.
No, that's what the "revpi-factory-reset" tool does.
There is a Python script that I posted in the forum which you can use:
viewtopic.php?f=6&t=1976&p=7679&hilit=I+wrote#p7476
Re: AutoConfiguration Script
Posted: 01 Mar 2021, 17:30
by FrancoTampieri
Ok, so reading the code u wait a string from a barcode reader, that input the string memorize in the QR code in the front, and after u program the device with the hostname and Mac address and of course the hostname.
mmm is of course a phase in the production process, where probably after the electronic tests u program the device that pass this tests and put the label on it for the password etc.
I need to create a deploy script, for my installations, like use some sw like Ansible or similar to configure the RevPi for the plant or the project. Does anyone have some suggestion?
Kind Regards
Franco
Re: AutoConfiguration Script
Posted: 05 Mar 2021, 10:59
by dirk
Hi Franco, so I have not had any experience with Ansible. However, I have heard from many places that it is a useful tool for orchestrating edge devices.
The script from me is rather meant as a "candy" to the community. It does not claim to be production-ready.
However, for example, with an SSH key installed by the script, you are able to access your modules without a password and to act here comfortably and execute commands.
Also I would be interested in some reports from the community how orchestration is possible.
Re: AutoConfiguration Script
Posted: 10 Mar 2021, 00:49
by FrancoTampieri
dirk wrote: ↑05 Mar 2021, 10:59
Hi Franco, so I have not had any experience with Ansible. However, I have heard from many places that it is a useful tool for orchestrating edge devices.
Also I would be interested in some reports from the community how orchestration is possible.
Hi Dirk!
well in my point of view I'm a little undecided, because sensible is very effective, but needs for example in our case to have the playbook library inside the device, and can be a problem because depending on the plant, we can't have access to internet directly for may reason: starting from security to physical problem (like no good internet cabling etc. etc.).
I'm trying pyinfra and seems good, but I have some idea like some other other orchestration tools like Saltstack where there is a messaging protocol between the master (a orchestration server) and the minions (our revpi).
Any suggestion o consideration on this would be very appreciated.
Thanks
Franco
Re: AutoConfiguration Script
Posted: 29 Mar 2021, 11:51
by dirk
Starting with CM4 we'll be able to save the device ID on an EEPROM. Thus the manual step of entering the serial number will be obsolete.
Re: AutoConfiguration Script
Posted: 06 Apr 2021, 13:35
by RR4711
dirk wrote: ↑29 Mar 2021, 11:51
Starting with CM4 we'll be able to save the device ID on an EEPROM. Thus the manual step of entering the serial number will be obsolete.
And please the MAC Adress(es) as well and not in the config.txt anymore...
Re: AutoConfiguration Script
Posted: 16 Apr 2021, 16:34
by dirk
Hi RR4711, thank you for your idea we'll keep that in mind the MAC address will be included.