Before installing Ritsu-Pi with all of it's containers, I encountered several problems with running it after hitting a number of containers and virtual network interfaces. Follow this guide first to avoid this possible problems.
This happens when I installed all Ritsu-Pi components. It turns out the dhcpcd
service can overflow and causes the eth0
interface of your Pi to lose it's IP address. Note that this only becomes a problem if you're using DHCP to configure your Pi IP address. Apparently this is because Docker creates many virtual network adapter and it's messing up with dhcpcd
service. To solve this, the easiest way is to ignore veth*
interfaces, which are created by Docker.
Steps:
sudo vim /etc/dhcpcd.conf
- Add this line at the TOP of the file:
denyinterfaces veth*
- Save the config file
sudo systemctl daemon-reload
sudo systemctl restart dhcpcd.service
Source: raspberrypi/linux#4092 (comment)
This is also a problem with DHCP. If your Pi is configured using DHCP, when you set your Pi IP address as DHCP server in your router, that means your Pi will also use it's own IP to resolve DNS queries. See the problem? In the end your Pi can't do any DNS resolution because it doesn't have a working upstream DNS resolver.
The solution again is to make your Pi DNS static by editing the /etc/dhcpcd.conf
.
sudo vim /etc/dhcpcd.conf
- Add this line:
static domain_name_servers=1.1.1.1
- Save and
sudo systemctl restart dhcpcd.service
You can also change your /etc/resolv.conf
but this settings usually gets overwritten by dhcpcd
.
So in the end, the DHCP service is the root of all the problems above. Make sure to configure your DHCP settings correctly or make your Pi network settings static.
Everything is automated using Ansible, so rest easy:smile:
- Install Ansible
ansible-galaxy collection install -r requirements.yml
git clone https://github.com/fahminlb33/ritsu-pi.git
- Copy the
config.yml.example
toconfig.yml
and pick what app you want to install. Setstate
topresent
to enable it - Edit the
inventory.yml
and add your Pi hosts ansible-playbook -i inventory.yml site.yml
to install Ritsu-Pi
Usually you can just stop and delete the containers from Docker. But you can set the state
to absent
to uninstall it.