3. Append cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
at the end of the FIRST line of /boot/cmdline.txt
Install locally:
- arkade
- kubectl
- k3sup
curl -sSL https://dl.get-arkade.dev | sudo sh
arkade get kubectl
arkade get k3sup
curl -sfL https://get.k3s.io | sh -
sudo cat /var/lib/rancher/k3s/server/node-token
K1089729d4ab5e51a44b1871768c7c04ad80bc6319d7bef5d94c7caaf9b0bd29efc::node:1fcdc14840494f3ebdcad635c7b7a9b7
export K3S_URL="https://192.168.100.50:6443"
export K3S_TOKEN="K1089729d4ab5e51a44b1871768c7c04ad80bc6319d7bef5d94c7caaf9b0bd29efc::node:1fcdc14840494f3ebdcad635c7b7a9b7"
curl -sfL https://get.k3s.io | sh -
export KUBECONFIG=/home/saftone1/kubeconfig
kubectl config set-context default
-
1.1 Postgres chart
It provides a statefulset which allows HA and data persistency for the data stored in Postgres.
The chart contains a secret which stores the auth and db data.
It also contains a NodePort service which will allow us to use it using :.
The stateful set deploys 2 replicas of Postgres, each of them will have a PVC automatically provisioned by the local-path StorageClass.
-
1.2 [WIP] Service chart
Will contain the resources needed to grab data from RPI's collectors and expose it to the dashboard.
It is the only component which has access to RPIs.
Installed under /opt/databank, and uses it owns virtualenv for python. Needs the following packages installed:
- psycopg
- libpq5
- Contains the models for the data that will be collected.
- Contains the DB connection logic
- Collects the data from each sensor periodically
- Add the data to the database
- Query the Collector and expose the data in the kubernetes cluster