Raspberry Pi Setup/Scripts/Güereber'llu'colit
Some fancy things to setup my rpi, so if I fk'up the MicroSD I can get it back running without doing the boring stuff again.
I'm using it as a local server, as this is the only easy to get not-that-expensive low-power thing I can use for now.
Getting Started
Prerequisites and/or asumptions
- The rpi is already connected to lan (wifi or eth, doesn't matter, for now).
- The rpi has Raspbian/RaspberryPi OS Lite (x32) installed
- The rpi names itself
raspberrypi, and thus it's network address israspberrypi.local- If not, edit
ansible/hosts.yml. More info >here<.
- If not, edit
- The local computer has python 3 with pycrypto and ansible installed
- SSH was configured to log in with a private key, on pi user (
ssh r..pi.localis sufficent to be in), and pi user's password is no longer "raspberry" (Security first, even if my ISP doesn't give me any open ports to the Public :c)
Specs/limitations (at the time of writting)
Board:
- Raspberry PI 4
- Model B
- 2GB RAM
MicroSD:
- Kensington 64GB class 10
Power:
- 2A usb charger (that probably doesn't deliver more than 1A, but idk)
Peripheals:
- No External Storage
- No Display
- No Sound
- No Case
- No nothing
...
Ansible Roles
Everything I did has an ansible role, so I can remake an identical system, they are:
- dns: DNS service with dnsmasq
- http: Simple LAMP Stack setup
- RabbitMQ: Message Broker
- transmission: Transmission Torrent Daemon accesible from LAN
- turtl: Personal Turtl service
- usbmount: Automount USB drives, correctly
- zenko-cloudserver: S3-compatible ObjectStorage service with multicloud agregation support
UPNEXT: miniDLNA - mpd
System Preparation
TODO Set wifi settings before step 2
-
Install Raspberry Pi OS Lite x32 via "Raspi Card Imager" Android app with the "Headless" and "Enable ssh" options selected on a clean microsd card.
-
Install the msd on the pi
-
Connect the pi to the network with eth. and power on.
3.1. (optional) Connect to wifi editing /etc/wpa_supplicant/wpa_supplicant.conf using ssh
- Update the system
Setup
- First, set a vault password creating the vault password file on the local home dir
echo P45UWURD > ~/.ansible_rpi_vault
- Recreate the vault
Note: variables to set are specified in the group_vars/rpi/vars file (not so clearly but at least not shady)
cd ansible
ansible-vault create group_vars/rpi/vault
- Install dependencies
cd ansible
ansible-galaxy install -r requirements.yml
- Finally, run the main playbook
cd ansible
ansible-playbook site.yml
As of 03NOV2020 every playbook works as intended.
Built With
- Ansible - That thing to automate things on other things that aren't the local thing but it can also be used there.
- luv <3 - UwU
Authors
- Me - Puked this repo - Hattshire@Github
License
This project is (un)licensed under the UNLicense - see the UNLICENSE.md file for details
Acknowledgments
- Artemmkin/Infrastructure As Code Tutorial for kickstarting me to the ansible side of things
- Pi My Life Up for simplifying the dns setup for me
- Loose screws on my linux setups
- My cat Teo for beign so cute <3 But at the same time so traitor with my feelings :'c
Side Notes
Yes this was a template, a very good one, so good U want to use it too, here here:
PurpleBooth/README-Template.md
I know you want it 7u7