Skip to content
Collection of configurations for my Raspberry Pi home lab.
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ansible
files
grafana
inventory Added management rpi Oct 19, 2019
.gitignore Initial commit Aug 25, 2019
README.md

README.md

HomeLab

This is a collection of configurations for my Raspberry Pi home lab.

Things to do:

  • Automate Grafana configuration
  • Create playbook for full Azure Agent setup

Grafana

Telegraf

In order to collect memory metrics you need to enable the memory cgroup by adding cgroup_enable=memory to /boot/cmdline.txt and then reboot your rpi.

Azure Runner

Dependencies can be found here.

  • On rpi01 run /usr/local/bin/config.sh to configure the agent.
  • Run /usr/local/bin/svc.sh install and then /usr/local/bin/config.sh start to install and start the service.

RPi SSH Configuration

After flashing the SD card, drop an empty file named ssh in the boot directory.

Using SSH Keys

I'm using a vault file to authenticate to my RPi Docker hosts, alternatively you can use SSH keys.

On the client run the following to create your SSH key (hit enter to save the keys to the default location of ~/.ssh):

ssh-keygen -b 2048 -t rsa

On the Raspberry Pi, create a .ssh directory and a authorized_keys file:

mkdir .ssh
cd .ssh
touch authorized_keys
chmod 700 ~/.ssh/
chmod 600 ~/.ssh/authorized_keys

Now copy the client SSH key to the Pi:

cat ~/.ssh/id_rsa.pub | ssh -p 22 pi@192.168.1.2 'cat >>.ssh/authorized_keys'

Useful Stuff

docker stop $(docker ps -a -q)
You can’t perform that action at this time.