Setting Up the Home Lab
Setup the Raspberry Pi
Flash Ubuntu to an SD card using Raspberry Pi Disk Imager and adapt these files on the SD card afterwards:
# ... original content ...
# Turn off Power LED
dtparam=pwr_led_trigger=default-on
dtparam=pwr_led_activelow=off
# Turn off Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
# Turn off Ethernet ACT LED
dtparam=eth_led0=4
# Turn off Ethernet LNK LED
dtparam=eth_led1=4 | |
Connect the raspberry pi to network and power and wait until cloud-init is done:
ssh rpi-0 cloud-init statusThis might take a while…
When the RaspberryPi is running, you might need to mount an external storage. Have a look at this guide: Set up automatic mounting
Deploying Prod Instance
Create a new domain and a new tunnel:
cloudflared login
cloudflared tunnel create prod-homelab
cloudflared tunnel route dns prod-homelab *.YOUR_PROD_DOMAIN.dpdns.orgCreate an .env file similar to the .env.dev file and adapt the variables: Cluster Domain, paths for the secrets etc.
and a prod.compose.yml:
| |
Make it executable by running chmod +x prod.compose.yml.
Push everything to the Git repository.
Connect to the Raspberry Pi via SSH, navigate to the mount point of the external storage, e.g. /mnt/storage and clone your Git repository. Copy the secrets to the paths that are configured in the .env.prod file. Start the stack by running ./prod.compose.yml up -d and see if the services are accessible via https://pdf.YOUR_PROD_DOMAIN.dpdns.org.