Skip to content

Installation Kubernetes

Jens Maus edited this page May 24, 2023 · 7 revisions

Introduction

It is possible to deploy the RaspberryMatic in Kubernetes nodes running on x86_64, arm or arm64. This allows to combine with other home automation components and High Availability solutions.

Requirements

Debian/Ubuntu-based Host system

Prepare host to run Kubernetes (microk8s):

NOTE: there are tutorials for non-Linux platforms but they have not being tested with RaspberryMatic. If you try them please share your experience and contribute to the wiki if you got it working.

  1. Ensure you installed snap:
    sudo apt install snapd
  2. Install the microk8s snap
   sudo snap install microk8s --classic
  1. Install base add-ons

    sudo microk8s enable dns helm storage
  2. Make sure microk8s is ready:

    sudo microk8s status

Prepare host to use Homematic and Homematic IP devices:

  1. Install pivccu-modules-dkms kernel modules (required for RPI-RF-MOD/HM-MOD-RPI-PCB use):
    wget -qO - https://apt.pivccu.de/piVCCU/public.key | sudo gpg --dearmor -o /usr/share/keyrings/pivccu-archive-keyring.gpg
    sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/pivccu-archive-keyring.gpg] https://apt.pivccu.de/piVCCU stable main" >/etc/apt/sources.list.d/pivccu.list'
    sudo apt update
    sudo apt install build-essential bison flex libssl-dev
    sudo apt install pivccu-modules-dkms
    
  2. Install eq3_char_loop kernel module to automatic module load section:
    sudo sh -c 'echo eq3_char_loop >/etc/modules-load.d/eq3_char_loop.conf'
  3. Start+Load all necessary kernel modules on host:
    sudo service pivccu-dkms start
    sudo modprobe eq3_char_loop

Install RaspberryMatic Helm chart

  1. Install the RaspberryMatic Helm repository:

    sudo microk8s helm repo add raspberrymatic https://jens-maus.github.io/RaspberryMatic
  2. Install RaspberryMatic:

    We are upgrading the helm chart to use the [common library chart from bjw-s]((https://bjw-s.github.io/helm-charts/docs/common-library). This adds more options to tune while removes the boiler plate in our Helm chart. This unfortunately means a small disruptive change as the persistence settings are slightly different.

    • New (Versions > 3.65.11.20221005):

      You need to select the volume to persist the Raspberrymatic data. The default is creating a new persistent volume claim. If you do not enable the persistence the data is lost across reboots (only good for testing)

      sudo microk8s helm install raspberrymatic raspberrymatic/raspberrymatic --set persistence.data.enabled=true

      Another usual option is to use the hostPath:

      sudo microk8s helm install raspberrymatic raspberrymatic/raspberrymatic  --set persistence.data.enabled=true --set persistence.data.type=hostPath --set persistence.data.hostPath=<persistent data directory> 
    • Old (Versions <= 3.65.11.20221005):

      sudo microk8s helm install raspberrymatic raspberrymatic/raspberrymatic

      Note: if you are not using the storage add-on you need to select the hostPath:

      sudo microk8s helm install --set persistence.hostPath=<persistent data directory> raspberrymatic raspberrymatic/raspberrymatic
  3. If the deployment is successful you will get instructions to connect to the WebUI.

  4. For additional options please check the RaspberryMatic Helm chart instructions