A Raspberry PI homelab setup
Last updated: February 10, 2020
Install Rocky Linux OS
-
Download
RockyPiRocky Linux OS from Official Repowget https://download.rockylinux.org/pub/rocky/8/rockyrpi/aarch64/images/RockyRpi_x.x_xxxxxxxx.img.xz -
Verify checksum of the
img.xzwith`RockyRpi_x.x_xxxxxxxx.sha256sum:xzcat RockyRpi_x.x_xxxxxxxx.img.xz | sha256sum -
Write image to SD card mounted at
/dev/sdX:sudo bash -c "xzcat RockyRpi_x.x_xxxxxxxx.img.xz > /dev/sdX" -
Initial login to raspberry pi with password
rockylinux:ssh rocky@rockypi -
Grow the SD card partition to max (where
/is the3rd partition)growpart /dev/sdX 3 -
Resize the fs to max
resize2fs /dev/sdX3
Setup Homelab using ansible playbook: Homelab
-
Important: Make sure to run
initfirst separately, where it will create a default user withsudoprivileges. Editplaybook-setup.ymlappropriately and usejustto run the playbookansible-playbook --diff -K --vault-password-file pass.key playbook-setup.yml # or: just run -
Run additional setup roles:
ssh,timezone,packages,upgrade,dnfautomatic,firewalld:just run
Deploy all the services onto the raspberry pi
-
Install docker using
geerlingguy.docker. -
Configure firewall to allow all ports for the services using
firewalldrole. -
Setup up a presistent volume for all the data for the docker containers using
fsrole. -
Deploy all the services using roles (
portainer,watchtower,pihole, ...)