The next step is build the cluster and connect, install the operations system in each SD card, conect the Raspberries to the network and energy.
The Raspberry Pi's website offers different operating systems to install in owr devices, I'm using Rasbian, a version of Debian to Rasberry Pi. the process to install it is quite easy.
First you need to download the image of operating system from the raspberry pi website, and decompress the file to get an file with extension .img
After that, you need connect the SD card to your computer using a port or an adapter.
Many Linux distributions has pre installed an application to manage the content of the store devices called "Disks".
In this application, you have to select the SD card and, from the menu, select the option restore image.
This option open a new window where you have to search the file with extension .img and select ti.
Once you selected the .img file, click in start an the image starts to restore the information in to the SD card.
When this process over, you have to disconnect the SD card and reconnect to the computer, this will mount the SD card in your system. In the boot partition of the SD card, you hace to create a file with the name ssh. After this, unmount all the partitions in the SD card and disconnect it form you computer.
Insert the SD card in you Raspberry Pi and turn it up.
You need to search in you ISP's router onr in the logs of your DHCP service what IP address was assigned to the Rasberry.
From a terminal, connect via ssh using the user "pi" and the IP obtained on the previous step.
To log in in to the Raspberry use the password "raspberry"
Now you are in to the Rasberry. The following steps will configure a base system. When you finish these following steps, you could generate your own image, and use it to generate the rest of the SD cards of the rest of Raspberries
Fist, using the system tool raspi-config , change the pi password and the time zone.
Second, in the system where you will manage your cluster, create a ssh certificate using ssh-keygen and copy yo the Raspberry with ssh-copy-id (https://www.raspberrypi.org/documentation/remote-access/ssh/passwordless.md)
After this, reboot you Rasberry and try to access to it using ssh. in this time, you d¿will not need a password.
If every thing is correct, the next step is turn off the Rasberry, extract the SD card and connect this one to your computer again. Using the same application "Disks", create your own .img file.
Uis this last .img file to create the rest of SD cards for the rest of your Raspberries.
Finally use the package manager in your system to instal ansible. In the case of Ubuntu/Debian use apt install ansible.
Now is time to go dirty with Ansible.
No comments:
Post a Comment