AutoConfiguration Script

Topics about the Hardware of Revolution Pi
Post Reply
User avatar
FrancoTampieri
Posts: 14
Joined: 17 Nov 2020, 12:44
Location: Imola
Contact:

AutoConfiguration Script

Post 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
Disobedient Entrepreneur, IT Enthusiast, Senior Blockchain, Python, Odoo Developer with a dash of C#
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: AutoConfiguration Script

Post 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
User avatar
FrancoTampieri
Posts: 14
Joined: 17 Nov 2020, 12:44
Location: Imola
Contact:

Re: AutoConfiguration Script

Post by FrancoTampieri »

dirk wrote: 17 Feb 2021, 17:05 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
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
Disobedient Entrepreneur, IT Enthusiast, Senior Blockchain, Python, Odoo Developer with a dash of C#
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: AutoConfiguration Script

Post 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.
User avatar
FrancoTampieri
Posts: 14
Joined: 17 Nov 2020, 12:44
Location: Imola
Contact:

Re: AutoConfiguration Script

Post 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
Disobedient Entrepreneur, IT Enthusiast, Senior Blockchain, Python, Odoo Developer with a dash of C#
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: AutoConfiguration Script

Post 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.
User avatar
RR4711
Posts: 229
Joined: 22 Feb 2018, 13:28

Re: AutoConfiguration Script

Post 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...
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: AutoConfiguration Script

Post by dirk »

Hi RR4711, thank you for your idea we'll keep that in mind the MAC address will be included.
Post Reply