Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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 is raspberrypi.local
    • If not, edit ansible/hosts.yml. More info >here<.
  • 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.local is 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

  1. 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.

  2. Install the msd on the pi

  3. 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

  1. Update the system

Setup

  1. First, set a vault password creating the vault password file on the local home dir
echo P45UWURD > ~/.ansible_rpi_vault
  1. 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
  1. Install dependencies
cd ansible
ansible-galaxy install -r requirements.yml
  1. 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

License

This project is (un)licensed under the UNLicense - see the UNLICENSE.md file for details

Acknowledgments

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