Taking good care of health and excercise is good, but we could take it to the next level by controlling what we consume with less GMO and possibly explore solutions of having our own self maintained farm.
In this project, the aim was to explore and create a prototype of having an indoor ecosystem that is self maintained to produce harvest. The farm uses rasperrypi + Python + GCP
- Sensors are scrapped by prometheus running on my raspberrypi
- Prometheus server hosted on my GKE scrapes the prometheus server of the raspberrypi including its critical metrics and sensors
- Grafana Alerting are set to certain thresholds to ensure certain readings do not go beyond a threshold for example water/moisture if they do notification policy will trigger and call webhook api running on the raspberrypi
- Webhook api running on the raspberrypi will trigger an action based on the call for example turn water pump on
Raspberrypi was used as main controlling source there are two main components running on the pi
In the circuit interaction there is two main objectives
With sensor readings from moisture and temprature we constantly read data and have it scraped by prometheus with a custom job lavel (Current sensors installed are capacitive sensors, and temperature sensors)
Using FlaskAPI a webhook endpoint is waiting for commands to be sent by Grafana alerting notification Policy, the api is using auth basic to authenticate incoming calls from Grafana, additionally firewall rules have been setup to ensure only calls from grafana instance will be accepted
Prometheus was used to scrape data exported by custom exporter running on the pi device, which collects all sensor readings. This prometheus endpoint is then scraped by the GCP prometheus server hosted on GKE
Terragrunt was chosen for easier automation of my infrastructure and it also allows me to store my remote state on my bucket
Using terraform providers to orchestrate my infrastructure deployment from Cluster, Nodepool, Service, Ingress to External IP
Helmsman was used to deploy prometheus and grafana to my infrastructure after terragrunt ran
I am currently working on storing credentials into vault for Grafana as well as switching my Grafana into a Statefulset or keep my Grafana dashboard as code (Json) for easier automation