A fun experement to run everything on my home network using Docker, with it all managed via Ansible. A few notes...
- This will rely on you setting up some things on the RPI manually
- It will rely on running Ansible via localhost (instead of another device running ansible against the RPI)
- Download the Raspberry Pi Imager and format your SD card
- Choose Ubuntu Server 24 and select the advanced options
- Set the hostname to
ubuntu-pi-server.local - Enable SSH, using username and password auth. Set the username to
ubuntuand the password to something safe that only you will know - Save, then Write
- Boot the SD card, giving ~5 minutes after you power it up before trying to connect
- From your computer,
sshto[email protected].
- Run
ip ato identify the network interface. We will assume thateth0is your ethernet for this example - Run
ls /etc/netplanto identify theyamlconfig file you need to edit. Likely01-netcfg.yamlor50-cloud-init.yaml - Edit the netplan (changing the file as appropriate) via
sudo vi /etc/netplan/50-cloud-init.yaml:network: version: 2 ethernets: eth0: addresses: - 192.168.1.10/24 routes: - to: default via: 192.168.1.1 nameservers: addresses: [192.168.1.1]
- Apply the netplan changes via
sudo netplan apply - Verify with
ip a, look atinetof the interface.
sudo apt update
sudo apt install -y software-properties-common git
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install -y ansiblecd ~
mkdir git
cd git
git clone [email protected]:AjkayAlan/ansible-rpi-docker-homelab-alan.git
cd ansible-rpi-docker-homelab-alanThen read the readme at https://github.com/AjkayAlan/ansible-rpi-docker-homelab-alan